gump 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +24 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +71 -0
  6. data/Rakefile +2 -0
  7. data/bin/gump +37 -0
  8. data/gump.gemspec +17 -0
  9. data/lib/gump.rb +50 -0
  10. data/lib/version.rb +3 -0
  11. data/server/assets/css/style.css +6949 -0
  12. data/server/assets/images/arrow.png +0 -0
  13. data/server/assets/images/logo.png +0 -0
  14. data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css +347 -0
  15. data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
  16. data/server/assets/js/bootstrap/dist/css/bootstrap-theme.min.css +7 -0
  17. data/server/assets/js/bootstrap/dist/css/bootstrap.css +5785 -0
  18. data/server/assets/js/bootstrap/dist/css/bootstrap.css.map +1 -0
  19. data/server/assets/js/bootstrap/dist/css/bootstrap.min.css +7 -0
  20. data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  21. data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
  22. data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  23. data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  24. data/server/assets/js/bootstrap/dist/js/bootstrap.js +1951 -0
  25. data/server/assets/js/bootstrap/dist/js/bootstrap.min.js +6 -0
  26. data/server/assets/js/jquery.codemirror/.gitattributes +8 -0
  27. data/server/assets/js/jquery.codemirror/.gitignore +6 -0
  28. data/server/assets/js/jquery.codemirror/.travis.yml +3 -0
  29. data/server/assets/js/jquery.codemirror/AUTHORS +255 -0
  30. data/server/assets/js/jquery.codemirror/CONTRIBUTING.md +72 -0
  31. data/server/assets/js/jquery.codemirror/LICENSE +19 -0
  32. data/server/assets/js/jquery.codemirror/README.md +11 -0
  33. data/server/assets/js/jquery.codemirror/addon/comment/comment.js +145 -0
  34. data/server/assets/js/jquery.codemirror/addon/comment/continuecomment.js +54 -0
  35. data/server/assets/js/jquery.codemirror/addon/dialog/dialog.css +32 -0
  36. data/server/assets/js/jquery.codemirror/addon/dialog/dialog.js +121 -0
  37. data/server/assets/js/jquery.codemirror/addon/display/fullscreen.css +6 -0
  38. data/server/assets/js/jquery.codemirror/addon/display/fullscreen.js +31 -0
  39. data/server/assets/js/jquery.codemirror/addon/display/placeholder.js +48 -0
  40. data/server/assets/js/jquery.codemirror/addon/edit/closebrackets.js +82 -0
  41. data/server/assets/js/jquery.codemirror/addon/edit/closetag.js +89 -0
  42. data/server/assets/js/jquery.codemirror/addon/edit/continuelist.js +25 -0
  43. data/server/assets/js/jquery.codemirror/addon/edit/matchbrackets.js +87 -0
  44. data/server/assets/js/jquery.codemirror/addon/edit/matchtags.js +56 -0
  45. data/server/assets/js/jquery.codemirror/addon/edit/trailingspace.js +15 -0
  46. data/server/assets/js/jquery.codemirror/addon/fold/brace-fold.js +93 -0
  47. data/server/assets/js/jquery.codemirror/addon/fold/comment-fold.js +40 -0
  48. data/server/assets/js/jquery.codemirror/addon/fold/foldcode.js +75 -0
  49. data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.css +21 -0
  50. data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.js +124 -0
  51. data/server/assets/js/jquery.codemirror/addon/fold/indent-fold.js +30 -0
  52. data/server/assets/js/jquery.codemirror/addon/fold/xml-fold.js +167 -0
  53. data/server/assets/js/jquery.codemirror/addon/hint/anyword-hint.js +34 -0
  54. data/server/assets/js/jquery.codemirror/addon/hint/css-hint.js +50 -0
  55. data/server/assets/js/jquery.codemirror/addon/hint/html-hint.js +337 -0
  56. data/server/assets/js/jquery.codemirror/addon/hint/javascript-hint.js +131 -0
  57. data/server/assets/js/jquery.codemirror/addon/hint/pig-hint.js +121 -0
  58. data/server/assets/js/jquery.codemirror/addon/hint/python-hint.js +95 -0
  59. data/server/assets/js/jquery.codemirror/addon/hint/show-hint.css +38 -0
  60. data/server/assets/js/jquery.codemirror/addon/hint/show-hint.js +286 -0
  61. data/server/assets/js/jquery.codemirror/addon/hint/sql-hint.js +105 -0
  62. data/server/assets/js/jquery.codemirror/addon/hint/xml-hint.js +69 -0
  63. data/server/assets/js/jquery.codemirror/addon/lint/coffeescript-lint.js +27 -0
  64. data/server/assets/js/jquery.codemirror/addon/lint/css-lint.js +19 -0
  65. data/server/assets/js/jquery.codemirror/addon/lint/javascript-lint.js +126 -0
  66. data/server/assets/js/jquery.codemirror/addon/lint/json-lint.js +17 -0
  67. data/server/assets/js/jquery.codemirror/addon/lint/lint.css +73 -0
  68. data/server/assets/js/jquery.codemirror/addon/lint/lint.js +203 -0
  69. data/server/assets/js/jquery.codemirror/addon/merge/dep/diff_match_patch.js +50 -0
  70. data/server/assets/js/jquery.codemirror/addon/merge/merge.css +92 -0
  71. data/server/assets/js/jquery.codemirror/addon/merge/merge.js +474 -0
  72. data/server/assets/js/jquery.codemirror/addon/mode/loadmode.js +51 -0
  73. data/server/assets/js/jquery.codemirror/addon/mode/multiplex.js +101 -0
  74. data/server/assets/js/jquery.codemirror/addon/mode/multiplex_test.js +30 -0
  75. data/server/assets/js/jquery.codemirror/addon/mode/overlay.js +59 -0
  76. data/server/assets/js/jquery.codemirror/addon/runmode/colorize.js +29 -0
  77. data/server/assets/js/jquery.codemirror/addon/runmode/runmode-standalone.js +136 -0
  78. data/server/assets/js/jquery.codemirror/addon/runmode/runmode.js +56 -0
  79. data/server/assets/js/jquery.codemirror/addon/runmode/runmode.node.js +103 -0
  80. data/server/assets/js/jquery.codemirror/addon/scroll/scrollpastend.js +34 -0
  81. data/server/assets/js/jquery.codemirror/addon/search/match-highlighter.js +91 -0
  82. data/server/assets/js/jquery.codemirror/addon/search/search.js +133 -0
  83. data/server/assets/js/jquery.codemirror/addon/search/searchcursor.js +143 -0
  84. data/server/assets/js/jquery.codemirror/addon/selection/active-line.js +39 -0
  85. data/server/assets/js/jquery.codemirror/addon/selection/mark-selection.js +108 -0
  86. data/server/assets/js/jquery.codemirror/addon/tern/tern.css +85 -0
  87. data/server/assets/js/jquery.codemirror/addon/tern/tern.js +632 -0
  88. data/server/assets/js/jquery.codemirror/addon/tern/worker.js +41 -0
  89. data/server/assets/js/jquery.codemirror/addon/wrap/hardwrap.js +99 -0
  90. data/server/assets/js/jquery.codemirror/bin/authors.sh +6 -0
  91. data/server/assets/js/jquery.codemirror/bin/compress +92 -0
  92. data/server/assets/js/jquery.codemirror/bin/lint +16 -0
  93. data/server/assets/js/jquery.codemirror/bin/source-highlight +61 -0
  94. data/server/assets/js/jquery.codemirror/bower.json +15 -0
  95. data/server/assets/js/jquery.codemirror/demo/activeline.html +78 -0
  96. data/server/assets/js/jquery.codemirror/demo/anywordhint.html +79 -0
  97. data/server/assets/js/jquery.codemirror/demo/bidi.html +74 -0
  98. data/server/assets/js/jquery.codemirror/demo/btree.html +86 -0
  99. data/server/assets/js/jquery.codemirror/demo/buffers.html +109 -0
  100. data/server/assets/js/jquery.codemirror/demo/changemode.html +59 -0
  101. data/server/assets/js/jquery.codemirror/demo/closebrackets.html +63 -0
  102. data/server/assets/js/jquery.codemirror/demo/closetag.html +40 -0
  103. data/server/assets/js/jquery.codemirror/demo/complete.html +80 -0
  104. data/server/assets/js/jquery.codemirror/demo/emacs.html +75 -0
  105. data/server/assets/js/jquery.codemirror/demo/folding.html +75 -0
  106. data/server/assets/js/jquery.codemirror/demo/fullscreen.html +130 -0
  107. data/server/assets/js/jquery.codemirror/demo/hardwrap.html +69 -0
  108. data/server/assets/js/jquery.codemirror/demo/html5complete.html +54 -0
  109. data/server/assets/js/jquery.codemirror/demo/indentwrap.html +58 -0
  110. data/server/assets/js/jquery.codemirror/demo/lint.html +171 -0
  111. data/server/assets/js/jquery.codemirror/demo/loadmode.html +49 -0
  112. data/server/assets/js/jquery.codemirror/demo/marker.html +52 -0
  113. data/server/assets/js/jquery.codemirror/demo/markselection.html +45 -0
  114. data/server/assets/js/jquery.codemirror/demo/matchhighlighter.html +47 -0
  115. data/server/assets/js/jquery.codemirror/demo/matchtags.html +49 -0
  116. data/server/assets/js/jquery.codemirror/demo/merge.html +82 -0
  117. data/server/assets/js/jquery.codemirror/demo/multiplex.html +75 -0
  118. data/server/assets/js/jquery.codemirror/demo/mustache.html +68 -0
  119. data/server/assets/js/jquery.codemirror/demo/placeholder.html +45 -0
  120. data/server/assets/js/jquery.codemirror/demo/preview.html +88 -0
  121. data/server/assets/js/jquery.codemirror/demo/resize.html +58 -0
  122. data/server/assets/js/jquery.codemirror/demo/runmode.html +62 -0
  123. data/server/assets/js/jquery.codemirror/demo/search.html +94 -0
  124. data/server/assets/js/jquery.codemirror/demo/spanaffectswrapping_shim.html +85 -0
  125. data/server/assets/js/jquery.codemirror/demo/tern.html +129 -0
  126. data/server/assets/js/jquery.codemirror/demo/theme.html +121 -0
  127. data/server/assets/js/jquery.codemirror/demo/trailingspace.html +48 -0
  128. data/server/assets/js/jquery.codemirror/demo/variableheight.html +67 -0
  129. data/server/assets/js/jquery.codemirror/demo/vim.html +74 -0
  130. data/server/assets/js/jquery.codemirror/demo/visibletabs.html +62 -0
  131. data/server/assets/js/jquery.codemirror/demo/widget.html +85 -0
  132. data/server/assets/js/jquery.codemirror/demo/xmlcomplete.html +116 -0
  133. data/server/assets/js/jquery.codemirror/index.html +192 -0
  134. data/server/assets/js/jquery.codemirror/keymap/emacs.js +387 -0
  135. data/server/assets/js/jquery.codemirror/keymap/extra.js +43 -0
  136. data/server/assets/js/jquery.codemirror/keymap/vim.js +3703 -0
  137. data/server/assets/js/jquery.codemirror/lib/codemirror.css +263 -0
  138. data/server/assets/js/jquery.codemirror/lib/codemirror.js +5944 -0
  139. data/server/assets/js/jquery.codemirror/mode/apl/apl.js +160 -0
  140. data/server/assets/js/jquery.codemirror/mode/apl/index.html +72 -0
  141. data/server/assets/js/jquery.codemirror/mode/asterisk/asterisk.js +183 -0
  142. data/server/assets/js/jquery.codemirror/mode/asterisk/index.html +154 -0
  143. data/server/assets/js/jquery.codemirror/mode/clike/clike.js +362 -0
  144. data/server/assets/js/jquery.codemirror/mode/clike/index.html +195 -0
  145. data/server/assets/js/jquery.codemirror/mode/clike/scala.html +767 -0
  146. data/server/assets/js/jquery.codemirror/mode/clojure/clojure.js +224 -0
  147. data/server/assets/js/jquery.codemirror/mode/clojure/index.html +88 -0
  148. data/server/assets/js/jquery.codemirror/mode/cobol/cobol.js +240 -0
  149. data/server/assets/js/jquery.codemirror/mode/cobol/index.html +210 -0
  150. data/server/assets/js/jquery.codemirror/mode/coffeescript/coffeescript.js +354 -0
  151. data/server/assets/js/jquery.codemirror/mode/coffeescript/index.html +740 -0
  152. data/server/assets/js/jquery.codemirror/mode/commonlisp/commonlisp.js +105 -0
  153. data/server/assets/js/jquery.codemirror/mode/commonlisp/index.html +177 -0
  154. data/server/assets/js/jquery.codemirror/mode/css/css.js +639 -0
  155. data/server/assets/js/jquery.codemirror/mode/css/index.html +70 -0
  156. data/server/assets/js/jquery.codemirror/mode/css/scss.html +157 -0
  157. data/server/assets/js/jquery.codemirror/mode/css/scss_test.js +93 -0
  158. data/server/assets/js/jquery.codemirror/mode/css/test.js +142 -0
  159. data/server/assets/js/jquery.codemirror/mode/d/d.js +205 -0
  160. data/server/assets/js/jquery.codemirror/mode/d/index.html +273 -0
  161. data/server/assets/js/jquery.codemirror/mode/diff/diff.js +32 -0
  162. data/server/assets/js/jquery.codemirror/mode/diff/index.html +117 -0
  163. data/server/assets/js/jquery.codemirror/mode/dtd/dtd.js +127 -0
  164. data/server/assets/js/jquery.codemirror/mode/dtd/index.html +89 -0
  165. data/server/assets/js/jquery.codemirror/mode/ecl/ecl.js +192 -0
  166. data/server/assets/js/jquery.codemirror/mode/ecl/index.html +52 -0
  167. data/server/assets/js/jquery.codemirror/mode/eiffel/eiffel.js +147 -0
  168. data/server/assets/js/jquery.codemirror/mode/eiffel/index.html +430 -0
  169. data/server/assets/js/jquery.codemirror/mode/erlang/erlang.js +484 -0
  170. data/server/assets/js/jquery.codemirror/mode/erlang/index.html +75 -0
  171. data/server/assets/js/jquery.codemirror/mode/fortran/fortran.js +173 -0
  172. data/server/assets/js/jquery.codemirror/mode/fortran/index.html +81 -0
  173. data/server/assets/js/jquery.codemirror/mode/gas/gas.js +330 -0
  174. data/server/assets/js/jquery.codemirror/mode/gas/index.html +68 -0
  175. data/server/assets/js/jquery.codemirror/mode/gfm/gfm.js +97 -0
  176. data/server/assets/js/jquery.codemirror/mode/gfm/index.html +82 -0
  177. data/server/assets/js/jquery.codemirror/mode/gfm/test.js +112 -0
  178. data/server/assets/js/jquery.codemirror/mode/gherkin/gherkin.js +168 -0
  179. data/server/assets/js/jquery.codemirror/mode/gherkin/index.html +48 -0
  180. data/server/assets/js/jquery.codemirror/mode/go/go.js +168 -0
  181. data/server/assets/js/jquery.codemirror/mode/go/index.html +85 -0
  182. data/server/assets/js/jquery.codemirror/mode/groovy/groovy.js +211 -0
  183. data/server/assets/js/jquery.codemirror/mode/groovy/index.html +84 -0
  184. data/server/assets/js/jquery.codemirror/mode/haml/haml.js +153 -0
  185. data/server/assets/js/jquery.codemirror/mode/haml/index.html +79 -0
  186. data/server/assets/js/jquery.codemirror/mode/haml/test.js +94 -0
  187. data/server/assets/js/jquery.codemirror/mode/haskell/haskell.js +250 -0
  188. data/server/assets/js/jquery.codemirror/mode/haskell/index.html +73 -0
  189. data/server/assets/js/jquery.codemirror/mode/haxe/haxe.js +429 -0
  190. data/server/assets/js/jquery.codemirror/mode/haxe/index.html +103 -0
  191. data/server/assets/js/jquery.codemirror/mode/htmlembedded/htmlembedded.js +73 -0
  192. data/server/assets/js/jquery.codemirror/mode/htmlembedded/index.html +60 -0
  193. data/server/assets/js/jquery.codemirror/mode/htmlmixed/htmlmixed.js +104 -0
  194. data/server/assets/js/jquery.codemirror/mode/htmlmixed/index.html +85 -0
  195. data/server/assets/js/jquery.codemirror/mode/http/http.js +98 -0
  196. data/server/assets/js/jquery.codemirror/mode/http/index.html +45 -0
  197. data/server/assets/js/jquery.codemirror/mode/index.html +114 -0
  198. data/server/assets/js/jquery.codemirror/mode/jade/index.html +66 -0
  199. data/server/assets/js/jquery.codemirror/mode/jade/jade.js +90 -0
  200. data/server/assets/js/jquery.codemirror/mode/javascript/index.html +107 -0
  201. data/server/assets/js/jquery.codemirror/mode/javascript/javascript.js +617 -0
  202. data/server/assets/js/jquery.codemirror/mode/javascript/test.js +72 -0
  203. data/server/assets/js/jquery.codemirror/mode/javascript/typescript.html +61 -0
  204. data/server/assets/js/jquery.codemirror/mode/jinja2/index.html +50 -0
  205. data/server/assets/js/jquery.codemirror/mode/jinja2/jinja2.js +42 -0
  206. data/server/assets/js/jquery.codemirror/mode/julia/index.html +187 -0
  207. data/server/assets/js/jquery.codemirror/mode/julia/julia.js +262 -0
  208. data/server/assets/js/jquery.codemirror/mode/less/index.html +753 -0
  209. data/server/assets/js/jquery.codemirror/mode/less/less.js +346 -0
  210. data/server/assets/js/jquery.codemirror/mode/livescript/index.html +459 -0
  211. data/server/assets/js/jquery.codemirror/mode/livescript/livescript.js +267 -0
  212. data/server/assets/js/jquery.codemirror/mode/livescript/livescript.ls +266 -0
  213. data/server/assets/js/jquery.codemirror/mode/lua/index.html +86 -0
  214. data/server/assets/js/jquery.codemirror/mode/lua/lua.js +144 -0
  215. data/server/assets/js/jquery.codemirror/mode/markdown/index.html +359 -0
  216. data/server/assets/js/jquery.codemirror/mode/markdown/markdown.js +560 -0
  217. data/server/assets/js/jquery.codemirror/mode/markdown/test.js +664 -0
  218. data/server/assets/js/jquery.codemirror/mode/meta.js +91 -0
  219. data/server/assets/js/jquery.codemirror/mode/mirc/index.html +161 -0
  220. data/server/assets/js/jquery.codemirror/mode/mirc/mirc.js +177 -0
  221. data/server/assets/js/jquery.codemirror/mode/nginx/index.html +181 -0
  222. data/server/assets/js/jquery.codemirror/mode/nginx/nginx.js +163 -0
  223. data/server/assets/js/jquery.codemirror/mode/ntriples/index.html +45 -0
  224. data/server/assets/js/jquery.codemirror/mode/ntriples/ntriples.js +170 -0
  225. data/server/assets/js/jquery.codemirror/mode/ocaml/index.html +146 -0
  226. data/server/assets/js/jquery.codemirror/mode/ocaml/ocaml.js +116 -0
  227. data/server/assets/js/jquery.codemirror/mode/octave/index.html +95 -0
  228. data/server/assets/js/jquery.codemirror/mode/octave/octave.js +118 -0
  229. data/server/assets/js/jquery.codemirror/mode/pascal/index.html +61 -0
  230. data/server/assets/js/jquery.codemirror/mode/pascal/pascal.js +94 -0
  231. data/server/assets/js/jquery.codemirror/mode/pegjs/index.html +66 -0
  232. data/server/assets/js/jquery.codemirror/mode/pegjs/pegjs.js +103 -0
  233. data/server/assets/js/jquery.codemirror/mode/perl/index.html +75 -0
  234. data/server/assets/js/jquery.codemirror/mode/perl/perl.js +816 -0
  235. data/server/assets/js/jquery.codemirror/mode/php/index.html +62 -0
  236. data/server/assets/js/jquery.codemirror/mode/php/php.js +132 -0
  237. data/server/assets/js/jquery.codemirror/mode/pig/index.html +55 -0
  238. data/server/assets/js/jquery.codemirror/mode/pig/pig.js +171 -0
  239. data/server/assets/js/jquery.codemirror/mode/properties/index.html +53 -0
  240. data/server/assets/js/jquery.codemirror/mode/properties/properties.js +63 -0
  241. data/server/assets/js/jquery.codemirror/mode/python/index.html +187 -0
  242. data/server/assets/js/jquery.codemirror/mode/python/python.js +368 -0
  243. data/server/assets/js/jquery.codemirror/mode/q/index.html +144 -0
  244. data/server/assets/js/jquery.codemirror/mode/q/q.js +124 -0
  245. data/server/assets/js/jquery.codemirror/mode/r/index.html +86 -0
  246. data/server/assets/js/jquery.codemirror/mode/r/r.js +141 -0
  247. data/server/assets/js/jquery.codemirror/mode/rpm/changes/changes.js +19 -0
  248. data/server/assets/js/jquery.codemirror/mode/rpm/changes/index.html +67 -0
  249. data/server/assets/js/jquery.codemirror/mode/rpm/spec/index.html +114 -0
  250. data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.css +5 -0
  251. data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.js +66 -0
  252. data/server/assets/js/jquery.codemirror/mode/rst/index.html +534 -0
  253. data/server/assets/js/jquery.codemirror/mode/rst/rst.js +560 -0
  254. data/server/assets/js/jquery.codemirror/mode/ruby/index.html +185 -0
  255. data/server/assets/js/jquery.codemirror/mode/ruby/ruby.js +247 -0
  256. data/server/assets/js/jquery.codemirror/mode/rust/index.html +61 -0
  257. data/server/assets/js/jquery.codemirror/mode/rust/rust.js +436 -0
  258. data/server/assets/js/jquery.codemirror/mode/sass/index.html +66 -0
  259. data/server/assets/js/jquery.codemirror/mode/sass/sass.js +330 -0
  260. data/server/assets/js/jquery.codemirror/mode/scheme/index.html +77 -0
  261. data/server/assets/js/jquery.codemirror/mode/scheme/scheme.js +232 -0
  262. data/server/assets/js/jquery.codemirror/mode/shell/index.html +66 -0
  263. data/server/assets/js/jquery.codemirror/mode/shell/shell.js +118 -0
  264. data/server/assets/js/jquery.codemirror/mode/sieve/index.html +93 -0
  265. data/server/assets/js/jquery.codemirror/mode/sieve/sieve.js +183 -0
  266. data/server/assets/js/jquery.codemirror/mode/smalltalk/index.html +68 -0
  267. data/server/assets/js/jquery.codemirror/mode/smalltalk/smalltalk.js +151 -0
  268. data/server/assets/js/jquery.codemirror/mode/smarty/index.html +136 -0
  269. data/server/assets/js/jquery.codemirror/mode/smarty/smarty.js +205 -0
  270. data/server/assets/js/jquery.codemirror/mode/smartymixed/index.html +114 -0
  271. data/server/assets/js/jquery.codemirror/mode/smartymixed/smartymixed.js +175 -0
  272. data/server/assets/js/jquery.codemirror/mode/sparql/index.html +54 -0
  273. data/server/assets/js/jquery.codemirror/mode/sparql/sparql.js +145 -0
  274. data/server/assets/js/jquery.codemirror/mode/sql/index.html +75 -0
  275. data/server/assets/js/jquery.codemirror/mode/sql/sql.js +365 -0
  276. data/server/assets/js/jquery.codemirror/mode/stex/index.html +110 -0
  277. data/server/assets/js/jquery.codemirror/mode/stex/stex.js +246 -0
  278. data/server/assets/js/jquery.codemirror/mode/stex/test.js +120 -0
  279. data/server/assets/js/jquery.codemirror/mode/tcl/index.html +143 -0
  280. data/server/assets/js/jquery.codemirror/mode/tcl/tcl.js +131 -0
  281. data/server/assets/js/jquery.codemirror/mode/tiddlywiki/index.html +155 -0
  282. data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  283. data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
  284. data/server/assets/js/jquery.codemirror/mode/tiki/index.html +95 -0
  285. data/server/assets/js/jquery.codemirror/mode/tiki/tiki.css +26 -0
  286. data/server/assets/js/jquery.codemirror/mode/tiki/tiki.js +308 -0
  287. data/server/assets/js/jquery.codemirror/mode/toml/index.html +73 -0
  288. data/server/assets/js/jquery.codemirror/mode/toml/toml.js +71 -0
  289. data/server/assets/js/jquery.codemirror/mode/turtle/index.html +51 -0
  290. data/server/assets/js/jquery.codemirror/mode/turtle/turtle.js +145 -0
  291. data/server/assets/js/jquery.codemirror/mode/vb/index.html +103 -0
  292. data/server/assets/js/jquery.codemirror/mode/vb/vb.js +259 -0
  293. data/server/assets/js/jquery.codemirror/mode/vbscript/index.html +55 -0
  294. data/server/assets/js/jquery.codemirror/mode/vbscript/vbscript.js +334 -0
  295. data/server/assets/js/jquery.codemirror/mode/velocity/index.html +119 -0
  296. data/server/assets/js/jquery.codemirror/mode/velocity/velocity.js +186 -0
  297. data/server/assets/js/jquery.codemirror/mode/verilog/index.html +132 -0
  298. data/server/assets/js/jquery.codemirror/mode/verilog/verilog.js +182 -0
  299. data/server/assets/js/jquery.codemirror/mode/xml/index.html +57 -0
  300. data/server/assets/js/jquery.codemirror/mode/xml/xml.js +345 -0
  301. data/server/assets/js/jquery.codemirror/mode/xquery/index.html +210 -0
  302. data/server/assets/js/jquery.codemirror/mode/xquery/test.js +64 -0
  303. data/server/assets/js/jquery.codemirror/mode/xquery/xquery.js +432 -0
  304. data/server/assets/js/jquery.codemirror/mode/yaml/index.html +80 -0
  305. data/server/assets/js/jquery.codemirror/mode/yaml/yaml.js +97 -0
  306. data/server/assets/js/jquery.codemirror/mode/z80/index.html +52 -0
  307. data/server/assets/js/jquery.codemirror/mode/z80/z80.js +85 -0
  308. data/server/assets/js/jquery.codemirror/package.json +19 -0
  309. data/server/assets/js/jquery.codemirror/test/comment_test.js +51 -0
  310. data/server/assets/js/jquery.codemirror/test/doc_test.js +329 -0
  311. data/server/assets/js/jquery.codemirror/test/driver.js +139 -0
  312. data/server/assets/js/jquery.codemirror/test/emacs_test.js +135 -0
  313. data/server/assets/js/jquery.codemirror/test/index.html +209 -0
  314. data/server/assets/js/jquery.codemirror/test/lint/acorn.js +1593 -0
  315. data/server/assets/js/jquery.codemirror/test/lint/lint.js +139 -0
  316. data/server/assets/js/jquery.codemirror/test/lint/walk.js +216 -0
  317. data/server/assets/js/jquery.codemirror/test/mode_test.css +10 -0
  318. data/server/assets/js/jquery.codemirror/test/mode_test.js +200 -0
  319. data/server/assets/js/jquery.codemirror/test/phantom_driver.js +31 -0
  320. data/server/assets/js/jquery.codemirror/test/run.js +34 -0
  321. data/server/assets/js/jquery.codemirror/test/test.js +1562 -0
  322. data/server/assets/js/jquery.codemirror/test/vim_test.js +2391 -0
  323. data/server/assets/js/jquery.codemirror/theme/3024-day.css +34 -0
  324. data/server/assets/js/jquery.codemirror/theme/3024-night.css +34 -0
  325. data/server/assets/js/jquery.codemirror/theme/ambiance-mobile.css +5 -0
  326. data/server/assets/js/jquery.codemirror/theme/ambiance.css +70 -0
  327. data/server/assets/js/jquery.codemirror/theme/base16-dark.css +34 -0
  328. data/server/assets/js/jquery.codemirror/theme/base16-light.css +34 -0
  329. data/server/assets/js/jquery.codemirror/theme/blackboard.css +28 -0
  330. data/server/assets/js/jquery.codemirror/theme/cobalt.css +21 -0
  331. data/server/assets/js/jquery.codemirror/theme/eclipse.css +23 -0
  332. data/server/assets/js/jquery.codemirror/theme/elegant.css +13 -0
  333. data/server/assets/js/jquery.codemirror/theme/erlang-dark.css +30 -0
  334. data/server/assets/js/jquery.codemirror/theme/lesser-dark.css +47 -0
  335. data/server/assets/js/jquery.codemirror/theme/mbo.css +37 -0
  336. data/server/assets/js/jquery.codemirror/theme/midnight.css +43 -0
  337. data/server/assets/js/jquery.codemirror/theme/monokai.css +29 -0
  338. data/server/assets/js/jquery.codemirror/theme/neat.css +12 -0
  339. data/server/assets/js/jquery.codemirror/theme/night.css +24 -0
  340. data/server/assets/js/jquery.codemirror/theme/paraiso-dark.css +34 -0
  341. data/server/assets/js/jquery.codemirror/theme/paraiso-light.css +34 -0
  342. data/server/assets/js/jquery.codemirror/theme/rubyblue.css +23 -0
  343. data/server/assets/js/jquery.codemirror/theme/solarized.css +180 -0
  344. data/server/assets/js/jquery.codemirror/theme/the-matrix.css +26 -0
  345. data/server/assets/js/jquery.codemirror/theme/tomorrow-night-eighties.css +34 -0
  346. data/server/assets/js/jquery.codemirror/theme/twilight.css +28 -0
  347. data/server/assets/js/jquery.codemirror/theme/vibrant-ink.css +30 -0
  348. data/server/assets/js/jquery.codemirror/theme/xq-dark.css +49 -0
  349. data/server/assets/js/jquery.codemirror/theme/xq-light.css +43 -0
  350. data/server/assets/js/jquery.js +4 -0
  351. data/server/assets/js/jquery.nanoscroller/jquery.nanoscroller.js +2 -0
  352. data/server/assets/js/jquery.nanoscroller/nanoscroller.css +49 -0
  353. data/server/assets/js/tester.js +161 -0
  354. data/server/config.ru +2 -0
  355. data/server/server.rb +41 -0
  356. data/server/views/_content.erb +65 -0
  357. data/server/views/_sidebar.erb +32 -0
  358. data/server/views/index.erb +40 -0
  359. metadata +402 -0
@@ -0,0 +1,32 @@
1
+ CodeMirror.defineMode("diff", function() {
2
+
3
+ var TOKEN_NAMES = {
4
+ '+': 'positive',
5
+ '-': 'negative',
6
+ '@': 'meta'
7
+ };
8
+
9
+ return {
10
+ token: function(stream) {
11
+ var tw_pos = stream.string.search(/[\t ]+?$/);
12
+
13
+ if (!stream.sol() || tw_pos === 0) {
14
+ stream.skipToEnd();
15
+ return ("error " + (
16
+ TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, '');
17
+ }
18
+
19
+ var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd();
20
+
21
+ if (tw_pos === -1) {
22
+ stream.skipToEnd();
23
+ } else {
24
+ stream.pos = tw_pos;
25
+ }
26
+
27
+ return token_name;
28
+ }
29
+ };
30
+ });
31
+
32
+ CodeMirror.defineMIME("text/x-diff", "diff");
@@ -0,0 +1,117 @@
1
+ <!doctype html>
2
+
3
+ <title>CodeMirror: Diff mode</title>
4
+ <meta charset="utf-8"/>
5
+ <link rel=stylesheet href="../../doc/docs.css">
6
+
7
+ <link rel="stylesheet" href="../../lib/codemirror.css">
8
+ <script src="../../lib/codemirror.js"></script>
9
+ <script src="diff.js"></script>
10
+ <style>
11
+ .CodeMirror {border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;}
12
+ span.cm-meta {color: #a0b !important;}
13
+ span.cm-error { background-color: black; opacity: 0.4;}
14
+ span.cm-error.cm-string { background-color: red; }
15
+ span.cm-error.cm-tag { background-color: #2b2; }
16
+ </style>
17
+ <div id=nav>
18
+ <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
19
+
20
+ <ul>
21
+ <li><a href="../../index.html">Home</a>
22
+ <li><a href="../../doc/manual.html">Manual</a>
23
+ <li><a href="https://github.com/marijnh/codemirror">Code</a>
24
+ </ul>
25
+ <ul>
26
+ <li><a href="../index.html">Language modes</a>
27
+ <li><a class=active href="#">Diff</a>
28
+ </ul>
29
+ </div>
30
+
31
+ <article>
32
+ <h2>Diff mode</h2>
33
+ <form><textarea id="code" name="code">
34
+ diff --git a/index.html b/index.html
35
+ index c1d9156..7764744 100644
36
+ --- a/index.html
37
+ +++ b/index.html
38
+ @@ -95,7 +95,8 @@ StringStream.prototype = {
39
+ <script>
40
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
41
+ lineNumbers: true,
42
+ - autoMatchBrackets: true
43
+ + autoMatchBrackets: true,
44
+ + onGutterClick: function(x){console.log(x);}
45
+ });
46
+ </script>
47
+ </body>
48
+ diff --git a/lib/codemirror.js b/lib/codemirror.js
49
+ index 04646a9..9a39cc7 100644
50
+ --- a/lib/codemirror.js
51
+ +++ b/lib/codemirror.js
52
+ @@ -399,10 +399,16 @@ var CodeMirror = (function() {
53
+ }
54
+
55
+ function onMouseDown(e) {
56
+ - var start = posFromMouse(e), last = start;
57
+ + var start = posFromMouse(e), last = start, target = e.target();
58
+ if (!start) return;
59
+ setCursor(start.line, start.ch, false);
60
+ if (e.button() != 1) return;
61
+ + if (target.parentNode == gutter) {
62
+ + if (options.onGutterClick)
63
+ + options.onGutterClick(indexOf(gutter.childNodes, target) + showingFrom);
64
+ + return;
65
+ + }
66
+ +
67
+ if (!focused) onFocus();
68
+
69
+ e.stop();
70
+ @@ -808,7 +814,7 @@ var CodeMirror = (function() {
71
+ for (var i = showingFrom; i < showingTo; ++i) {
72
+ var marker = lines[i].gutterMarker;
73
+ if (marker) html.push('<div class="' + marker.style + '">' + htmlEscape(marker.text) + '</div>');
74
+ - else html.push("<div>" + (options.lineNumbers ? i + 1 : "\u00a0") + "</div>");
75
+ + else html.push("<div>" + (options.lineNumbers ? i + options.firstLineNumber : "\u00a0") + "</div>");
76
+ }
77
+ gutter.style.display = "none"; // TODO test whether this actually helps
78
+ gutter.innerHTML = html.join("");
79
+ @@ -1371,10 +1377,8 @@ var CodeMirror = (function() {
80
+ if (option == "parser") setParser(value);
81
+ else if (option === "lineNumbers") setLineNumbers(value);
82
+ else if (option === "gutter") setGutter(value);
83
+ - else if (option === "readOnly") options.readOnly = value;
84
+ - else if (option === "indentUnit") {options.indentUnit = indentUnit = value; setParser(options.parser);}
85
+ - else if (/^(?:enterMode|tabMode|indentWithTabs|readOnly|autoMatchBrackets|undoDepth)$/.test(option)) options[option] = value;
86
+ - else throw new Error("Can't set option " + option);
87
+ + else if (option === "indentUnit") {options.indentUnit = value; setParser(options.parser);}
88
+ + else options[option] = value;
89
+ },
90
+ cursorCoords: cursorCoords,
91
+ undo: operation(undo),
92
+ @@ -1402,7 +1406,8 @@ var CodeMirror = (function() {
93
+ replaceRange: operation(replaceRange),
94
+
95
+ operation: function(f){return operation(f)();},
96
+ - refresh: function(){updateDisplay([{from: 0, to: lines.length}]);}
97
+ + refresh: function(){updateDisplay([{from: 0, to: lines.length}]);},
98
+ + getInputField: function(){return input;}
99
+ };
100
+ return instance;
101
+ }
102
+ @@ -1420,6 +1425,7 @@ var CodeMirror = (function() {
103
+ readOnly: false,
104
+ onChange: null,
105
+ onCursorActivity: null,
106
+ + onGutterClick: null,
107
+ autoMatchBrackets: false,
108
+ workTime: 200,
109
+ workDelay: 300,
110
+ </textarea></form>
111
+ <script>
112
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
113
+ </script>
114
+
115
+ <p><strong>MIME types defined:</strong> <code>text/x-diff</code>.</p>
116
+
117
+ </article>
@@ -0,0 +1,127 @@
1
+ /*
2
+ DTD mode
3
+ Ported to CodeMirror by Peter Kroon <plakroon@gmail.com>
4
+ Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues
5
+ GitHub: @peterkroon
6
+ */
7
+
8
+ CodeMirror.defineMode("dtd", function(config) {
9
+ var indentUnit = config.indentUnit, type;
10
+ function ret(style, tp) {type = tp; return style;}
11
+
12
+ function tokenBase(stream, state) {
13
+ var ch = stream.next();
14
+
15
+ if (ch == "<" && stream.eat("!") ) {
16
+ if (stream.eatWhile(/[\-]/)) {
17
+ state.tokenize = tokenSGMLComment;
18
+ return tokenSGMLComment(stream, state);
19
+ } else if (stream.eatWhile(/[\w]/)) return ret("keyword", "doindent");
20
+ } else if (ch == "<" && stream.eat("?")) { //xml declaration
21
+ state.tokenize = inBlock("meta", "?>");
22
+ return ret("meta", ch);
23
+ } else if (ch == "#" && stream.eatWhile(/[\w]/)) return ret("atom", "tag");
24
+ else if (ch == "|") return ret("keyword", "seperator");
25
+ else if (ch.match(/[\(\)\[\]\-\.,\+\?>]/)) return ret(null, ch);//if(ch === ">") return ret(null, "endtag"); else
26
+ else if (ch.match(/[\[\]]/)) return ret("rule", ch);
27
+ else if (ch == "\"" || ch == "'") {
28
+ state.tokenize = tokenString(ch);
29
+ return state.tokenize(stream, state);
30
+ } else if (stream.eatWhile(/[a-zA-Z\?\+\d]/)) {
31
+ var sc = stream.current();
32
+ if( sc.substr(sc.length-1,sc.length).match(/\?|\+/) !== null )stream.backUp(1);
33
+ return ret("tag", "tag");
34
+ } else if (ch == "%" || ch == "*" ) return ret("number", "number");
35
+ else {
36
+ stream.eatWhile(/[\w\\\-_%.{,]/);
37
+ return ret(null, null);
38
+ }
39
+ }
40
+
41
+ function tokenSGMLComment(stream, state) {
42
+ var dashes = 0, ch;
43
+ while ((ch = stream.next()) != null) {
44
+ if (dashes >= 2 && ch == ">") {
45
+ state.tokenize = tokenBase;
46
+ break;
47
+ }
48
+ dashes = (ch == "-") ? dashes + 1 : 0;
49
+ }
50
+ return ret("comment", "comment");
51
+ }
52
+
53
+ function tokenString(quote) {
54
+ return function(stream, state) {
55
+ var escaped = false, ch;
56
+ while ((ch = stream.next()) != null) {
57
+ if (ch == quote && !escaped) {
58
+ state.tokenize = tokenBase;
59
+ break;
60
+ }
61
+ escaped = !escaped && ch == "\\";
62
+ }
63
+ return ret("string", "tag");
64
+ };
65
+ }
66
+
67
+ function inBlock(style, terminator) {
68
+ return function(stream, state) {
69
+ while (!stream.eol()) {
70
+ if (stream.match(terminator)) {
71
+ state.tokenize = tokenBase;
72
+ break;
73
+ }
74
+ stream.next();
75
+ }
76
+ return style;
77
+ };
78
+ }
79
+
80
+ return {
81
+ startState: function(base) {
82
+ return {tokenize: tokenBase,
83
+ baseIndent: base || 0,
84
+ stack: []};
85
+ },
86
+
87
+ token: function(stream, state) {
88
+ if (stream.eatSpace()) return null;
89
+ var style = state.tokenize(stream, state);
90
+
91
+ var context = state.stack[state.stack.length-1];
92
+ if (stream.current() == "[" || type === "doindent" || type == "[") state.stack.push("rule");
93
+ else if (type === "endtag") state.stack[state.stack.length-1] = "endtag";
94
+ else if (stream.current() == "]" || type == "]" || (type == ">" && context == "rule")) state.stack.pop();
95
+ else if (type == "[") state.stack.push("[");
96
+ return style;
97
+ },
98
+
99
+ indent: function(state, textAfter) {
100
+ var n = state.stack.length;
101
+
102
+ if( textAfter.match(/\]\s+|\]/) )n=n-1;
103
+ else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){
104
+ if(textAfter.substr(0,1) === "<")n;
105
+ else if( type == "doindent" && textAfter.length > 1 )n;
106
+ else if( type == "doindent")n--;
107
+ else if( type == ">" && textAfter.length > 1)n;
108
+ else if( type == "tag" && textAfter !== ">")n;
109
+ else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--;
110
+ else if( type == "tag")n++;
111
+ else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--;
112
+ else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule")n;
113
+ else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1;
114
+ else if( textAfter === ">")n;
115
+ else n=n-1;
116
+ //over rule them all
117
+ if(type == null || type == "]")n--;
118
+ }
119
+
120
+ return state.baseIndent + n * indentUnit;
121
+ },
122
+
123
+ electricChars: "]>"
124
+ };
125
+ });
126
+
127
+ CodeMirror.defineMIME("application/xml-dtd", "dtd");
@@ -0,0 +1,89 @@
1
+ <!doctype html>
2
+
3
+ <title>CodeMirror: DTD mode</title>
4
+ <meta charset="utf-8"/>
5
+ <link rel=stylesheet href="../../doc/docs.css">
6
+
7
+ <link rel="stylesheet" href="../../lib/codemirror.css">
8
+ <script src="../../lib/codemirror.js"></script>
9
+ <script src="dtd.js"></script>
10
+ <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
11
+ <div id=nav>
12
+ <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
13
+
14
+ <ul>
15
+ <li><a href="../../index.html">Home</a>
16
+ <li><a href="../../doc/manual.html">Manual</a>
17
+ <li><a href="https://github.com/marijnh/codemirror">Code</a>
18
+ </ul>
19
+ <ul>
20
+ <li><a href="../index.html">Language modes</a>
21
+ <li><a class=active href="#">DTD</a>
22
+ </ul>
23
+ </div>
24
+
25
+ <article>
26
+ <h2>DTD mode</h2>
27
+ <form><textarea id="code" name="code"><?xml version="1.0" encoding="UTF-8"?>
28
+
29
+ <!ATTLIST title
30
+ xmlns CDATA #FIXED "http://docbook.org/ns/docbook"
31
+ role CDATA #IMPLIED
32
+ %db.common.attributes;
33
+ %db.common.linking.attributes;
34
+ >
35
+
36
+ <!--
37
+ Try: http://docbook.org/xml/5.0/dtd/docbook.dtd
38
+ -->
39
+
40
+ <!DOCTYPE xsl:stylesheet
41
+ [
42
+ <!ENTITY nbsp "&amp;#160;">
43
+ <!ENTITY copy "&amp;#169;">
44
+ <!ENTITY reg "&amp;#174;">
45
+ <!ENTITY trade "&amp;#8482;">
46
+ <!ENTITY mdash "&amp;#8212;">
47
+ <!ENTITY ldquo "&amp;#8220;">
48
+ <!ENTITY rdquo "&amp;#8221;">
49
+ <!ENTITY pound "&amp;#163;">
50
+ <!ENTITY yen "&amp;#165;">
51
+ <!ENTITY euro "&amp;#8364;">
52
+ <!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
53
+ ]
54
+ >
55
+
56
+ <!ELEMENT title (#PCDATA|inlinemediaobject|remark|superscript|subscript|xref|link|olink|anchor|biblioref|alt|annotation|indexterm|abbrev|acronym|date|emphasis|footnote|footnoteref|foreignphrase|phrase|quote|wordasword|firstterm|glossterm|coref|trademark|productnumber|productname|database|application|hardware|citation|citerefentry|citetitle|citebiblioid|author|person|personname|org|orgname|editor|jobtitle|replaceable|package|parameter|termdef|nonterminal|systemitem|option|optional|property|inlineequation|tag|markup|token|symbol|literal|code|constant|email|uri|guiicon|guibutton|guimenuitem|guimenu|guisubmenu|guilabel|menuchoice|mousebutton|keycombo|keycap|keycode|keysym|shortcut|accel|prompt|envar|filename|command|computeroutput|userinput|function|varname|returnvalue|type|classname|exceptionname|interfacename|methodname|modifier|initializer|ooclass|ooexception|oointerface|errorcode|errortext|errorname|errortype)*>
57
+
58
+ <!ENTITY % db.common.attributes "
59
+ xml:id ID #IMPLIED
60
+ version CDATA #IMPLIED
61
+ xml:lang CDATA #IMPLIED
62
+ xml:base CDATA #IMPLIED
63
+ remap CDATA #IMPLIED
64
+ xreflabel CDATA #IMPLIED
65
+ revisionflag (changed|added|deleted|off) #IMPLIED
66
+ dir (ltr|rtl|lro|rlo) #IMPLIED
67
+ arch CDATA #IMPLIED
68
+ audience CDATA #IMPLIED
69
+ condition CDATA #IMPLIED
70
+ conformance CDATA #IMPLIED
71
+ os CDATA #IMPLIED
72
+ revision CDATA #IMPLIED
73
+ security CDATA #IMPLIED
74
+ userlevel CDATA #IMPLIED
75
+ vendor CDATA #IMPLIED
76
+ wordsize CDATA #IMPLIED
77
+ annotations CDATA #IMPLIED
78
+
79
+ "></textarea></form>
80
+ <script>
81
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
82
+ mode: {name: "dtd", alignCDATA: true},
83
+ lineNumbers: true,
84
+ lineWrapping: true
85
+ });
86
+ </script>
87
+
88
+ <p><strong>MIME types defined:</strong> <code>application/xml-dtd</code>.</p>
89
+ </article>
@@ -0,0 +1,192 @@
1
+ CodeMirror.defineMode("ecl", function(config) {
2
+
3
+ function words(str) {
4
+ var obj = {}, words = str.split(" ");
5
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
6
+ return obj;
7
+ }
8
+
9
+ function metaHook(stream, state) {
10
+ if (!state.startOfLine) return false;
11
+ stream.skipToEnd();
12
+ return "meta";
13
+ }
14
+
15
+ var indentUnit = config.indentUnit;
16
+ var keyword = words("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode");
17
+ var variable = words("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait");
18
+ var variable_2 = words("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath");
19
+ var variable_3 = words("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode");
20
+ var builtin = words("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when");
21
+ var blockKeywords = words("catch class do else finally for if switch try while");
22
+ var atoms = words("true false null");
23
+ var hooks = {"#": metaHook};
24
+ var multiLineStrings;
25
+ var isOperatorChar = /[+\-*&%=<>!?|\/]/;
26
+
27
+ var curPunc;
28
+
29
+ function tokenBase(stream, state) {
30
+ var ch = stream.next();
31
+ if (hooks[ch]) {
32
+ var result = hooks[ch](stream, state);
33
+ if (result !== false) return result;
34
+ }
35
+ if (ch == '"' || ch == "'") {
36
+ state.tokenize = tokenString(ch);
37
+ return state.tokenize(stream, state);
38
+ }
39
+ if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
40
+ curPunc = ch;
41
+ return null;
42
+ }
43
+ if (/\d/.test(ch)) {
44
+ stream.eatWhile(/[\w\.]/);
45
+ return "number";
46
+ }
47
+ if (ch == "/") {
48
+ if (stream.eat("*")) {
49
+ state.tokenize = tokenComment;
50
+ return tokenComment(stream, state);
51
+ }
52
+ if (stream.eat("/")) {
53
+ stream.skipToEnd();
54
+ return "comment";
55
+ }
56
+ }
57
+ if (isOperatorChar.test(ch)) {
58
+ stream.eatWhile(isOperatorChar);
59
+ return "operator";
60
+ }
61
+ stream.eatWhile(/[\w\$_]/);
62
+ var cur = stream.current().toLowerCase();
63
+ if (keyword.propertyIsEnumerable(cur)) {
64
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
65
+ return "keyword";
66
+ } else if (variable.propertyIsEnumerable(cur)) {
67
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
68
+ return "variable";
69
+ } else if (variable_2.propertyIsEnumerable(cur)) {
70
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
71
+ return "variable-2";
72
+ } else if (variable_3.propertyIsEnumerable(cur)) {
73
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
74
+ return "variable-3";
75
+ } else if (builtin.propertyIsEnumerable(cur)) {
76
+ if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
77
+ return "builtin";
78
+ } else { //Data types are of from KEYWORD##
79
+ var i = cur.length - 1;
80
+ while(i >= 0 && (!isNaN(cur[i]) || cur[i] == '_'))
81
+ --i;
82
+
83
+ if (i > 0) {
84
+ var cur2 = cur.substr(0, i + 1);
85
+ if (variable_3.propertyIsEnumerable(cur2)) {
86
+ if (blockKeywords.propertyIsEnumerable(cur2)) curPunc = "newstatement";
87
+ return "variable-3";
88
+ }
89
+ }
90
+ }
91
+ if (atoms.propertyIsEnumerable(cur)) return "atom";
92
+ return null;
93
+ }
94
+
95
+ function tokenString(quote) {
96
+ return function(stream, state) {
97
+ var escaped = false, next, end = false;
98
+ while ((next = stream.next()) != null) {
99
+ if (next == quote && !escaped) {end = true; break;}
100
+ escaped = !escaped && next == "\\";
101
+ }
102
+ if (end || !(escaped || multiLineStrings))
103
+ state.tokenize = tokenBase;
104
+ return "string";
105
+ };
106
+ }
107
+
108
+ function tokenComment(stream, state) {
109
+ var maybeEnd = false, ch;
110
+ while (ch = stream.next()) {
111
+ if (ch == "/" && maybeEnd) {
112
+ state.tokenize = tokenBase;
113
+ break;
114
+ }
115
+ maybeEnd = (ch == "*");
116
+ }
117
+ return "comment";
118
+ }
119
+
120
+ function Context(indented, column, type, align, prev) {
121
+ this.indented = indented;
122
+ this.column = column;
123
+ this.type = type;
124
+ this.align = align;
125
+ this.prev = prev;
126
+ }
127
+ function pushContext(state, col, type) {
128
+ return state.context = new Context(state.indented, col, type, null, state.context);
129
+ }
130
+ function popContext(state) {
131
+ var t = state.context.type;
132
+ if (t == ")" || t == "]" || t == "}")
133
+ state.indented = state.context.indented;
134
+ return state.context = state.context.prev;
135
+ }
136
+
137
+ // Interface
138
+
139
+ return {
140
+ startState: function(basecolumn) {
141
+ return {
142
+ tokenize: null,
143
+ context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
144
+ indented: 0,
145
+ startOfLine: true
146
+ };
147
+ },
148
+
149
+ token: function(stream, state) {
150
+ var ctx = state.context;
151
+ if (stream.sol()) {
152
+ if (ctx.align == null) ctx.align = false;
153
+ state.indented = stream.indentation();
154
+ state.startOfLine = true;
155
+ }
156
+ if (stream.eatSpace()) return null;
157
+ curPunc = null;
158
+ var style = (state.tokenize || tokenBase)(stream, state);
159
+ if (style == "comment" || style == "meta") return style;
160
+ if (ctx.align == null) ctx.align = true;
161
+
162
+ if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
163
+ else if (curPunc == "{") pushContext(state, stream.column(), "}");
164
+ else if (curPunc == "[") pushContext(state, stream.column(), "]");
165
+ else if (curPunc == "(") pushContext(state, stream.column(), ")");
166
+ else if (curPunc == "}") {
167
+ while (ctx.type == "statement") ctx = popContext(state);
168
+ if (ctx.type == "}") ctx = popContext(state);
169
+ while (ctx.type == "statement") ctx = popContext(state);
170
+ }
171
+ else if (curPunc == ctx.type) popContext(state);
172
+ else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
173
+ pushContext(state, stream.column(), "statement");
174
+ state.startOfLine = false;
175
+ return style;
176
+ },
177
+
178
+ indent: function(state, textAfter) {
179
+ if (state.tokenize != tokenBase && state.tokenize != null) return 0;
180
+ var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
181
+ if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
182
+ var closing = firstChar == ctx.type;
183
+ if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit);
184
+ else if (ctx.align) return ctx.column + (closing ? 0 : 1);
185
+ else return ctx.indented + (closing ? 0 : indentUnit);
186
+ },
187
+
188
+ electricChars: "{}"
189
+ };
190
+ });
191
+
192
+ CodeMirror.defineMIME("text/x-ecl", "ecl");