From e95ae00e8329a7721bfdb9232bd2c7a8a35d4dd7 Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Sat, 21 Oct 2017 20:37:38 -0700 Subject: [PATCH] Initial commit --- .gitignore | 1 + .travis.yml | 9 + Gopkg.lock | 27 + Gopkg.toml | 3 + Makefile | 44 + README.md | 37 + main.go | 154 + .../github.com/alecthomas/chroma/.gitignore | 16 + .../alecthomas/chroma/.goreleaser.yml | 31 + .../github.com/alecthomas/chroma/.travis.yml | 5 + vendor/github.com/alecthomas/chroma/COPYING | 19 + vendor/github.com/alecthomas/chroma/README.md | 207 + .../github.com/alecthomas/chroma/coalesce.go | 32 + .../alecthomas/chroma/coalesce_test.go | 19 + vendor/github.com/alecthomas/chroma/colour.go | 153 + .../alecthomas/chroma/colour_test.go | 42 + vendor/github.com/alecthomas/chroma/doc.go | 7 + .../github.com/alecthomas/chroma/formatter.go | 43 + .../alecthomas/chroma/formatters/api.go | 55 + .../alecthomas/chroma/formatters/html/html.go | 386 + .../chroma/formatters/html/html_test.go | 60 + .../alecthomas/chroma/formatters/tokens.go | 18 + .../chroma/formatters/tty_indexed.go | 250 + .../chroma/formatters/tty_truecolour.go | 38 + .../github.com/alecthomas/chroma/iterator.go | 43 + vendor/github.com/alecthomas/chroma/lexer.go | 112 + .../alecthomas/chroma/lexer_test.go | 52 + .../alecthomas/chroma/lexers/abnf.go | 37 + .../alecthomas/chroma/lexers/actionscript.go | 38 + .../alecthomas/chroma/lexers/actionscript3.go | 55 + .../alecthomas/chroma/lexers/ada.go | 113 + .../alecthomas/chroma/lexers/angular2.go | 41 + .../alecthomas/chroma/lexers/antlr.go | 100 + .../alecthomas/chroma/lexers/apache.go | 37 + .../alecthomas/chroma/lexers/api.go | 116 + .../alecthomas/chroma/lexers/api_test.go | 21 + .../alecthomas/chroma/lexers/apl.go | 35 + .../alecthomas/chroma/lexers/applescript.go | 54 + .../alecthomas/chroma/lexers/awk.go | 47 + .../alecthomas/chroma/lexers/bash.go | 94 + .../alecthomas/chroma/lexers/batch.go | 193 + .../alecthomas/chroma/lexers/blitz.go | 47 + .../alecthomas/chroma/lexers/bnf.go | 23 + .../alecthomas/chroma/lexers/brainfuck.go | 33 + .../github.com/alecthomas/chroma/lexers/c.go | 90 + .../alecthomas/chroma/lexers/capnproto.go | 60 + .../alecthomas/chroma/lexers/ceylon.go | 62 + .../alecthomas/chroma/lexers/cfengine3.go | 55 + .../alecthomas/chroma/lexers/chaiscript.go | 62 + .../alecthomas/chroma/lexers/cheetah.go | 35 + .../github.com/alecthomas/chroma/lexers/cl.go | 73 + .../alecthomas/chroma/lexers/clojure.go | 37 + .../alecthomas/chroma/lexers/cmake.go | 43 + .../alecthomas/chroma/lexers/cobol.go | 50 + .../alecthomas/chroma/lexers/coffee.go | 90 + .../alecthomas/chroma/lexers/coldfusion.go | 47 + .../alecthomas/chroma/lexers/coq.go | 62 + .../alecthomas/chroma/lexers/cpp.go | 101 + .../alecthomas/chroma/lexers/crystal.go | 261 + .../alecthomas/chroma/lexers/csharp.go | 49 + .../alecthomas/chroma/lexers/css.go | 106 + .../alecthomas/chroma/lexers/cython.go | 134 + .../alecthomas/chroma/lexers/dart.go | 90 + .../alecthomas/chroma/lexers/diff.go | 27 + .../alecthomas/chroma/lexers/django.go | 52 + .../alecthomas/chroma/lexers/docker.go | 25 + .../alecthomas/chroma/lexers/dtd.go | 68 + .../alecthomas/chroma/lexers/ebnf.go | 50 + .../alecthomas/chroma/lexers/elixir.go | 269 + .../alecthomas/chroma/lexers/elm.go | 58 + .../alecthomas/chroma/lexers/emacs.go | 581 ++ .../alecthomas/chroma/lexers/erlang.go | 65 + .../alecthomas/chroma/lexers/factor.go | 114 + .../alecthomas/chroma/lexers/fish.go | 64 + .../alecthomas/chroma/lexers/forth.go | 39 + .../alecthomas/chroma/lexers/fortran.go | 46 + .../alecthomas/chroma/lexers/fsharp.go | 93 + .../alecthomas/chroma/lexers/gas.go | 54 + .../alecthomas/chroma/lexers/gdscript.go | 123 + .../alecthomas/chroma/lexers/genshi.go | 112 + .../alecthomas/chroma/lexers/glsl.go | 36 + .../alecthomas/chroma/lexers/gnuplot.go | 116 + .../github.com/alecthomas/chroma/lexers/go.go | 55 + .../alecthomas/chroma/lexers/groovy.go | 57 + .../alecthomas/chroma/lexers/handlebars.go | 55 + .../alecthomas/chroma/lexers/haskell.go | 98 + .../alecthomas/chroma/lexers/haxe.go | 640 ++ .../alecthomas/chroma/lexers/hexdump.go | 66 + .../alecthomas/chroma/lexers/html.go | 56 + .../github.com/alecthomas/chroma/lexers/hy.go | 50 + .../alecthomas/chroma/lexers/idris.go | 79 + .../alecthomas/chroma/lexers/ini.go | 24 + .../github.com/alecthomas/chroma/lexers/io.go | 39 + .../alecthomas/chroma/lexers/java.go | 50 + .../alecthomas/chroma/lexers/javascript.go | 68 + .../alecthomas/chroma/lexers/json.go | 54 + .../alecthomas/chroma/lexers/julia.go | 93 + .../alecthomas/chroma/lexers/kotlin.go | 52 + .../chroma/lexers/lexer_benchmark_test.go | 37 + .../alecthomas/chroma/lexers/lighttpd.go | 29 + .../alecthomas/chroma/lexers/llvm.go | 42 + .../alecthomas/chroma/lexers/lua.go | 74 + .../alecthomas/chroma/lexers/make.go | 52 + .../alecthomas/chroma/lexers/mako.go | 58 + .../alecthomas/chroma/lexers/markdown.go | 62 + .../alecthomas/chroma/lexers/mason.go | 39 + .../alecthomas/chroma/lexers/mathematica.go | 31 + .../alecthomas/chroma/lexers/minizinc.go | 40 + .../alecthomas/chroma/lexers/modula2.go | 114 + .../alecthomas/chroma/lexers/mwscript.go | 52 + .../alecthomas/chroma/lexers/myghty.go | 38 + .../alecthomas/chroma/lexers/mysql.go | 44 + .../alecthomas/chroma/lexers/nasm.go | 58 + .../alecthomas/chroma/lexers/newspeak.go | 54 + .../alecthomas/chroma/lexers/nginx.go | 46 + .../alecthomas/chroma/lexers/nim.go | 90 + .../alecthomas/chroma/lexers/nix.go | 121 + .../alecthomas/chroma/lexers/ocaml.go | 65 + .../alecthomas/chroma/lexers/octave.go | 45 + .../alecthomas/chroma/lexers/pacman.go | 25 + .../alecthomas/chroma/lexers/perl.go | 137 + .../alecthomas/chroma/lexers/php.go | 81 + .../alecthomas/chroma/lexers/pig.go | 56 + .../alecthomas/chroma/lexers/pkgconfig.go | 40 + .../alecthomas/chroma/lexers/plsql.go | 57 + .../alecthomas/chroma/lexers/postgres.go | 53 + .../alecthomas/chroma/lexers/postscript.go | 45 + .../alecthomas/chroma/lexers/povray.go | 34 + .../alecthomas/chroma/lexers/powershell.go | 63 + .../alecthomas/chroma/lexers/prolog.go | 50 + .../alecthomas/chroma/lexers/protobuf.go | 52 + .../alecthomas/chroma/lexers/puppet.go | 55 + .../alecthomas/chroma/lexers/python.go | 136 + .../alecthomas/chroma/lexers/python3.go | 134 + .../alecthomas/chroma/lexers/qbasic.go | 66 + .../github.com/alecthomas/chroma/lexers/r.go | 69 + .../alecthomas/chroma/lexers/racket.go | 101 + .../alecthomas/chroma/lexers/ragel.go | 75 + .../alecthomas/chroma/lexers/regedit.go | 31 + .../alecthomas/chroma/lexers/rexx.go | 58 + .../alecthomas/chroma/lexers/rst.go | 85 + .../alecthomas/chroma/lexers/ruby.go | 249 + .../alecthomas/chroma/lexers/rust.go | 132 + .../alecthomas/chroma/lexers/sass.go | 143 + .../alecthomas/chroma/lexers/scala.go | 102 + .../alecthomas/chroma/lexers/scheme.go | 52 + .../alecthomas/chroma/lexers/scilab.go | 43 + .../alecthomas/chroma/lexers/smalltalk.go | 98 + .../alecthomas/chroma/lexers/smarty.go | 38 + .../alecthomas/chroma/lexers/snobol.go | 47 + .../alecthomas/chroma/lexers/sparql.go | 68 + .../alecthomas/chroma/lexers/sql.go | 38 + .../alecthomas/chroma/lexers/squid.go | 37 + .../alecthomas/chroma/lexers/swift.go | 86 + .../alecthomas/chroma/lexers/systemverilog.go | 71 + .../alecthomas/chroma/lexers/tasm.go | 60 + .../alecthomas/chroma/lexers/tcl.go | 115 + .../alecthomas/chroma/lexers/tcsh.go | 58 + .../alecthomas/chroma/lexers/termcap.go | 41 + .../alecthomas/chroma/lexers/terminfo.go | 41 + .../alecthomas/chroma/lexers/terraform.go | 68 + .../alecthomas/chroma/lexers/thrift.go | 72 + .../alecthomas/chroma/lexers/toml.go | 28 + .../alecthomas/chroma/lexers/transactsql.go | 49 + .../alecthomas/chroma/lexers/turtle.go | 66 + .../alecthomas/chroma/lexers/twig.go | 53 + .../alecthomas/chroma/lexers/typescript.go | 71 + .../alecthomas/chroma/lexers/typoscript.go | 124 + .../alecthomas/chroma/lexers/verilog.go | 67 + .../alecthomas/chroma/lexers/vhdl.go | 65 + .../alecthomas/chroma/lexers/vim.go | 35 + .../alecthomas/chroma/lexers/wdte.go | 28 + .../alecthomas/chroma/lexers/xml.go | 44 + .../alecthomas/chroma/lexers/xorg.go | 24 + .../alecthomas/chroma/lexers/yaml.go | 38 + .../github.com/alecthomas/chroma/mutators.go | 122 + .../alecthomas/chroma/mutators_test.go | 57 + .../alecthomas/chroma/pygments-lexers.txt | 325 + vendor/github.com/alecthomas/chroma/regexp.go | 328 + .../alecthomas/chroma/regexp_test.go | 27 + vendor/github.com/alecthomas/chroma/remap.go | 74 + .../alecthomas/chroma/remap_test.go | 29 + vendor/github.com/alecthomas/chroma/style.go | 315 + .../alecthomas/chroma/style_test.go | 37 + .../alecthomas/chroma/styles/abap.go | 18 + .../alecthomas/chroma/styles/algol.go | 25 + .../alecthomas/chroma/styles/algol_nu.go | 25 + .../alecthomas/chroma/styles/api.go | 37 + .../alecthomas/chroma/styles/arduino.go | 25 + .../alecthomas/chroma/styles/autumn.go | 42 + .../alecthomas/chroma/styles/borland.go | 32 + .../github.com/alecthomas/chroma/styles/bw.go | 30 + .../alecthomas/chroma/styles/colorful.go | 58 + .../alecthomas/chroma/styles/dracula.go | 80 + .../alecthomas/chroma/styles/emacs.go | 50 + .../alecthomas/chroma/styles/friendly.go | 50 + .../alecthomas/chroma/styles/fruity.go | 26 + .../alecthomas/chroma/styles/github.go | 50 + .../alecthomas/chroma/styles/igor.go | 16 + .../alecthomas/chroma/styles/lovelace.go | 59 + .../alecthomas/chroma/styles/manni.go | 50 + .../alecthomas/chroma/styles/monokai.go | 36 + .../alecthomas/chroma/styles/monokailight.go | 33 + .../alecthomas/chroma/styles/murphy.go | 58 + .../alecthomas/chroma/styles/native.go | 41 + .../alecthomas/chroma/styles/paraiso-dark.go | 44 + .../alecthomas/chroma/styles/paraiso-light.go | 44 + .../alecthomas/chroma/styles/pastie.go | 51 + .../alecthomas/chroma/styles/perldoc.go | 43 + .../alecthomas/chroma/styles/pygments.go | 54 + .../alecthomas/chroma/styles/rainbow_dash.go | 46 + .../alecthomas/chroma/styles/rrt.go | 18 + .../alecthomas/chroma/styles/swapoff.go | 25 + .../alecthomas/chroma/styles/tango.go | 78 + .../alecthomas/chroma/styles/trac.go | 41 + .../alecthomas/chroma/styles/vim.go | 35 + .../github.com/alecthomas/chroma/styles/vs.go | 23 + .../alecthomas/chroma/styles/xcode.go | 29 + .../alecthomas/chroma/tokentype_string.go | 111 + vendor/github.com/alecthomas/chroma/types.go | 323 + .../danwakefield/fnmatch/.gitignore | 24 + .../github.com/danwakefield/fnmatch/LICENSE | 23 + .../github.com/danwakefield/fnmatch/README.md | 4 + .../danwakefield/fnmatch/fnmatch.go | 219 + .../danwakefield/fnmatch/fnmatch_test.go | 351 + vendor/github.com/dlclark/regexp2/.gitignore | 25 + vendor/github.com/dlclark/regexp2/.travis.yml | 5 + vendor/github.com/dlclark/regexp2/ATTRIB | 133 + vendor/github.com/dlclark/regexp2/LICENSE | 21 + vendor/github.com/dlclark/regexp2/README.md | 67 + vendor/github.com/dlclark/regexp2/match.go | 347 + vendor/github.com/dlclark/regexp2/regexp.go | 357 + .../dlclark/regexp2/regexp_mono_test.go | 1081 +++ .../dlclark/regexp2/regexp_options_test.go | 43 + .../dlclark/regexp2/regexp_pcre_test.go | 409 + .../regexp2/regexp_performance_test.go | 307 + .../github.com/dlclark/regexp2/regexp_test.go | 915 +++ vendor/github.com/dlclark/regexp2/replace.go | 177 + .../dlclark/regexp2/replace_test.go | 172 + vendor/github.com/dlclark/regexp2/rtl_test.go | 52 + vendor/github.com/dlclark/regexp2/runner.go | 1621 ++++ .../dlclark/regexp2/syntax/charclass.go | 784 ++ .../github.com/dlclark/regexp2/syntax/code.go | 274 + .../dlclark/regexp2/syntax/escape.go | 94 + .../github.com/dlclark/regexp2/syntax/fuzz.go | 20 + .../dlclark/regexp2/syntax/parser.go | 2125 +++++ .../dlclark/regexp2/syntax/prefix.go | 896 +++ .../dlclark/regexp2/syntax/replacerdata.go | 87 + .../github.com/dlclark/regexp2/syntax/tree.go | 654 ++ .../dlclark/regexp2/syntax/writer.go | 500 ++ vendor/github.com/dlclark/regexp2/testoutput1 | 7061 +++++++++++++++++ 251 files changed, 34995 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 Gopkg.lock create mode 100644 Gopkg.toml create mode 100644 Makefile create mode 100644 README.md create mode 100644 main.go create mode 100644 vendor/github.com/alecthomas/chroma/.gitignore create mode 100644 vendor/github.com/alecthomas/chroma/.goreleaser.yml create mode 100644 vendor/github.com/alecthomas/chroma/.travis.yml create mode 100644 vendor/github.com/alecthomas/chroma/COPYING create mode 100644 vendor/github.com/alecthomas/chroma/README.md create mode 100644 vendor/github.com/alecthomas/chroma/coalesce.go create mode 100644 vendor/github.com/alecthomas/chroma/coalesce_test.go create mode 100644 vendor/github.com/alecthomas/chroma/colour.go create mode 100644 vendor/github.com/alecthomas/chroma/colour_test.go create mode 100644 vendor/github.com/alecthomas/chroma/doc.go create mode 100644 vendor/github.com/alecthomas/chroma/formatter.go create mode 100644 vendor/github.com/alecthomas/chroma/formatters/api.go create mode 100644 vendor/github.com/alecthomas/chroma/formatters/html/html.go create mode 100644 vendor/github.com/alecthomas/chroma/formatters/html/html_test.go create mode 100644 vendor/github.com/alecthomas/chroma/formatters/tokens.go create mode 100644 vendor/github.com/alecthomas/chroma/formatters/tty_indexed.go create mode 100644 vendor/github.com/alecthomas/chroma/formatters/tty_truecolour.go create mode 100644 vendor/github.com/alecthomas/chroma/iterator.go create mode 100644 vendor/github.com/alecthomas/chroma/lexer.go create mode 100644 vendor/github.com/alecthomas/chroma/lexer_test.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/abnf.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/actionscript.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/actionscript3.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/ada.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/angular2.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/antlr.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/apache.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/api.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/api_test.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/apl.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/applescript.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/awk.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/bash.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/batch.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/blitz.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/bnf.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/brainfuck.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/c.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/capnproto.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/ceylon.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/cfengine3.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/chaiscript.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/cheetah.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/cl.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/clojure.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/cmake.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/cobol.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/coffee.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/coldfusion.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/coq.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/cpp.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/crystal.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/csharp.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/css.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/cython.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/dart.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/diff.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/django.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/docker.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/dtd.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/ebnf.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/elixir.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/elm.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/emacs.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/erlang.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/factor.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/fish.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/forth.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/fortran.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/fsharp.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/gas.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/gdscript.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/genshi.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/glsl.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/gnuplot.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/go.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/groovy.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/handlebars.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/haskell.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/haxe.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/hexdump.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/html.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/hy.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/idris.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/ini.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/io.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/java.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/javascript.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/json.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/julia.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/kotlin.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/lexer_benchmark_test.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/lighttpd.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/llvm.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/lua.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/make.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/mako.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/markdown.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/mason.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/mathematica.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/minizinc.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/modula2.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/mwscript.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/myghty.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/mysql.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/nasm.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/newspeak.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/nginx.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/nim.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/nix.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/ocaml.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/octave.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/pacman.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/perl.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/php.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/pig.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/pkgconfig.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/plsql.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/postgres.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/postscript.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/povray.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/powershell.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/prolog.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/protobuf.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/puppet.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/python.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/python3.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/qbasic.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/r.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/racket.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/ragel.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/regedit.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/rexx.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/rst.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/ruby.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/rust.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/sass.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/scala.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/scheme.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/scilab.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/smalltalk.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/smarty.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/snobol.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/sparql.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/sql.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/squid.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/swift.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/systemverilog.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/tasm.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/tcl.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/tcsh.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/termcap.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/terminfo.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/terraform.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/thrift.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/toml.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/transactsql.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/turtle.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/twig.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/typescript.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/typoscript.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/verilog.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/vhdl.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/vim.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/wdte.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/xml.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/xorg.go create mode 100644 vendor/github.com/alecthomas/chroma/lexers/yaml.go create mode 100644 vendor/github.com/alecthomas/chroma/mutators.go create mode 100644 vendor/github.com/alecthomas/chroma/mutators_test.go create mode 100644 vendor/github.com/alecthomas/chroma/pygments-lexers.txt create mode 100644 vendor/github.com/alecthomas/chroma/regexp.go create mode 100644 vendor/github.com/alecthomas/chroma/regexp_test.go create mode 100644 vendor/github.com/alecthomas/chroma/remap.go create mode 100644 vendor/github.com/alecthomas/chroma/remap_test.go create mode 100644 vendor/github.com/alecthomas/chroma/style.go create mode 100644 vendor/github.com/alecthomas/chroma/style_test.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/abap.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/algol.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/algol_nu.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/api.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/arduino.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/autumn.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/borland.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/bw.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/colorful.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/dracula.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/emacs.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/friendly.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/fruity.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/github.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/igor.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/lovelace.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/manni.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/monokai.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/monokailight.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/murphy.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/native.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/paraiso-dark.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/paraiso-light.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/pastie.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/perldoc.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/pygments.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/rainbow_dash.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/rrt.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/swapoff.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/tango.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/trac.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/vim.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/vs.go create mode 100644 vendor/github.com/alecthomas/chroma/styles/xcode.go create mode 100644 vendor/github.com/alecthomas/chroma/tokentype_string.go create mode 100644 vendor/github.com/alecthomas/chroma/types.go create mode 100644 vendor/github.com/danwakefield/fnmatch/.gitignore create mode 100644 vendor/github.com/danwakefield/fnmatch/LICENSE create mode 100644 vendor/github.com/danwakefield/fnmatch/README.md create mode 100644 vendor/github.com/danwakefield/fnmatch/fnmatch.go create mode 100644 vendor/github.com/danwakefield/fnmatch/fnmatch_test.go create mode 100644 vendor/github.com/dlclark/regexp2/.gitignore create mode 100644 vendor/github.com/dlclark/regexp2/.travis.yml create mode 100644 vendor/github.com/dlclark/regexp2/ATTRIB create mode 100644 vendor/github.com/dlclark/regexp2/LICENSE create mode 100644 vendor/github.com/dlclark/regexp2/README.md create mode 100644 vendor/github.com/dlclark/regexp2/match.go create mode 100644 vendor/github.com/dlclark/regexp2/regexp.go create mode 100644 vendor/github.com/dlclark/regexp2/regexp_mono_test.go create mode 100644 vendor/github.com/dlclark/regexp2/regexp_options_test.go create mode 100644 vendor/github.com/dlclark/regexp2/regexp_pcre_test.go create mode 100644 vendor/github.com/dlclark/regexp2/regexp_performance_test.go create mode 100644 vendor/github.com/dlclark/regexp2/regexp_test.go create mode 100644 vendor/github.com/dlclark/regexp2/replace.go create mode 100644 vendor/github.com/dlclark/regexp2/replace_test.go create mode 100644 vendor/github.com/dlclark/regexp2/rtl_test.go create mode 100644 vendor/github.com/dlclark/regexp2/runner.go create mode 100644 vendor/github.com/dlclark/regexp2/syntax/charclass.go create mode 100644 vendor/github.com/dlclark/regexp2/syntax/code.go create mode 100644 vendor/github.com/dlclark/regexp2/syntax/escape.go create mode 100644 vendor/github.com/dlclark/regexp2/syntax/fuzz.go create mode 100644 vendor/github.com/dlclark/regexp2/syntax/parser.go create mode 100644 vendor/github.com/dlclark/regexp2/syntax/prefix.go create mode 100644 vendor/github.com/dlclark/regexp2/syntax/replacerdata.go create mode 100644 vendor/github.com/dlclark/regexp2/syntax/tree.go create mode 100644 vendor/github.com/dlclark/regexp2/syntax/writer.go create mode 100644 vendor/github.com/dlclark/regexp2/testoutput1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91f7990 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/*.md diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4b206a9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: go +go_import_path: github.com/kevinburke/chroma-markdown + +go: + - 1.8.x + - 1.9.x + - master + +script: make test diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..cb69381 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,27 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + branch = "master" + name = "github.com/alecthomas/chroma" + packages = [".","formatters/html","lexers","styles"] + revision = "03b0c0d6bb7b9f7f8fd58fca6f1c6a2caffb9ca8" + +[[projects]] + branch = "master" + name = "github.com/danwakefield/fnmatch" + packages = ["."] + revision = "cbb64ac3d964b81592e64f957ad53df015803288" + +[[projects]] + name = "github.com/dlclark/regexp2" + packages = [".","syntax"] + revision = "487489b64fb796de2e55f4e8a4ad1e145f80e957" + version = "v1.1.6" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "f31184a55e50f445537c2f983f07a94468ddd049e1c6bc5c3dd81fcc0f954e14" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..8765dcc --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,3 @@ +[[constraint]] + name = "github.com/alecthomas/chroma" + branch = "master" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..419a64f --- /dev/null +++ b/Makefile @@ -0,0 +1,44 @@ +MEGACHECK := $(GOPATH)/bin/megacheck +RELEASE := $(GOPATH)/bin/github-release + +UNAME := $(shell uname) + +$(MEGACHECK): +ifeq ($(UNAME), Darwin) + curl --silent --location --output $(MEGACHECK) https://github.com/kevinburke/go-tools/releases/download/2017-10-04/megacheck-darwin-amd64 +endif +ifeq ($(UNAME), Linux) + curl --silent --location --output $(MEGACHECK) https://github.com/kevinburke/go-tools/releases/download/2017-10-04/megacheck-linux-amd64 +endif + chmod 755 $(MEGACHECK) + +vet: $(MEGACHECK) + go list ./... | grep -v vendor | xargs go vet + go list ./... | grep -v vendor | xargs $(MEGACHECK) + +test: vet + go list ./... | grep -v vendor | xargs go test + +$(RELEASE): test + go get -u github.com/aktau/github-release + +release: $(RELEASE) +ifndef version + @echo "Please provide a version" + exit 1 +endif +ifndef GITHUB_TOKEN + @echo "Please set GITHUB_TOKEN in the environment" + exit 1 +endif + git tag $(version) + git push origin --tags + mkdir -p releases/$(version) + GOOS=linux GOARCH=amd64 go build -o releases/$(version)/chroma-markdown-linux-amd64 . + GOOS=darwin GOARCH=amd64 go build -o releases/$(version)/chroma-markdown-darwin-amd64 . + GOOS=windows GOARCH=amd64 go build -o releases/$(version)/chroma-markdown-windows-amd64 . + # these commands are not idempotent so ignore failures if an upload repeats + $(RELEASE) release --user kevinburke --repo chroma-markdown --tag $(version) || true + $(RELEASE) upload --user kevinburke --repo chroma-markdown --tag $(version) --name chroma-markdown-linux-amd64 --file releases/$(version)/chroma-markdown-linux-amd64 || true + $(RELEASE) upload --user kevinburke --repo chroma-markdown --tag $(version) --name chroma-markdown-darwin-amd64 --file releases/$(version)/chroma-markdown-darwin-amd64 || true + $(RELEASE) upload --user kevinburke --repo chroma-markdown --tag $(version) --name chroma-markdown-windows-amd64 --file releases/$(version)/chroma-markdown-windows-amd64 || true diff --git a/README.md b/README.md new file mode 100644 index 0000000..bf884dd --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# chroma-markdown + +This binary compiles Markdown files into HTML. In particular, code blocks of the +following format: + +

+```go
+fmt.Println("hello world")
+```
+
+ +Will be parsed and compiled to HTML using [`chroma`, a tool for generating +syntax highlights][chroma]. The rest of the file will be compiled from markdown +to HTML. + +Input can be sent either on standard input or by specifying a filename at the +command line. All outputs are printed to standard output, where they can be +redirected to a file: + +```html +cat index.md | chroma-markdown > output.html +``` + +#### Why? + +You can use this with content management systems that want you to use an HTML +editor, like WordPress. There are tools that do Markdown compilation and tools +that do syntax highlighting but few that do both. + +## Requirements + +This requires either Commonmark (cmark) or Markdown (markdown) binaries to be +present on your `$PATH`. The Go markdown renderer has [a critical error][error] +that prevents in-memory Markdown compilation. + +[error]: https://github.com/russross/blackfriday/issues/403 +[chroma]: https://github.com/alecthomas/chroma diff --git a/main.go b/main.go new file mode 100644 index 0000000..2ab4680 --- /dev/null +++ b/main.go @@ -0,0 +1,154 @@ +package main + +import ( + "bufio" + "bytes" + "flag" + "fmt" + "io" + "io/ioutil" + "os" + "os/exec" + "strings" + "syscall" + + "github.com/alecthomas/chroma" + "github.com/alecthomas/chroma/formatters/html" + "github.com/alecthomas/chroma/lexers" + "github.com/alecthomas/chroma/styles" +) + +// dataPipedIn returns true if the user piped data via stdin. +func dataPipedIn() bool { + stat, err := os.Stdin.Stat() + if err != nil { + return false + } + return (stat.Mode() & os.ModeCharDevice) == 0 +} + +func checkError(err error, msg string) { + if err != nil { + if msg != "" { + fmt.Fprintf(os.Stderr, "Error %s: %v\n", msg, err) + } else { + fmt.Fprintf(os.Stderr, "Encountered an error: %v", err) + } + os.Exit(2) + } +} + +func init() { + flag.Usage = func() { + os.Stderr.WriteString(`usage: chroma-markdown [markdown-file] + +`) + flag.PrintDefaults() + } +} + +func highlight(w io.Writer, source, lexer, style string) error { + // Determine lexer. + l := lexers.Get(lexer) + if l == nil { + l = lexers.Analyse(source) + } + if l == nil { + l = lexers.Fallback + } + l = chroma.Coalesce(l) + + // Determine formatter. + f := html.New(html.WithClasses(), html.TabWidth(4)) + + // Determine style. + s := styles.Get(style) + if s == nil { + s = styles.Fallback + } + + it, err := l.Tokenise(nil, source) + if err != nil { + return err + } + return f.Format(w, s, it) +} + +const Version = "0.0" + +func main() { + css := flag.String("css", "", "Path to a CSS import to include at the beginning of the output") + style := flag.String("style", "native", "CSS style to use") + version := flag.Bool("version", false, "Print the version string") + v := flag.Bool("v", false, "Print the version string") + flag.Parse() + if *version || *v { + fmt.Printf("chroma-markdown version %s\n", Version) + os.Exit(2) + } + var r io.Reader + if dataPipedIn() { + r = os.Stdin + } else { + if flag.NArg() != 1 { + flag.Usage() + } + file := flag.Arg(0) + f, err := os.Open(file) + checkError(err, "opening file") + defer f.Close() + r = bufio.NewReader(f) + } + out := new(bytes.Buffer) + currentCodeBlock := new(bytes.Buffer) + started := false + bs := bufio.NewScanner(r) + lang := "" + needCSS := false + for bs.Scan() { + text := bs.Text() + trimmed := strings.TrimSpace(text) + if strings.HasPrefix(trimmed, "```") { + if started { + // TODO: compile the code block to markdown + quickErr := highlight(out, currentCodeBlock.String(), lang, *style) + checkError(quickErr, "highlighting source code") + started = false + currentCodeBlock.Reset() + lang = "" + needCSS = true + continue + } + lang = trimmed[3:] + started = true + continue + } + if started { + currentCodeBlock.WriteString(text) + currentCodeBlock.WriteByte('\n') + } else { + out.WriteString(text) + out.WriteByte('\n') + } + } + checkError(bs.Err(), "reading markdown file") + _ = needCSS + f, err := ioutil.TempFile("", "chroma-markdown-") + checkError(err, "creating temporary file") + w := bufio.NewWriter(f) + if needCSS && *css != "" { + _, writeErr := fmt.Fprintf(w, `\n`, *css) + checkError(writeErr, "writing data to temporary file") + } + _, writeErr := f.Write(out.Bytes()) + checkError(writeErr, "writing data to temporary file") + // shell out to markdown because of + // https://github.com/russross/blackfriday/issues/403 + cmark, lookErr := exec.LookPath("cmark") + if lookErr != nil { + cmark, lookErr = exec.LookPath("markdown") + checkError(lookErr, "finding markdown binary") + } + execErr := syscall.Exec(cmark, []string{cmark, f.Name()}, []string{}) + checkError(execErr, "executing markdown binary") +} diff --git a/vendor/github.com/alecthomas/chroma/.gitignore b/vendor/github.com/alecthomas/chroma/.gitignore new file mode 100644 index 0000000..fb777d7 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/.gitignore @@ -0,0 +1,16 @@ +# Binaries for programs and plugins +*.exe +*.dll +*.so +*.dylib + +# Test binary, build with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 +.glide/ + +_models/ diff --git a/vendor/github.com/alecthomas/chroma/.goreleaser.yml b/vendor/github.com/alecthomas/chroma/.goreleaser.yml new file mode 100644 index 0000000..e90c511 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/.goreleaser.yml @@ -0,0 +1,31 @@ +project_name: chroma +release: + github: + owner: alecthomas + name: chroma +brew: + install: bin.install "chroma" +builds: +- goos: + - linux + - darwin + - windows + goarch: + - amd64 + - "386" + goarm: + - "6" + main: ./cmd/chroma/main.go + ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} + binary: chroma +archive: + format: tar.gz + name_template: '{{ .Binary }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ + .Arm }}{{ end }}' + files: + - COPYING + - README* +snapshot: + name_template: SNAPSHOT-{{ .Commit }} +checksum: + name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt' diff --git a/vendor/github.com/alecthomas/chroma/.travis.yml b/vendor/github.com/alecthomas/chroma/.travis.yml new file mode 100644 index 0000000..3e27eb3 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/.travis.yml @@ -0,0 +1,5 @@ +sudo: false +language: go +after_success: + go get github.com/goreleaser/goreleaser && goreleaser + diff --git a/vendor/github.com/alecthomas/chroma/COPYING b/vendor/github.com/alecthomas/chroma/COPYING new file mode 100644 index 0000000..92dc39f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/COPYING @@ -0,0 +1,19 @@ +Copyright (C) 2017 Alec Thomas + +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. diff --git a/vendor/github.com/alecthomas/chroma/README.md b/vendor/github.com/alecthomas/chroma/README.md new file mode 100644 index 0000000..ca336fa --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/README.md @@ -0,0 +1,207 @@ +# Chroma - A general purpose syntax highlighter in pure Go [![](https://godoc.org/github.com/alecthomas/chroma?status.svg)](http://godoc.org/github.com/alecthomas/chroma) [![Build Status](https://travis-ci.org/alecthomas/chroma.png)](https://travis-ci.org/alecthomas/chroma) [![Gitter chat](https://badges.gitter.im/alecthomas.png)](https://gitter.im/alecthomas/Lobby) + +> **NOTE:** As Chroma has just been released, its API is still in flux. That said, the high-level interface should not change significantly. + +Chroma takes source code and other structured text and converts it into syntax +highlighted HTML, ANSI-coloured text, etc. + +Chroma is based heavily on [Pygments](http://pygments.org/), and includes +translaters for Pygments lexers and styles. + +## Table of Contents + + + +- [Supported languages](#supported-languages) +- [Using the library](#using-the-library) + - [Quick start](#quick-start) + - [Identifying the language](#identifying-the-language) + - [Formatting the output](#formatting-the-output) + - [The HTML formatter](#the-html-formatter) +- [More detail](#more-detail) + - [Lexers](#lexers) + - [Formatters](#formatters) + - [Styles](#styles) +- [Command-line interface](#command-line-interface) +- [What's missing compared to Pygments?](#whats-missing-compared-to-pygments) + + + +## Supported languages + +ABNF, ANTLR, APL, ActionScript, ActionScript 3, Ada, Angular2, ApacheConf, AppleScript, Awk, BNF, Base Makefile, Bash, Batchfile, BlitzBasic, Brainfuck, C, C#, C++, CFEngine3, CMake, COBOL, CSS, Cap'n Proto, Ceylon, ChaiScript, Cheetah, Clojure, CoffeeScript, Common Lisp, Coq, Crystal, Cython, DTD, Dart, Diff, Django/Jinja, Docker, EBNF, Elixir, Elm, EmacsLisp, Erlang, FSharp, Factor, Fish, Forth, Fortran, GAS, GDScript, GLSL, Genshi, Genshi HTML, Genshi Text, Gnuplot, Go, Groovy, HTML, Handlebars, Haskell, Haxe, Hexdump, Hy, INI, Idris, Io, JSON, Java, JavaScript, Julia, Kotlin, LLVM, Lighttpd configuration file, Lua, Mako, Mason, Mathematica, MiniZinc, Modula-2, MySQL, Myghty, NASM, Newspeak, Nginx configuration file, Nim, OCaml, Octave, PHP, PL/pgSQL, POVRay, PacmanConf, Perl, Pig, PkgConfig, PostScript, PostgreSQL SQL dialect, PowerShell, Prolog, Protocol Buffer, Puppet, Python, Python 3, QBasic, R, Racket, Ragel, Rexx, Ruby, Rust, SPARQL, SQL, Sass, Scala, Scheme, Scilab, Smalltalk, Smarty, Snobol, SquidConf, Swift, TASM, Tcl, Tcsh, Termcap, Terminfo, Terraform, Thrift, Transact-SQL, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData, VHDL, VimL, XML, Xorg, YAML, cfstatement, markdown, reStructuredText, reg, systemverilog, verilog + +_I will attempt to keep this section up to date, but an authoritative list can be +displayed with `chroma --list`._ + +## Using the library + +Chroma, like Pygments, has the concepts of +[lexers](https://github.com/alecthomas/chroma/tree/master/lexers), +[formatters](https://github.com/alecthomas/chroma/tree/master/formatters) and +[styles](https://github.com/alecthomas/chroma/tree/master/styles). + +Lexers convert source text into a stream of tokens, styles specify how token +types are mapped to colours, and formatters convert tokens and styles into +formatted output. + +A package exists for each of these, containing a global `Registry` variable +with all of the registered implementations. There are also helper functions +for using the registry in each package, such as looking up lexers by name or +matching filenames, etc. + +In all cases, if a lexer, formatter or style can not be determined, `nil` will +be returned. In this situation you may want to default to the `Fallback` +value in each respective package, which provides sane defaults. + +### Quick start + +A convenience function exists that can be used to simply format some source +text, without any effort: + +```go +err := quick.Highlight(os.Stdout, someSourceCode, "go", "html", "monokai") +``` + +### Identifying the language + +To highlight code, you'll first have to identify what language the code is +written in. There are three primary ways to do that: + +1. Detect the language from its filename. + + ```go + lexer := lexers.Match("foo.go") + ``` + +3. Explicitly specify the language by its Chroma syntax ID (a full list is available from `lexers.Names()`). + + ```go + lexer := lexers.Get("go") + ``` + +3. Detect the language from its content. + + ```go + lexer := lexers.Analyse("package main\n\nfunc main()\n{\n}\n") + ``` + +In all cases, `nil` will be returned if the langauge can not be identified. + +```go +if lexer == nil { + lexer = lexers.Fallback +} +``` + +At this point, it should be noted that some lexers can be extremely chatty. To +mitigate this, you can use the coalescing lexer to coalesce runs of identical +token types into a single token: + +```go +lexer = chroma.Coalesce(lexer) +``` + +### Formatting the output + +Once a language is identified you will need to pick a formatter and a style (theme). + +```go +style := styles.Get("swapoff") +if style == nil { + style = styles.Fallback +} +formatter := formatters.Get("html") +if formatter == nil { + formatter = formatters.Fallback +} +``` + +Then obtain an iterator over the tokens: + +```go +contents, err := ioutil.ReadAll(r) +iterator, err := lexer.Tokenise(nil, string(contents)) +``` + +And finally, format the tokens from the iterator: + +```go +err := formatter.Format(w, style, iterator) +``` + +### The HTML formatter + +By default the `html` registered formatter generates standalone HTML with +embedded CSS. More flexibility is available through the `lexers/html` package. + +Firstly, the output generated by the formatter can be customised with the +following constructor options: + +- `Standalone()` - generate standalone HTML with embedded CSS. +- `WithClasses()` - use classes rather than inlined style attributes. +- `ClassPrefix(prefix)` - prefix each generated CSS class. +- `TabWidth(width)` - Set the rendered tab width, in characters. +- `WithLineNumbers()` - Render line numbers (style with `LineNumbers`). +- `HighlightLines(ranges)` - Highlight lines in these ranges (style with `LineHighlight`). + +If `WithClasses()` is used, the corresponding CSS can be obtained from the formatter with: + +```go +formatter := html.New(html.WithClasses()) +err := formatter.WriteCSS(w, style) +``` + +## More detail + +### Lexers + +See the [Pygments documentation](http://pygments.org/docs/lexerdevelopment/) +for details on implementing lexers. Most concepts apply directly to Chroma, +but see existing lexer implementations for real examples. + +In many cases lexers can be automatically converted directly from Pygments by +using the included Python 3 script `pygments2chroma.py`. I use something like +the following: + +``` +python3 ~/Projects/chroma/_tools/pygments2chroma.py \ + pygments.lexers.jvm.KotlinLexer \ + > ~/Projects/chroma/lexers/kotlin.go \ + && gofmt -s -w ~/Projects/chroma/lexers/*.go +``` + +See notes in [pygments-lexers.go](https://github.com/alecthomas/chroma/blob/master/pygments-lexers.txt) +for a list of lexers, and notes on some of the issues importing them. + +### Formatters + +Chroma supports HTML output, as well as terminal output in 8 colour, 256 colour, and true-colour. + +A `noop` formatter is included that outputs the token text only, and a `tokens` +formatter outputs raw tokens. The latter is useful for debugging lexers. + +### Styles + +Chroma styles use the [same syntax](http://pygments.org/docs/styles/) as Pygments. + +All Pygments styles have been converted to Chroma using the `_tools/style.py` script. + +## Command-line interface + +A command-line interface to Chroma is included. It can be installed with: + +``` +go get -u github.com/alecthomas/chroma/cmd/chroma +``` + +## What's missing compared to Pygments? + +- Quite a few lexers, for various reasons (pull-requests welcome): + - Pygments lexers for complex languages often include custom code to + handle certain aspects, such as Perl6's ability to nest code inside + regular expressions. These require time and effort to convert. + - I mostly only converted languages I had heard of, to reduce the porting cost. +- Some more esoteric features of Pygments are omitted for simplicity. +- Though the Chroma API supports content detection, very few languages support them. + I have plans to implement a statistical analyser at some point, but not enough time. diff --git a/vendor/github.com/alecthomas/chroma/coalesce.go b/vendor/github.com/alecthomas/chroma/coalesce.go new file mode 100644 index 0000000..688017a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/coalesce.go @@ -0,0 +1,32 @@ +package chroma + +// Coalesce is a Lexer interceptor that collapses runs of common types into a single token. +func Coalesce(lexer Lexer) Lexer { return &coalescer{lexer} } + +type coalescer struct{ Lexer } + +func (d *coalescer) Tokenise(options *TokeniseOptions, text string) (Iterator, error) { + var prev *Token + it, err := d.Lexer.Tokenise(options, text) + if err != nil { + return nil, err + } + return func() *Token { + for token := it(); token != nil; token = it() { + if prev == nil { + prev = token + } else { + if prev.Type == token.Type && len(prev.Value) < 8192 { + prev.Value += token.Value + } else { + out := prev + prev = token + return out + } + } + } + out := prev + prev = nil + return out + }, nil +} diff --git a/vendor/github.com/alecthomas/chroma/coalesce_test.go b/vendor/github.com/alecthomas/chroma/coalesce_test.go new file mode 100644 index 0000000..9017227 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/coalesce_test.go @@ -0,0 +1,19 @@ +package chroma + +import ( + "testing" + + "github.com/alecthomas/assert" +) + +func TestCoalesce(t *testing.T) { + lexer := Coalesce(MustNewLexer(nil, Rules{ + "root": []Rule{ + {`[!@#$%^&*()]`, Punctuation, nil}, + }, + })) + actual, err := Tokenise(lexer, nil, "!@#$") + assert.NoError(t, err) + expected := []*Token{{Punctuation, "!@#$"}} + assert.Equal(t, expected, actual) +} diff --git a/vendor/github.com/alecthomas/chroma/colour.go b/vendor/github.com/alecthomas/chroma/colour.go new file mode 100644 index 0000000..edaa480 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/colour.go @@ -0,0 +1,153 @@ +package chroma + +import ( + "fmt" + "math" + "strconv" + "strings" +) + +// ANSI2RGB maps ANSI colour names, as supported by Chroma, to hex RGB values. +var ANSI2RGB = map[string]string{ + "#ansiblack": "000000", + "#ansidarkred": "7f0000", + "#ansidarkgreen": "007f00", + "#ansibrown": "7f7fe0", + "#ansidarkblue": "00007f", + "#ansipurple": "7f007f", + "#ansiteal": "007f7f", + "#ansilightgray": "e5e5e5", + // Normal + "#ansidarkgray": "555555", + "#ansired": "ff0000", + "#ansigreen": "00ff00", + "#ansiyellow": "ffff00", + "#ansiblue": "0000ff", + "#ansifuchsia": "ff00ff", + "#ansiturquoise": "00ffff", + "#ansiwhite": "ffffff", + + // Aliases without the "ansi" prefix, because...why? + "#black": "000000", + "#darkred": "7f0000", + "#darkgreen": "007f00", + "#brown": "7f7fe0", + "#darkblue": "00007f", + "#purple": "7f007f", + "#teal": "007f7f", + "#lightgray": "e5e5e5", + // Normal + "#darkgray": "555555", + "#red": "ff0000", + "#green": "00ff00", + "#yellow": "ffff00", + "#blue": "0000ff", + "#fuchsia": "ff00ff", + "#turquoise": "00ffff", + "#white": "ffffff", +} + +// Colour represents an RGB colour. +type Colour int32 + +// NewColour creates a Colour directly from RGB values. +func NewColour(r, g, b uint8) Colour { + return ParseColour(fmt.Sprintf("%02x%02x%02x", r, g, b)) +} + +// Distance between this colour and another. +// +// This uses the approach described here (https://www.compuphase.com/cmetric.htm). +// This is not as accurate as LAB, et. al. but is *vastly* simpler and sufficient for our needs. +func (c Colour) Distance(e2 Colour) float64 { + rmean := int(c.Red()+e2.Red()) / 2 + r := int(c.Red() - e2.Red()) + g := int(c.Green() - e2.Green()) + b := int(c.Blue() - e2.Blue()) + return math.Sqrt(float64((((512 + rmean) * r * r) >> 8) + 4*g*g + (((767 - rmean) * b * b) >> 8))) +} + +// Brighten returns a copy of this colour with its brightness adjusted. +// +// If factor is negative, the colour is darkened. +// +// Uses approach described here (http://www.pvladov.com/2012/09/make-color-lighter-or-darker.html). +func (c Colour) Brighten(factor float64) Colour { + r := float64(c.Red()) + g := float64(c.Green()) + b := float64(c.Blue()) + + if factor < 0 { + factor++ + r *= factor + g *= factor + b *= factor + } else { + r = (255-r)*factor + r + g = (255-g)*factor + g + b = (255-b)*factor + b + } + return NewColour(uint8(r), uint8(g), uint8(b)) +} + +// Brightness of the colour (roughly) in the range 0.0 to 1.0 +func (c Colour) Brightness() float64 { + return (float64(c.Red()) + float64(c.Green()) + float64(c.Blue())) / 255.0 / 3.0 +} + +// ParseColour in the forms #rgb, #rrggbb, #ansi, or #. +// Will return an "unset" colour if invalid. +func ParseColour(colour string) Colour { + colour = normaliseColour(colour) + n, err := strconv.ParseUint(colour, 16, 32) + if err != nil { + return 0 + } + return Colour(n + 1) +} + +// MustParseColour is like ParseColour except it panics if the colour is invalid. +// +// Will panic if colour is in an invalid format. +func MustParseColour(colour string) Colour { + parsed := ParseColour(colour) + if !parsed.IsSet() { + panic(fmt.Errorf("invalid colour %q", colour)) + } + return parsed +} + +func (c Colour) IsSet() bool { return c != 0 } + +func (c Colour) String() string { return fmt.Sprintf("#%06x", int(c-1)) } +func (c Colour) GoString() string { return fmt.Sprintf("Colour(0x%06x)", int(c-1)) } + +// Red component of colour. +func (c Colour) Red() uint8 { return uint8(((c - 1) >> 16) & 0xff) } + +// Green component of colour. +func (c Colour) Green() uint8 { return uint8(((c - 1) >> 8) & 0xff) } + +// Blue component of colour. +func (c Colour) Blue() uint8 { return uint8((c - 1) & 0xff) } + +// Colours is an orderable set of colours. +type Colours []Colour + +func (c Colours) Len() int { return len(c) } +func (c Colours) Swap(i, j int) { c[i], c[j] = c[j], c[i] } +func (c Colours) Less(i, j int) bool { return c[i] < c[j] } + +// Convert colours to #rrggbb. +func normaliseColour(colour string) string { + if ansi, ok := ANSI2RGB[colour]; ok { + return ansi + } + if strings.HasPrefix(colour, "#") { + colour = colour[1:] + if len(colour) == 3 { + return colour[0:1] + colour[0:1] + colour[1:2] + colour[1:2] + colour[2:3] + colour[2:3] + } + } + return colour +} diff --git a/vendor/github.com/alecthomas/chroma/colour_test.go b/vendor/github.com/alecthomas/chroma/colour_test.go new file mode 100644 index 0000000..adc8544 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/colour_test.go @@ -0,0 +1,42 @@ +package chroma + +import ( + "testing" + + "github.com/alecthomas/assert" +) + +func TestColourRGB(t *testing.T) { + colour := ParseColour("#8913af") + assert.Equal(t, uint8(0x89), colour.Red()) + assert.Equal(t, uint8(0x13), colour.Green()) + assert.Equal(t, uint8(0xaf), colour.Blue()) +} + +func TestColourString(t *testing.T) { + assert.Equal(t, "#8913af", ParseColour("#8913af").String()) +} + +func distance(a, b uint8) uint8 { + if a < b { + return b - a + } + return a - b +} + +func TestColourBrighten(t *testing.T) { + actual := NewColour(128, 128, 128).Brighten(0.5) + // Closeish to what we expect is fine. + assert.True(t, distance(192, actual.Red()) <= 2) + assert.True(t, distance(192, actual.Blue()) <= 2) + assert.True(t, distance(192, actual.Green()) <= 2) + actual = NewColour(128, 128, 128).Brighten(-0.5) + assert.True(t, distance(65, actual.Red()) <= 2) + assert.True(t, distance(65, actual.Blue()) <= 2) + assert.True(t, distance(65, actual.Green()) <= 2) +} + +func TestColourBrightess(t *testing.T) { + actual := NewColour(128, 128, 128).Brightness() + assert.True(t, distance(128, uint8(actual*255.0)) <= 2) +} diff --git a/vendor/github.com/alecthomas/chroma/doc.go b/vendor/github.com/alecthomas/chroma/doc.go new file mode 100644 index 0000000..ec90615 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/doc.go @@ -0,0 +1,7 @@ +// Package chroma takes source code and other structured text and converts it into syntax highlighted HTML, ANSI- +// coloured text, etc. +// +// Chroma is based heavily on Pygments, and includes translaters for Pygments lexers and styles. +// +// For more information, go here: https://github.com/alecthomas/chroma +package chroma diff --git a/vendor/github.com/alecthomas/chroma/formatter.go b/vendor/github.com/alecthomas/chroma/formatter.go new file mode 100644 index 0000000..5667024 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/formatter.go @@ -0,0 +1,43 @@ +package chroma + +import ( + "io" +) + +// A Formatter for Chroma lexers. +type Formatter interface { + // Format returns a formatting function for tokens. + // + // If the iterator panics, the Formatter should recover. + Format(w io.Writer, style *Style, iterator Iterator) error +} + +// A FormatterFunc is a Formatter implemented as a function. +// +// Guards against iterator panics. +type FormatterFunc func(w io.Writer, style *Style, iterator Iterator) error + +func (f FormatterFunc) Format(w io.Writer, s *Style, it Iterator) (err error) { + defer func() { + if perr := recover(); perr != nil { + err = perr.(error) + } + }() + return f(w, s, it) +} + +type recoveringFormatter struct { + Formatter +} + +func (r recoveringFormatter) Format(w io.Writer, s *Style, it Iterator) (err error) { + defer func() { + if perr := recover(); perr != nil { + err = perr.(error) + } + }() + return r.Formatter.Format(w, s, it) +} + +// RecoveringFormatter wraps a formatter with panic recovery. +func RecoveringFormatter(formatter Formatter) Formatter { return recoveringFormatter{formatter} } diff --git a/vendor/github.com/alecthomas/chroma/formatters/api.go b/vendor/github.com/alecthomas/chroma/formatters/api.go new file mode 100644 index 0000000..d5fe28a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/formatters/api.go @@ -0,0 +1,55 @@ +package formatters + +import ( + "io" + "sort" + + "github.com/alecthomas/chroma" + "github.com/alecthomas/chroma/formatters/html" +) + +var ( + // NoOp formatter. + NoOp = Register("noop", chroma.FormatterFunc(func(w io.Writer, s *chroma.Style, iterator chroma.Iterator) error { + for t := iterator(); t != nil; t = iterator() { + if _, err := io.WriteString(w, t.Value); err != nil { + return err + } + } + return nil + })) + // Default HTML formatter outputs self-contained HTML. + htmlFull = Register("html", html.New(html.Standalone(), html.WithClasses())) +) + +// Fallback formatter. +var Fallback = NoOp + +// Registry of Formatters. +var Registry = map[string]chroma.Formatter{} + +// Names of registered formatters. +func Names() []string { + out := []string{} + for name := range Registry { + out = append(out, name) + } + sort.Strings(out) + return out +} + +// Get formatter by name. +// +// If the given formatter is not found, the Fallback formatter will be returned. +func Get(name string) chroma.Formatter { + if f, ok := Registry[name]; ok { + return f + } + return Fallback +} + +// Register a named formatter. +func Register(name string, formatter chroma.Formatter) chroma.Formatter { + Registry[name] = formatter + return formatter +} diff --git a/vendor/github.com/alecthomas/chroma/formatters/html/html.go b/vendor/github.com/alecthomas/chroma/formatters/html/html.go new file mode 100644 index 0000000..4263604 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/formatters/html/html.go @@ -0,0 +1,386 @@ +package html + +import ( + "fmt" + "html" + "io" + "sort" + "strings" + + "github.com/alecthomas/chroma" +) + +// Option sets an option of the HTML formatter. +type Option func(f *Formatter) + +// Standalone configures the HTML formatter for generating a standalone HTML document. +func Standalone() Option { return func(f *Formatter) { f.standalone = true } } + +// ClassPrefix sets the CSS class prefix. +func ClassPrefix(prefix string) Option { return func(f *Formatter) { f.prefix = prefix } } + +// WithClasses emits HTML using CSS classes, rather than inline styles. +func WithClasses() Option { return func(f *Formatter) { f.Classes = true } } + +// TabWidth sets the number of characters for a tab. Defaults to 8. +func TabWidth(width int) Option { return func(f *Formatter) { f.tabWidth = width } } + +// WithLineNumbers formats output with line numbers. +func WithLineNumbers() Option { + return func(f *Formatter) { + f.lineNumbers = true + } +} + +// LineNumbersInTable will, when combined with WithLineNumbers, separate the line numbers +// and code in table td's, which make them copy-and-paste friendly. +func LineNumbersInTable() Option { + return func(f *Formatter) { + f.lineNumbersInTable = true + } +} + +// HighlightLines higlights the given line ranges with the Highlight style. +// +// A range is the beginning and ending of a range as 1-based line numbers, inclusive. +func HighlightLines(ranges [][2]int) Option { + return func(f *Formatter) { + f.highlightRanges = ranges + sort.Sort(f.highlightRanges) + } +} + +// BaseLineNumber sets the initial number to start line numbering at. Defaults to 1. +func BaseLineNumber(n int) Option { + return func(f *Formatter) { + f.baseLineNumber = n + } +} + +// New HTML formatter. +func New(options ...Option) *Formatter { + f := &Formatter{ + baseLineNumber: 1, + } + for _, option := range options { + option(f) + } + return f +} + +// Formatter that generates HTML. +type Formatter struct { + standalone bool + prefix string + Classes bool // Exported field to detect when classes are being used + tabWidth int + lineNumbers bool + lineNumbersInTable bool + highlightRanges highlightRanges + baseLineNumber int +} + +type highlightRanges [][2]int + +func (h highlightRanges) Len() int { return len(h) } +func (h highlightRanges) Swap(i, j int) { h[i], h[j] = h[j], h[i] } +func (h highlightRanges) Less(i, j int) bool { return h[i][0] < h[j][0] } + +func (f *Formatter) Format(w io.Writer, style *chroma.Style, iterator chroma.Iterator) (err error) { + defer func() { + if perr := recover(); perr != nil { + err = perr.(error) + } + }() + return f.writeHTML(w, style, iterator.Tokens()) +} + +func brightenOrDarken(colour chroma.Colour, factor float64) chroma.Colour { + if colour.Brightness() < 0.5 { + return colour.Brighten(factor) + } + return colour.Brighten(-factor) +} + +// Ensure that style entries exist for highlighting, etc. +func (f *Formatter) restyle(style *chroma.Style) (*chroma.Style, error) { + builder := style.Builder() + bg := builder.Get(chroma.Background) + // If we don't have a line highlight colour, make one that is 10% brighter/darker than the background. + if !style.Has(chroma.LineHighlight) { + highlight := chroma.StyleEntry{Background: bg.Background} + highlight.Background = brightenOrDarken(highlight.Background, 0.1) + builder.AddEntry(chroma.LineHighlight, highlight) + } + // If we don't have line numbers, use the text colour but 20% brighter/darker + if !style.Has(chroma.LineNumbers) { + text := chroma.StyleEntry{Colour: bg.Colour} + text.Colour = brightenOrDarken(text.Colour, 0.5) + builder.AddEntry(chroma.LineNumbers, text) + builder.AddEntry(chroma.LineNumbersTable, text) + } + return builder.Build() +} + +// We deliberately don't use html/template here because it is two orders of magnitude slower (benchmarked). +// +// OTOH we need to be super careful about correct escaping... +func (f *Formatter) writeHTML(w io.Writer, style *chroma.Style, tokens []*chroma.Token) (err error) { // nolint: gocyclo + style, err = f.restyle(style) + if err != nil { + return err + } + css := f.styleToCSS(style) + if !f.Classes { + for t, style := range css { + css[t] = compressStyle(style) + } + } + if f.standalone { + fmt.Fprint(w, "\n") + if f.Classes { + fmt.Fprint(w, "") + } + fmt.Fprintf(w, "\n", f.styleAttr(css, chroma.Background)) + } + + wrapInTable := f.lineNumbers && f.lineNumbersInTable + + lines := splitTokensIntoLines(tokens) + lineDigits := len(fmt.Sprintf("%d", len(lines))) + highlightIndex := 0 + + if wrapInTable { + // List line numbers in its own + fmt.Fprintf(w, "\n", f.styleAttr(css, chroma.Background)) + fmt.Fprintf(w, "", f.styleAttr(css, chroma.LineTable)) + fmt.Fprintf(w, "\n", f.styleAttr(css, chroma.LineTableTD)) + fmt.Fprintf(w, "", f.styleAttr(css, chroma.Background)) + for index, _ := range lines { + line := f.baseLineNumber + index + highlight, next := f.shouldHighlight(highlightIndex, line) + if next { + highlightIndex++ + } + if highlight { + fmt.Fprintf(w, "", f.styleAttr(css, chroma.LineHighlight)) + } + + fmt.Fprintf(w, "%*d", f.styleAttr(css, chroma.LineNumbersTable), lineDigits, line) + + if highlight { + fmt.Fprintf(w, "") + } + } + fmt.Fprint(w, "\n") + fmt.Fprintf(w, "\n", f.styleAttr(css, chroma.LineTableTD)) + } + + fmt.Fprintf(w, "", f.styleAttr(css, chroma.Background)) + highlightIndex = 0 + for index, tokens := range lines { + // 1-based line number. + line := f.baseLineNumber + index + highlight, next := f.shouldHighlight(highlightIndex, line) + if next { + highlightIndex++ + } + if highlight { + fmt.Fprintf(w, "", f.styleAttr(css, chroma.LineHighlight)) + } + + if f.lineNumbers && !wrapInTable { + fmt.Fprintf(w, "%*d", f.styleAttr(css, chroma.LineNumbers), lineDigits, line) + } + + for _, token := range tokens { + html := html.EscapeString(token.String()) + attr := f.styleAttr(css, token.Type) + if attr != "" { + html = fmt.Sprintf("%s", attr, html) + } + fmt.Fprint(w, html) + } + if highlight { + fmt.Fprintf(w, "") + } + } + + fmt.Fprint(w, "") + + if wrapInTable { + fmt.Fprint(w, "\n") + fmt.Fprint(w, "\n") + } + + if f.standalone { + fmt.Fprint(w, "\n\n") + fmt.Fprint(w, "\n") + } + + return nil +} + +func (f *Formatter) shouldHighlight(highlightIndex, line int) (bool, bool) { + next := false + for highlightIndex < len(f.highlightRanges) && line > f.highlightRanges[highlightIndex][1] { + highlightIndex++ + next = true + } + if highlightIndex < len(f.highlightRanges) { + hrange := f.highlightRanges[highlightIndex] + if line >= hrange[0] && line <= hrange[1] { + return true, next + } + } + return false, next +} + +func (f *Formatter) class(t chroma.TokenType) string { + for t != 0 { + cls, ok := chroma.StandardTypes[t] + if ok { + return cls + } + t = t.Parent() + } + return chroma.StandardTypes[t] +} + +func (f *Formatter) styleAttr(styles map[chroma.TokenType]string, tt chroma.TokenType) string { + if f.Classes { + cls := f.class(tt) + if cls == "" { + return "" + } + return string(fmt.Sprintf(` class="%s"`, cls)) + } + if _, ok := styles[tt]; !ok { + tt = tt.SubCategory() + if _, ok := styles[tt]; !ok { + tt = tt.Category() + if _, ok := styles[tt]; !ok { + return "" + } + } + } + return string(fmt.Sprintf(` style="%s"`, styles[tt])) +} + +func (f *Formatter) tabWidthStyle() string { + if f.tabWidth != 0 && f.tabWidth != 8 { + return fmt.Sprintf("; -moz-tab-size: %[1]d; -o-tab-size: %[1]d; tab-size: %[1]d", f.tabWidth) + } + return "" +} + +// WriteCSS writes CSS style definitions (without any surrounding HTML). +func (f *Formatter) WriteCSS(w io.Writer, style *chroma.Style) error { + css := f.styleToCSS(style) + // Special-case background as it is mapped to the outer ".chroma" class. + if _, err := fmt.Fprintf(w, "/* %s */ .chroma { %s }\n", chroma.Background, css[chroma.Background]); err != nil { + return err + } + tts := []int{} + for tt := range css { + tts = append(tts, int(tt)) + } + sort.Ints(tts) + for _, ti := range tts { + tt := chroma.TokenType(ti) + if tt == chroma.Background { + continue + } + styles := css[tt] + if _, err := fmt.Fprintf(w, "/* %s */ .chroma .%s { %s }\n", tt, f.class(tt), styles); err != nil { + return err + } + } + return nil +} + +func (f *Formatter) styleToCSS(style *chroma.Style) map[chroma.TokenType]string { + classes := map[chroma.TokenType]string{} + bg := style.Get(chroma.Background) + // Convert the style. + for t := range chroma.StandardTypes { + entry := style.Get(t) + if t != chroma.Background { + entry = entry.Sub(bg) + } + if entry.IsZero() { + continue + } + classes[t] = StyleEntryToCSS(entry) + } + classes[chroma.Background] += f.tabWidthStyle() + lineNumbersStyle := "; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;" + classes[chroma.LineNumbers] += lineNumbersStyle + classes[chroma.LineNumbersTable] += lineNumbersStyle + " display: block;" + classes[chroma.LineHighlight] += "; display: block; width: 100%" + classes[chroma.LineTable] += "; border-spacing: 0; padding: 0; margin: 0; border: 0; width: 100%; overflow: auto; display: block;" + classes[chroma.LineTableTD] += "; vertical-align: top; padding: 0; margin: 0; border: 0;" + + return classes +} + +// StyleEntryToCSS converts a chroma.StyleEntry to CSS attributes. +func StyleEntryToCSS(e chroma.StyleEntry) string { + styles := []string{} + if e.Colour.IsSet() { + styles = append(styles, "color: "+e.Colour.String()) + } + if e.Background.IsSet() { + styles = append(styles, "background-color: "+e.Background.String()) + } + if e.Bold == chroma.Yes { + styles = append(styles, "font-weight: bold") + } + if e.Italic == chroma.Yes { + styles = append(styles, "font-style: italic") + } + return strings.Join(styles, "; ") +} + +// Compress CSS attributes - remove spaces, transform 6-digit colours to 3. +func compressStyle(s string) string { + s = strings.Replace(s, " ", "", -1) + parts := strings.Split(s, ";") + out := []string{} + for _, p := range parts { + if strings.Contains(p, "#") { + c := p[len(p)-6:] + if c[0] == c[1] && c[2] == c[3] && c[4] == c[5] { + p = p[:len(p)-6] + c[0:1] + c[2:3] + c[4:5] + } + } + out = append(out, p) + } + return strings.Join(out, ";") +} + +func splitTokensIntoLines(tokens []*chroma.Token) (out [][]*chroma.Token) { + line := []*chroma.Token{} + for _, token := range tokens { + for strings.Contains(token.Value, "\n") { + parts := strings.SplitAfterN(token.Value, "\n", 2) + // Token becomes the tail. + token.Value = parts[1] + + // Append the head to the line and flush the line. + clone := token.Clone() + clone.Value = parts[0] + line = append(line, clone) + out = append(out, line) + line = nil + } + line = append(line, token) + } + if len(line) > 0 { + out = append(out, line) + } + return +} diff --git a/vendor/github.com/alecthomas/chroma/formatters/html/html_test.go b/vendor/github.com/alecthomas/chroma/formatters/html/html_test.go new file mode 100644 index 0000000..46be101 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/formatters/html/html_test.go @@ -0,0 +1,60 @@ +package html + +import ( + "errors" + "io/ioutil" + "testing" + + "github.com/alecthomas/assert" + + "github.com/alecthomas/chroma" + "github.com/alecthomas/chroma/lexers" + "github.com/alecthomas/chroma/styles" +) + +func TestCompressStyle(t *testing.T) { + style := "color: #888888; background-color: #faffff" + actual := compressStyle(style) + expected := "color:#888;background-color:#faffff" + assert.Equal(t, expected, actual) +} + +func BenchmarkHTMLFormatter(b *testing.B) { + formatter := New() + b.ResetTimer() + for i := 0; i < b.N; i++ { + it, err := lexers.Go.Tokenise(nil, "package main\nfunc main()\n{\nprintln(`hello world`)\n}\n") + assert.NoError(b, err) + err = formatter.Format(ioutil.Discard, styles.Fallback, it) + assert.NoError(b, err) + } +} + +func TestSplitTokensIntoLines(t *testing.T) { + in := []*chroma.Token{ + {Value: "hello", Type: chroma.NameKeyword}, + {Value: " world\nwhat?\n", Type: chroma.NameKeyword}, + } + expected := [][]*chroma.Token{ + { + {Type: chroma.NameKeyword, Value: "hello"}, + {Type: chroma.NameKeyword, Value: " world\n"}, + }, + { + {Type: chroma.NameKeyword, Value: "what?\n"}, + }, + { + {Type: chroma.NameKeyword}, + }, + } + actual := splitTokensIntoLines(in) + assert.Equal(t, expected, actual) +} + +func TestIteratorPanicRecovery(t *testing.T) { + it := func() *chroma.Token { + panic(errors.New("bad")) + } + err := New().Format(ioutil.Discard, styles.Fallback, it) + assert.Error(t, err) +} diff --git a/vendor/github.com/alecthomas/chroma/formatters/tokens.go b/vendor/github.com/alecthomas/chroma/formatters/tokens.go new file mode 100644 index 0000000..614987e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/formatters/tokens.go @@ -0,0 +1,18 @@ +package formatters + +import ( + "fmt" + "io" + + "github.com/alecthomas/chroma" +) + +// Tokens formatter outputs the raw token structures. +var Tokens = Register("tokens", chroma.FormatterFunc(func(w io.Writer, s *chroma.Style, it chroma.Iterator) error { + for t := it(); t != nil; t = it() { + if _, err := fmt.Fprintln(w, t.GoString()); err != nil { + return err + } + } + return nil +})) diff --git a/vendor/github.com/alecthomas/chroma/formatters/tty_indexed.go b/vendor/github.com/alecthomas/chroma/formatters/tty_indexed.go new file mode 100644 index 0000000..a068cc5 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/formatters/tty_indexed.go @@ -0,0 +1,250 @@ +package formatters + +import ( + "fmt" + "io" + "math" + + "github.com/alecthomas/chroma" +) + +type ttyTable struct { + foreground map[chroma.Colour]string + background map[chroma.Colour]string +} + +var c = chroma.MustParseColour + +var ttyTables = map[int]*ttyTable{ + 8: { + foreground: map[chroma.Colour]string{ + c("#000000"): "\033[30m", c("#7f0000"): "\033[31m", c("#007f00"): "\033[32m", c("#7f7fe0"): "\033[33m", + c("#00007f"): "\033[34m", c("#7f007f"): "\033[35m", c("#007f7f"): "\033[36m", c("#e5e5e5"): "\033[37m", + c("#555555"): "\033[90m", c("#ff0000"): "\033[91m", c("#00ff00"): "\033[92m", c("#ffff00"): "\033[93m", + c("#0000ff"): "\033[94m", c("#ff00ff"): "\033[95m", c("#00ffff"): "\033[96m", c("#ffffff"): "\033[97m", + }, + background: map[chroma.Colour]string{ + c("#000000"): "\033[40m", c("#7f0000"): "\033[41m", c("#007f00"): "\033[42m", c("#7f7fe0"): "\033[43m", + c("#00007f"): "\033[44m", c("#7f007f"): "\033[45m", c("#007f7f"): "\033[46m", c("#e5e5e5"): "\033[47m", + c("#555555"): "\033[100m", c("#ff0000"): "\033[101m", c("#00ff00"): "\033[102m", c("#ffff00"): "\033[103m", + c("#0000ff"): "\033[104m", c("#ff00ff"): "\033[105m", c("#00ffff"): "\033[106m", c("#ffffff"): "\033[107m", + }, + }, + 256: { + foreground: map[chroma.Colour]string{ + c("#000000"): "\033[38;5;0m", c("#800000"): "\033[38;5;1m", c("#008000"): "\033[38;5;2m", c("#808000"): "\033[38;5;3m", + c("#000080"): "\033[38;5;4m", c("#800080"): "\033[38;5;5m", c("#008080"): "\033[38;5;6m", c("#c0c0c0"): "\033[38;5;7m", + c("#808080"): "\033[38;5;8m", c("#ff0000"): "\033[38;5;9m", c("#00ff00"): "\033[38;5;10m", c("#ffff00"): "\033[38;5;11m", + c("#0000ff"): "\033[38;5;12m", c("#ff00ff"): "\033[38;5;13m", c("#00ffff"): "\033[38;5;14m", c("#ffffff"): "\033[38;5;15m", + c("#000000"): "\033[38;5;16m", c("#00005f"): "\033[38;5;17m", c("#000087"): "\033[38;5;18m", c("#0000af"): "\033[38;5;19m", + c("#0000d7"): "\033[38;5;20m", c("#0000ff"): "\033[38;5;21m", c("#005f00"): "\033[38;5;22m", c("#005f5f"): "\033[38;5;23m", + c("#005f87"): "\033[38;5;24m", c("#005faf"): "\033[38;5;25m", c("#005fd7"): "\033[38;5;26m", c("#005fff"): "\033[38;5;27m", + c("#008700"): "\033[38;5;28m", c("#00875f"): "\033[38;5;29m", c("#008787"): "\033[38;5;30m", c("#0087af"): "\033[38;5;31m", + c("#0087d7"): "\033[38;5;32m", c("#0087ff"): "\033[38;5;33m", c("#00af00"): "\033[38;5;34m", c("#00af5f"): "\033[38;5;35m", + c("#00af87"): "\033[38;5;36m", c("#00afaf"): "\033[38;5;37m", c("#00afd7"): "\033[38;5;38m", c("#00afff"): "\033[38;5;39m", + c("#00d700"): "\033[38;5;40m", c("#00d75f"): "\033[38;5;41m", c("#00d787"): "\033[38;5;42m", c("#00d7af"): "\033[38;5;43m", + c("#00d7d7"): "\033[38;5;44m", c("#00d7ff"): "\033[38;5;45m", c("#00ff00"): "\033[38;5;46m", c("#00ff5f"): "\033[38;5;47m", + c("#00ff87"): "\033[38;5;48m", c("#00ffaf"): "\033[38;5;49m", c("#00ffd7"): "\033[38;5;50m", c("#00ffff"): "\033[38;5;51m", + c("#5f0000"): "\033[38;5;52m", c("#5f005f"): "\033[38;5;53m", c("#5f0087"): "\033[38;5;54m", c("#5f00af"): "\033[38;5;55m", + c("#5f00d7"): "\033[38;5;56m", c("#5f00ff"): "\033[38;5;57m", c("#5f5f00"): "\033[38;5;58m", c("#5f5f5f"): "\033[38;5;59m", + c("#5f5f87"): "\033[38;5;60m", c("#5f5faf"): "\033[38;5;61m", c("#5f5fd7"): "\033[38;5;62m", c("#5f5fff"): "\033[38;5;63m", + c("#5f8700"): "\033[38;5;64m", c("#5f875f"): "\033[38;5;65m", c("#5f8787"): "\033[38;5;66m", c("#5f87af"): "\033[38;5;67m", + c("#5f87d7"): "\033[38;5;68m", c("#5f87ff"): "\033[38;5;69m", c("#5faf00"): "\033[38;5;70m", c("#5faf5f"): "\033[38;5;71m", + c("#5faf87"): "\033[38;5;72m", c("#5fafaf"): "\033[38;5;73m", c("#5fafd7"): "\033[38;5;74m", c("#5fafff"): "\033[38;5;75m", + c("#5fd700"): "\033[38;5;76m", c("#5fd75f"): "\033[38;5;77m", c("#5fd787"): "\033[38;5;78m", c("#5fd7af"): "\033[38;5;79m", + c("#5fd7d7"): "\033[38;5;80m", c("#5fd7ff"): "\033[38;5;81m", c("#5fff00"): "\033[38;5;82m", c("#5fff5f"): "\033[38;5;83m", + c("#5fff87"): "\033[38;5;84m", c("#5fffaf"): "\033[38;5;85m", c("#5fffd7"): "\033[38;5;86m", c("#5fffff"): "\033[38;5;87m", + c("#870000"): "\033[38;5;88m", c("#87005f"): "\033[38;5;89m", c("#870087"): "\033[38;5;90m", c("#8700af"): "\033[38;5;91m", + c("#8700d7"): "\033[38;5;92m", c("#8700ff"): "\033[38;5;93m", c("#875f00"): "\033[38;5;94m", c("#875f5f"): "\033[38;5;95m", + c("#875f87"): "\033[38;5;96m", c("#875faf"): "\033[38;5;97m", c("#875fd7"): "\033[38;5;98m", c("#875fff"): "\033[38;5;99m", + c("#878700"): "\033[38;5;100m", c("#87875f"): "\033[38;5;101m", c("#878787"): "\033[38;5;102m", c("#8787af"): "\033[38;5;103m", + c("#8787d7"): "\033[38;5;104m", c("#8787ff"): "\033[38;5;105m", c("#87af00"): "\033[38;5;106m", c("#87af5f"): "\033[38;5;107m", + c("#87af87"): "\033[38;5;108m", c("#87afaf"): "\033[38;5;109m", c("#87afd7"): "\033[38;5;110m", c("#87afff"): "\033[38;5;111m", + c("#87d700"): "\033[38;5;112m", c("#87d75f"): "\033[38;5;113m", c("#87d787"): "\033[38;5;114m", c("#87d7af"): "\033[38;5;115m", + c("#87d7d7"): "\033[38;5;116m", c("#87d7ff"): "\033[38;5;117m", c("#87ff00"): "\033[38;5;118m", c("#87ff5f"): "\033[38;5;119m", + c("#87ff87"): "\033[38;5;120m", c("#87ffaf"): "\033[38;5;121m", c("#87ffd7"): "\033[38;5;122m", c("#87ffff"): "\033[38;5;123m", + c("#af0000"): "\033[38;5;124m", c("#af005f"): "\033[38;5;125m", c("#af0087"): "\033[38;5;126m", c("#af00af"): "\033[38;5;127m", + c("#af00d7"): "\033[38;5;128m", c("#af00ff"): "\033[38;5;129m", c("#af5f00"): "\033[38;5;130m", c("#af5f5f"): "\033[38;5;131m", + c("#af5f87"): "\033[38;5;132m", c("#af5faf"): "\033[38;5;133m", c("#af5fd7"): "\033[38;5;134m", c("#af5fff"): "\033[38;5;135m", + c("#af8700"): "\033[38;5;136m", c("#af875f"): "\033[38;5;137m", c("#af8787"): "\033[38;5;138m", c("#af87af"): "\033[38;5;139m", + c("#af87d7"): "\033[38;5;140m", c("#af87ff"): "\033[38;5;141m", c("#afaf00"): "\033[38;5;142m", c("#afaf5f"): "\033[38;5;143m", + c("#afaf87"): "\033[38;5;144m", c("#afafaf"): "\033[38;5;145m", c("#afafd7"): "\033[38;5;146m", c("#afafff"): "\033[38;5;147m", + c("#afd700"): "\033[38;5;148m", c("#afd75f"): "\033[38;5;149m", c("#afd787"): "\033[38;5;150m", c("#afd7af"): "\033[38;5;151m", + c("#afd7d7"): "\033[38;5;152m", c("#afd7ff"): "\033[38;5;153m", c("#afff00"): "\033[38;5;154m", c("#afff5f"): "\033[38;5;155m", + c("#afff87"): "\033[38;5;156m", c("#afffaf"): "\033[38;5;157m", c("#afffd7"): "\033[38;5;158m", c("#afffff"): "\033[38;5;159m", + c("#d70000"): "\033[38;5;160m", c("#d7005f"): "\033[38;5;161m", c("#d70087"): "\033[38;5;162m", c("#d700af"): "\033[38;5;163m", + c("#d700d7"): "\033[38;5;164m", c("#d700ff"): "\033[38;5;165m", c("#d75f00"): "\033[38;5;166m", c("#d75f5f"): "\033[38;5;167m", + c("#d75f87"): "\033[38;5;168m", c("#d75faf"): "\033[38;5;169m", c("#d75fd7"): "\033[38;5;170m", c("#d75fff"): "\033[38;5;171m", + c("#d78700"): "\033[38;5;172m", c("#d7875f"): "\033[38;5;173m", c("#d78787"): "\033[38;5;174m", c("#d787af"): "\033[38;5;175m", + c("#d787d7"): "\033[38;5;176m", c("#d787ff"): "\033[38;5;177m", c("#d7af00"): "\033[38;5;178m", c("#d7af5f"): "\033[38;5;179m", + c("#d7af87"): "\033[38;5;180m", c("#d7afaf"): "\033[38;5;181m", c("#d7afd7"): "\033[38;5;182m", c("#d7afff"): "\033[38;5;183m", + c("#d7d700"): "\033[38;5;184m", c("#d7d75f"): "\033[38;5;185m", c("#d7d787"): "\033[38;5;186m", c("#d7d7af"): "\033[38;5;187m", + c("#d7d7d7"): "\033[38;5;188m", c("#d7d7ff"): "\033[38;5;189m", c("#d7ff00"): "\033[38;5;190m", c("#d7ff5f"): "\033[38;5;191m", + c("#d7ff87"): "\033[38;5;192m", c("#d7ffaf"): "\033[38;5;193m", c("#d7ffd7"): "\033[38;5;194m", c("#d7ffff"): "\033[38;5;195m", + c("#ff0000"): "\033[38;5;196m", c("#ff005f"): "\033[38;5;197m", c("#ff0087"): "\033[38;5;198m", c("#ff00af"): "\033[38;5;199m", + c("#ff00d7"): "\033[38;5;200m", c("#ff00ff"): "\033[38;5;201m", c("#ff5f00"): "\033[38;5;202m", c("#ff5f5f"): "\033[38;5;203m", + c("#ff5f87"): "\033[38;5;204m", c("#ff5faf"): "\033[38;5;205m", c("#ff5fd7"): "\033[38;5;206m", c("#ff5fff"): "\033[38;5;207m", + c("#ff8700"): "\033[38;5;208m", c("#ff875f"): "\033[38;5;209m", c("#ff8787"): "\033[38;5;210m", c("#ff87af"): "\033[38;5;211m", + c("#ff87d7"): "\033[38;5;212m", c("#ff87ff"): "\033[38;5;213m", c("#ffaf00"): "\033[38;5;214m", c("#ffaf5f"): "\033[38;5;215m", + c("#ffaf87"): "\033[38;5;216m", c("#ffafaf"): "\033[38;5;217m", c("#ffafd7"): "\033[38;5;218m", c("#ffafff"): "\033[38;5;219m", + c("#ffd700"): "\033[38;5;220m", c("#ffd75f"): "\033[38;5;221m", c("#ffd787"): "\033[38;5;222m", c("#ffd7af"): "\033[38;5;223m", + c("#ffd7d7"): "\033[38;5;224m", c("#ffd7ff"): "\033[38;5;225m", c("#ffff00"): "\033[38;5;226m", c("#ffff5f"): "\033[38;5;227m", + c("#ffff87"): "\033[38;5;228m", c("#ffffaf"): "\033[38;5;229m", c("#ffffd7"): "\033[38;5;230m", c("#ffffff"): "\033[38;5;231m", + c("#080808"): "\033[38;5;232m", c("#121212"): "\033[38;5;233m", c("#1c1c1c"): "\033[38;5;234m", c("#262626"): "\033[38;5;235m", + c("#303030"): "\033[38;5;236m", c("#3a3a3a"): "\033[38;5;237m", c("#444444"): "\033[38;5;238m", c("#4e4e4e"): "\033[38;5;239m", + c("#585858"): "\033[38;5;240m", c("#626262"): "\033[38;5;241m", c("#6c6c6c"): "\033[38;5;242m", c("#767676"): "\033[38;5;243m", + c("#808080"): "\033[38;5;244m", c("#8a8a8a"): "\033[38;5;245m", c("#949494"): "\033[38;5;246m", c("#9e9e9e"): "\033[38;5;247m", + c("#a8a8a8"): "\033[38;5;248m", c("#b2b2b2"): "\033[38;5;249m", c("#bcbcbc"): "\033[38;5;250m", c("#c6c6c6"): "\033[38;5;251m", + c("#d0d0d0"): "\033[38;5;252m", c("#dadada"): "\033[38;5;253m", c("#e4e4e4"): "\033[38;5;254m", c("#eeeeee"): "\033[38;5;255m", + }, + background: map[chroma.Colour]string{ + c("#000000"): "\033[48;5;0m", c("#800000"): "\033[48;5;1m", c("#008000"): "\033[48;5;2m", c("#808000"): "\033[48;5;3m", + c("#000080"): "\033[48;5;4m", c("#800080"): "\033[48;5;5m", c("#008080"): "\033[48;5;6m", c("#c0c0c0"): "\033[48;5;7m", + c("#808080"): "\033[48;5;8m", c("#ff0000"): "\033[48;5;9m", c("#00ff00"): "\033[48;5;10m", c("#ffff00"): "\033[48;5;11m", + c("#0000ff"): "\033[48;5;12m", c("#ff00ff"): "\033[48;5;13m", c("#00ffff"): "\033[48;5;14m", c("#ffffff"): "\033[48;5;15m", + c("#000000"): "\033[48;5;16m", c("#00005f"): "\033[48;5;17m", c("#000087"): "\033[48;5;18m", c("#0000af"): "\033[48;5;19m", + c("#0000d7"): "\033[48;5;20m", c("#0000ff"): "\033[48;5;21m", c("#005f00"): "\033[48;5;22m", c("#005f5f"): "\033[48;5;23m", + c("#005f87"): "\033[48;5;24m", c("#005faf"): "\033[48;5;25m", c("#005fd7"): "\033[48;5;26m", c("#005fff"): "\033[48;5;27m", + c("#008700"): "\033[48;5;28m", c("#00875f"): "\033[48;5;29m", c("#008787"): "\033[48;5;30m", c("#0087af"): "\033[48;5;31m", + c("#0087d7"): "\033[48;5;32m", c("#0087ff"): "\033[48;5;33m", c("#00af00"): "\033[48;5;34m", c("#00af5f"): "\033[48;5;35m", + c("#00af87"): "\033[48;5;36m", c("#00afaf"): "\033[48;5;37m", c("#00afd7"): "\033[48;5;38m", c("#00afff"): "\033[48;5;39m", + c("#00d700"): "\033[48;5;40m", c("#00d75f"): "\033[48;5;41m", c("#00d787"): "\033[48;5;42m", c("#00d7af"): "\033[48;5;43m", + c("#00d7d7"): "\033[48;5;44m", c("#00d7ff"): "\033[48;5;45m", c("#00ff00"): "\033[48;5;46m", c("#00ff5f"): "\033[48;5;47m", + c("#00ff87"): "\033[48;5;48m", c("#00ffaf"): "\033[48;5;49m", c("#00ffd7"): "\033[48;5;50m", c("#00ffff"): "\033[48;5;51m", + c("#5f0000"): "\033[48;5;52m", c("#5f005f"): "\033[48;5;53m", c("#5f0087"): "\033[48;5;54m", c("#5f00af"): "\033[48;5;55m", + c("#5f00d7"): "\033[48;5;56m", c("#5f00ff"): "\033[48;5;57m", c("#5f5f00"): "\033[48;5;58m", c("#5f5f5f"): "\033[48;5;59m", + c("#5f5f87"): "\033[48;5;60m", c("#5f5faf"): "\033[48;5;61m", c("#5f5fd7"): "\033[48;5;62m", c("#5f5fff"): "\033[48;5;63m", + c("#5f8700"): "\033[48;5;64m", c("#5f875f"): "\033[48;5;65m", c("#5f8787"): "\033[48;5;66m", c("#5f87af"): "\033[48;5;67m", + c("#5f87d7"): "\033[48;5;68m", c("#5f87ff"): "\033[48;5;69m", c("#5faf00"): "\033[48;5;70m", c("#5faf5f"): "\033[48;5;71m", + c("#5faf87"): "\033[48;5;72m", c("#5fafaf"): "\033[48;5;73m", c("#5fafd7"): "\033[48;5;74m", c("#5fafff"): "\033[48;5;75m", + c("#5fd700"): "\033[48;5;76m", c("#5fd75f"): "\033[48;5;77m", c("#5fd787"): "\033[48;5;78m", c("#5fd7af"): "\033[48;5;79m", + c("#5fd7d7"): "\033[48;5;80m", c("#5fd7ff"): "\033[48;5;81m", c("#5fff00"): "\033[48;5;82m", c("#5fff5f"): "\033[48;5;83m", + c("#5fff87"): "\033[48;5;84m", c("#5fffaf"): "\033[48;5;85m", c("#5fffd7"): "\033[48;5;86m", c("#5fffff"): "\033[48;5;87m", + c("#870000"): "\033[48;5;88m", c("#87005f"): "\033[48;5;89m", c("#870087"): "\033[48;5;90m", c("#8700af"): "\033[48;5;91m", + c("#8700d7"): "\033[48;5;92m", c("#8700ff"): "\033[48;5;93m", c("#875f00"): "\033[48;5;94m", c("#875f5f"): "\033[48;5;95m", + c("#875f87"): "\033[48;5;96m", c("#875faf"): "\033[48;5;97m", c("#875fd7"): "\033[48;5;98m", c("#875fff"): "\033[48;5;99m", + c("#878700"): "\033[48;5;100m", c("#87875f"): "\033[48;5;101m", c("#878787"): "\033[48;5;102m", c("#8787af"): "\033[48;5;103m", + c("#8787d7"): "\033[48;5;104m", c("#8787ff"): "\033[48;5;105m", c("#87af00"): "\033[48;5;106m", c("#87af5f"): "\033[48;5;107m", + c("#87af87"): "\033[48;5;108m", c("#87afaf"): "\033[48;5;109m", c("#87afd7"): "\033[48;5;110m", c("#87afff"): "\033[48;5;111m", + c("#87d700"): "\033[48;5;112m", c("#87d75f"): "\033[48;5;113m", c("#87d787"): "\033[48;5;114m", c("#87d7af"): "\033[48;5;115m", + c("#87d7d7"): "\033[48;5;116m", c("#87d7ff"): "\033[48;5;117m", c("#87ff00"): "\033[48;5;118m", c("#87ff5f"): "\033[48;5;119m", + c("#87ff87"): "\033[48;5;120m", c("#87ffaf"): "\033[48;5;121m", c("#87ffd7"): "\033[48;5;122m", c("#87ffff"): "\033[48;5;123m", + c("#af0000"): "\033[48;5;124m", c("#af005f"): "\033[48;5;125m", c("#af0087"): "\033[48;5;126m", c("#af00af"): "\033[48;5;127m", + c("#af00d7"): "\033[48;5;128m", c("#af00ff"): "\033[48;5;129m", c("#af5f00"): "\033[48;5;130m", c("#af5f5f"): "\033[48;5;131m", + c("#af5f87"): "\033[48;5;132m", c("#af5faf"): "\033[48;5;133m", c("#af5fd7"): "\033[48;5;134m", c("#af5fff"): "\033[48;5;135m", + c("#af8700"): "\033[48;5;136m", c("#af875f"): "\033[48;5;137m", c("#af8787"): "\033[48;5;138m", c("#af87af"): "\033[48;5;139m", + c("#af87d7"): "\033[48;5;140m", c("#af87ff"): "\033[48;5;141m", c("#afaf00"): "\033[48;5;142m", c("#afaf5f"): "\033[48;5;143m", + c("#afaf87"): "\033[48;5;144m", c("#afafaf"): "\033[48;5;145m", c("#afafd7"): "\033[48;5;146m", c("#afafff"): "\033[48;5;147m", + c("#afd700"): "\033[48;5;148m", c("#afd75f"): "\033[48;5;149m", c("#afd787"): "\033[48;5;150m", c("#afd7af"): "\033[48;5;151m", + c("#afd7d7"): "\033[48;5;152m", c("#afd7ff"): "\033[48;5;153m", c("#afff00"): "\033[48;5;154m", c("#afff5f"): "\033[48;5;155m", + c("#afff87"): "\033[48;5;156m", c("#afffaf"): "\033[48;5;157m", c("#afffd7"): "\033[48;5;158m", c("#afffff"): "\033[48;5;159m", + c("#d70000"): "\033[48;5;160m", c("#d7005f"): "\033[48;5;161m", c("#d70087"): "\033[48;5;162m", c("#d700af"): "\033[48;5;163m", + c("#d700d7"): "\033[48;5;164m", c("#d700ff"): "\033[48;5;165m", c("#d75f00"): "\033[48;5;166m", c("#d75f5f"): "\033[48;5;167m", + c("#d75f87"): "\033[48;5;168m", c("#d75faf"): "\033[48;5;169m", c("#d75fd7"): "\033[48;5;170m", c("#d75fff"): "\033[48;5;171m", + c("#d78700"): "\033[48;5;172m", c("#d7875f"): "\033[48;5;173m", c("#d78787"): "\033[48;5;174m", c("#d787af"): "\033[48;5;175m", + c("#d787d7"): "\033[48;5;176m", c("#d787ff"): "\033[48;5;177m", c("#d7af00"): "\033[48;5;178m", c("#d7af5f"): "\033[48;5;179m", + c("#d7af87"): "\033[48;5;180m", c("#d7afaf"): "\033[48;5;181m", c("#d7afd7"): "\033[48;5;182m", c("#d7afff"): "\033[48;5;183m", + c("#d7d700"): "\033[48;5;184m", c("#d7d75f"): "\033[48;5;185m", c("#d7d787"): "\033[48;5;186m", c("#d7d7af"): "\033[48;5;187m", + c("#d7d7d7"): "\033[48;5;188m", c("#d7d7ff"): "\033[48;5;189m", c("#d7ff00"): "\033[48;5;190m", c("#d7ff5f"): "\033[48;5;191m", + c("#d7ff87"): "\033[48;5;192m", c("#d7ffaf"): "\033[48;5;193m", c("#d7ffd7"): "\033[48;5;194m", c("#d7ffff"): "\033[48;5;195m", + c("#ff0000"): "\033[48;5;196m", c("#ff005f"): "\033[48;5;197m", c("#ff0087"): "\033[48;5;198m", c("#ff00af"): "\033[48;5;199m", + c("#ff00d7"): "\033[48;5;200m", c("#ff00ff"): "\033[48;5;201m", c("#ff5f00"): "\033[48;5;202m", c("#ff5f5f"): "\033[48;5;203m", + c("#ff5f87"): "\033[48;5;204m", c("#ff5faf"): "\033[48;5;205m", c("#ff5fd7"): "\033[48;5;206m", c("#ff5fff"): "\033[48;5;207m", + c("#ff8700"): "\033[48;5;208m", c("#ff875f"): "\033[48;5;209m", c("#ff8787"): "\033[48;5;210m", c("#ff87af"): "\033[48;5;211m", + c("#ff87d7"): "\033[48;5;212m", c("#ff87ff"): "\033[48;5;213m", c("#ffaf00"): "\033[48;5;214m", c("#ffaf5f"): "\033[48;5;215m", + c("#ffaf87"): "\033[48;5;216m", c("#ffafaf"): "\033[48;5;217m", c("#ffafd7"): "\033[48;5;218m", c("#ffafff"): "\033[48;5;219m", + c("#ffd700"): "\033[48;5;220m", c("#ffd75f"): "\033[48;5;221m", c("#ffd787"): "\033[48;5;222m", c("#ffd7af"): "\033[48;5;223m", + c("#ffd7d7"): "\033[48;5;224m", c("#ffd7ff"): "\033[48;5;225m", c("#ffff00"): "\033[48;5;226m", c("#ffff5f"): "\033[48;5;227m", + c("#ffff87"): "\033[48;5;228m", c("#ffffaf"): "\033[48;5;229m", c("#ffffd7"): "\033[48;5;230m", c("#ffffff"): "\033[48;5;231m", + c("#080808"): "\033[48;5;232m", c("#121212"): "\033[48;5;233m", c("#1c1c1c"): "\033[48;5;234m", c("#262626"): "\033[48;5;235m", + c("#303030"): "\033[48;5;236m", c("#3a3a3a"): "\033[48;5;237m", c("#444444"): "\033[48;5;238m", c("#4e4e4e"): "\033[48;5;239m", + c("#585858"): "\033[48;5;240m", c("#626262"): "\033[48;5;241m", c("#6c6c6c"): "\033[48;5;242m", c("#767676"): "\033[48;5;243m", + c("#808080"): "\033[48;5;244m", c("#8a8a8a"): "\033[48;5;245m", c("#949494"): "\033[48;5;246m", c("#9e9e9e"): "\033[48;5;247m", + c("#a8a8a8"): "\033[48;5;248m", c("#b2b2b2"): "\033[48;5;249m", c("#bcbcbc"): "\033[48;5;250m", c("#c6c6c6"): "\033[48;5;251m", + c("#d0d0d0"): "\033[48;5;252m", c("#dadada"): "\033[48;5;253m", c("#e4e4e4"): "\033[48;5;254m", c("#eeeeee"): "\033[48;5;255m", + }, + }, +} + +func entryToEscapeSequence(table *ttyTable, entry chroma.StyleEntry) string { + out := "" + if entry.Bold == chroma.Yes { + out += "\033[1m" + } + if entry.Underline == chroma.Yes { + out += "\033[4m" + } + if entry.Colour.IsSet() { + out += table.foreground[findClosest(table, entry.Colour)] + } + if entry.Background.IsSet() { + out += table.background[findClosest(table, entry.Background)] + } + return out +} + +func findClosest(table *ttyTable, seeking chroma.Colour) chroma.Colour { + closestColour := chroma.Colour(0) + closest := float64(math.MaxFloat64) + for colour := range table.foreground { + distance := colour.Distance(seeking) + if distance < closest { + closest = distance + closestColour = colour + } + } + return closestColour +} + +func styleToEscapeSequence(table *ttyTable, style *chroma.Style) map[chroma.TokenType]string { + out := map[chroma.TokenType]string{} + for _, ttype := range style.Types() { + entry := style.Get(ttype) + out[ttype] = entryToEscapeSequence(table, entry) + } + return out +} + +type indexedTTYFormatter struct { + table *ttyTable +} + +func (c *indexedTTYFormatter) Format(w io.Writer, style *chroma.Style, it chroma.Iterator) (err error) { + defer func() { + if perr := recover(); perr != nil { + err = perr.(error) + } + }() + theme := styleToEscapeSequence(c.table, style) + for token := it(); token != nil; token = it() { + // TODO: Cache token lookups? + clr, ok := theme[token.Type] + if !ok { + clr, ok = theme[token.Type.SubCategory()] + if !ok { + clr = theme[token.Type.Category()] + // if !ok { + // clr = theme[chroma.InheritStyle] + // } + } + } + if clr != "" { + fmt.Fprint(w, clr) + } + fmt.Fprint(w, token.Value) + if clr != "" { + fmt.Fprintf(w, "\033[0m") + } + } + return nil +} + +// TTY8 is an 8-colour terminal formatter. +// +// The Lab colour space is used to map RGB values to the most appropriate index colour. +var TTY8 = Register("terminal", &indexedTTYFormatter{ttyTables[8]}) + +// TTY256 is a 256-colour terminal formatter. +// +// The Lab colour space is used to map RGB values to the most appropriate index colour. +var TTY256 = Register("terminal256", &indexedTTYFormatter{ttyTables[256]}) diff --git a/vendor/github.com/alecthomas/chroma/formatters/tty_truecolour.go b/vendor/github.com/alecthomas/chroma/formatters/tty_truecolour.go new file mode 100644 index 0000000..e9c264a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/formatters/tty_truecolour.go @@ -0,0 +1,38 @@ +package formatters + +import ( + "fmt" + "io" + + "github.com/alecthomas/chroma" +) + +// TTY16m is a true-colour terminal formatter. +var TTY16m = Register("terminal16m", chroma.FormatterFunc(trueColourFormatter)) + +func trueColourFormatter(w io.Writer, style *chroma.Style, it chroma.Iterator) error { + for token := it(); token != nil; token = it() { + entry := style.Get(token.Type) + if !entry.IsZero() { + out := "" + if entry.Bold == chroma.Yes { + out += "\033[1m" + } + if entry.Underline == chroma.Yes { + out += "\033[4m" + } + if entry.Colour.IsSet() { + out += fmt.Sprintf("\033[38;2;%d;%d;%dm", entry.Colour.Red(), entry.Colour.Green(), entry.Colour.Blue()) + } + if entry.Background.IsSet() { + out += fmt.Sprintf("\033[48;2;%d;%d;%dm", entry.Background.Red(), entry.Background.Green(), entry.Background.Blue()) + } + fmt.Fprint(w, out) + } + fmt.Fprint(w, token.Value) + if !entry.IsZero() { + fmt.Fprint(w, "\033[0m") + } + } + return nil +} diff --git a/vendor/github.com/alecthomas/chroma/iterator.go b/vendor/github.com/alecthomas/chroma/iterator.go new file mode 100644 index 0000000..43861c8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/iterator.go @@ -0,0 +1,43 @@ +package chroma + +// An Iterator across tokens. +// +// nil will be returned at the end of the Token stream. +// +// If an error occurs within an Iterator, it may propagate this in a panic. Formatters should recover. +type Iterator func() *Token + +// Tokens consumes all tokens from the iterator and returns them as a slice. +func (i Iterator) Tokens() []*Token { + out := []*Token{} + for t := i(); t != nil; t = i() { + out = append(out, t) + } + return out +} + +// Concaterator concatenates tokens from a series of iterators. +func Concaterator(iterators ...Iterator) Iterator { + return func() *Token { + for len(iterators) > 0 { + t := iterators[0]() + if t != nil { + return t + } + iterators = iterators[1:] + } + return nil + } +} + +// Literator converts a sequence of literal Tokens into an Iterator. +func Literator(tokens ...*Token) Iterator { + return func() (out *Token) { + if len(tokens) == 0 { + return nil + } + token := tokens[0] + tokens = tokens[1:] + return token + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexer.go b/vendor/github.com/alecthomas/chroma/lexer.go new file mode 100644 index 0000000..804e7e0 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexer.go @@ -0,0 +1,112 @@ +package chroma + +import ( + "fmt" +) + +var ( + defaultOptions = &TokeniseOptions{ + State: "root", + } +) + +// Config for a lexer. +type Config struct { + // Name of the lexer. + Name string + + // Shortcuts for the lexer + Aliases []string + + // File name globs + Filenames []string + + // Secondary file name globs + AliasFilenames []string + + // MIME types + MimeTypes []string + + // Regex matching is case-insensitive. + CaseInsensitive bool + + // Regex matches all characters. + DotAll bool + + // Regex does not match across lines ($ matches EOL). + // + // Defaults to multiline. + NotMultiline bool + + // Don't strip leading and trailing newlines from the input. + // DontStripNL bool + + // Strip all leading and trailing whitespace from the input + // StripAll bool + + // Make sure that the input ends with a newline. This + // is required for some lexers that consume input linewise. + EnsureNL bool + + // If given and greater than 0, expand tabs in the input. + // TabSize int +} + +// Token output to formatter. +type Token struct { + Type TokenType + Value string +} + +func (t *Token) String() string { return t.Value } +func (t *Token) GoString() string { return fmt.Sprintf("Token{%s, %q}", t.Type, t.Value) } + +func (t *Token) Clone() *Token { + clone := &Token{} + *clone = *t + return clone +} + +type TokeniseOptions struct { + // State to start tokenisation in. Defaults to "root". + State string +} + +// A Lexer for tokenising source code. +type Lexer interface { + // Config describing the features of the Lexer. + Config() *Config + // Tokenise returns an Iterator over tokens in text. + Tokenise(options *TokeniseOptions, text string) (Iterator, error) +} + +type Lexers []Lexer + +// Pick attempts to pick the best Lexer for a piece of source code. May return nil. +func (l Lexers) Pick(text string) Lexer { + if len(l) == 0 { + return nil + } + var picked Lexer + highest := float32(-1) + for _, lexer := range l { + if analyser, ok := lexer.(Analyser); ok { + score := analyser.AnalyseText(text) + if score > highest { + highest = score + picked = lexer + continue + } + } + } + return picked +} + +func (l Lexers) Len() int { return len(l) } +func (l Lexers) Swap(i, j int) { l[i], l[j] = l[j], l[i] } +func (l Lexers) Less(i, j int) bool { return l[i].Config().Name < l[j].Config().Name } + +// Analyser determines how appropriate this lexer is for the given text. +type Analyser interface { + AnalyseText(text string) float32 +} diff --git a/vendor/github.com/alecthomas/chroma/lexer_test.go b/vendor/github.com/alecthomas/chroma/lexer_test.go new file mode 100644 index 0000000..b48c12f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexer_test.go @@ -0,0 +1,52 @@ +package chroma + +import ( + "testing" + + "github.com/alecthomas/assert" +) + +func TestTokenTypeClassifiers(t *testing.T) { + assert.True(t, GenericDeleted.InCategory(Generic)) + assert.True(t, LiteralStringBacktick.InSubCategory(String)) + assert.Equal(t, LiteralStringBacktick.String(), "LiteralStringBacktick") +} + +func TestSimpleLexer(t *testing.T) { + lexer, err := NewLexer( + &Config{ + Name: "INI", + Aliases: []string{"ini", "cfg"}, + Filenames: []string{"*.ini", "*.cfg"}, + }, + map[string][]Rule{ + "root": { + {`\s+`, Whitespace, nil}, + {`;.*?$`, Comment, nil}, + {`\[.*?\]$`, Keyword, nil}, + {`(.*?)(\s*)(=)(\s*)(.*?)$`, ByGroups(Name, Whitespace, Operator, Whitespace, String), nil}, + }, + }, + ) + assert.NoError(t, err) + actual, err := Tokenise(lexer, nil, ` + ; this is a comment + [section] + a = 10 +`) + assert.NoError(t, err) + expected := []*Token{ + {Whitespace, "\n\t"}, + {Comment, "; this is a comment"}, + {Whitespace, "\n\t"}, + {Keyword, "[section]"}, + {Whitespace, "\n\t"}, + {Name, "a"}, + {Whitespace, " "}, + {Operator, "="}, + {Whitespace, " "}, + {LiteralString, "10"}, + {Whitespace, "\n"}, + } + assert.Equal(t, expected, actual) +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/abnf.go b/vendor/github.com/alecthomas/chroma/lexers/abnf.go new file mode 100644 index 0000000..c66e80f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/abnf.go @@ -0,0 +1,37 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Abnf lexer. +var Abnf = Register(MustNewLexer( + &Config{ + Name: "ABNF", + Aliases: []string{"abnf"}, + Filenames: []string{"*.abnf"}, + MimeTypes: []string{"text/x-abnf"}, + }, + Rules{ + "root": { + {`;.*$`, CommentSingle, nil}, + {`(%[si])?"[^"]*"`, Literal, nil}, + {`%b[01]+\-[01]+\b`, Literal, nil}, + {`%b[01]+(\.[01]+)*\b`, Literal, nil}, + {`%d[0-9]+\-[0-9]+\b`, Literal, nil}, + {`%d[0-9]+(\.[0-9]+)*\b`, Literal, nil}, + {`%x[0-9a-fA-F]+\-[0-9a-fA-F]+\b`, Literal, nil}, + {`%x[0-9a-fA-F]+(\.[0-9a-fA-F]+)*\b`, Literal, nil}, + {`\b[0-9]+\*[0-9]+`, Operator, nil}, + {`\b[0-9]+\*`, Operator, nil}, + {`\b[0-9]+`, Operator, nil}, + {`\*`, Operator, nil}, + {Words(``, `\b`, `ALPHA`, `BIT`, `CHAR`, `CR`, `CRLF`, `CTL`, `DIGIT`, `DQUOTE`, `HEXDIG`, `HTAB`, `LF`, `LWSP`, `OCTET`, `SP`, `VCHAR`, `WSP`), Keyword, nil}, + {`[a-zA-Z][a-zA-Z0-9-]+\b`, NameClass, nil}, + {`(=/|=|/)`, Operator, nil}, + {`[\[\]()]`, Punctuation, nil}, + {`\s+`, Text, nil}, + {`.`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/actionscript.go b/vendor/github.com/alecthomas/chroma/lexers/actionscript.go new file mode 100644 index 0000000..cdc5cde --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/actionscript.go @@ -0,0 +1,38 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Actionscript lexer. +var Actionscript = Register(MustNewLexer( + &Config{ + Name: "ActionScript", + Aliases: []string{"as", "actionscript"}, + Filenames: []string{"*.as"}, + MimeTypes: []string{"application/x-actionscript", "text/x-actionscript", "text/actionscript"}, + NotMultiline: true, + DotAll: true, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*.*?\*/`, CommentMultiline, nil}, + {`/(\\\\|\\/|[^/\n])*/[gim]*`, LiteralStringRegex, nil}, + {`[~^*!%&<>|+=:;,/?\\-]+`, Operator, nil}, + {`[{}\[\]();.]+`, Punctuation, nil}, + {Words(``, `\b`, `case`, `default`, `for`, `each`, `in`, `while`, `do`, `break`, `return`, `continue`, `if`, `else`, `throw`, `try`, `catch`, `var`, `with`, `new`, `typeof`, `arguments`, `instanceof`, `this`, `switch`), Keyword, nil}, + {Words(``, `\b`, `class`, `public`, `final`, `internal`, `native`, `override`, `private`, `protected`, `static`, `import`, `extends`, `implements`, `interface`, `intrinsic`, `return`, `super`, `dynamic`, `function`, `const`, `get`, `namespace`, `package`, `set`), KeywordDeclaration, nil}, + {`(true|false|null|NaN|Infinity|-Infinity|undefined|Void)\b`, KeywordConstant, nil}, + {Words(``, `\b`, `Accessibility`, `AccessibilityProperties`, `ActionScriptVersion`, `ActivityEvent`, `AntiAliasType`, `ApplicationDomain`, `AsBroadcaster`, `Array`, `AsyncErrorEvent`, `AVM1Movie`, `BevelFilter`, `Bitmap`, `BitmapData`, `BitmapDataChannel`, `BitmapFilter`, `BitmapFilterQuality`, `BitmapFilterType`, `BlendMode`, `BlurFilter`, `Boolean`, `ByteArray`, `Camera`, `Capabilities`, `CapsStyle`, `Class`, `Color`, `ColorMatrixFilter`, `ColorTransform`, `ContextMenu`, `ContextMenuBuiltInItems`, `ContextMenuEvent`, `ContextMenuItem`, `ConvultionFilter`, `CSMSettings`, `DataEvent`, `Date`, `DefinitionError`, `DeleteObjectSample`, `Dictionary`, `DisplacmentMapFilter`, `DisplayObject`, `DisplacmentMapFilterMode`, `DisplayObjectContainer`, `DropShadowFilter`, `Endian`, `EOFError`, `Error`, `ErrorEvent`, `EvalError`, `Event`, `EventDispatcher`, `EventPhase`, `ExternalInterface`, `FileFilter`, `FileReference`, `FileReferenceList`, `FocusDirection`, `FocusEvent`, `Font`, `FontStyle`, `FontType`, `FrameLabel`, `FullScreenEvent`, `Function`, `GlowFilter`, `GradientBevelFilter`, `GradientGlowFilter`, `GradientType`, `Graphics`, `GridFitType`, `HTTPStatusEvent`, `IBitmapDrawable`, `ID3Info`, `IDataInput`, `IDataOutput`, `IDynamicPropertyOutputIDynamicPropertyWriter`, `IEventDispatcher`, `IExternalizable`, `IllegalOperationError`, `IME`, `IMEConversionMode`, `IMEEvent`, `int`, `InteractiveObject`, `InterpolationMethod`, `InvalidSWFError`, `InvokeEvent`, `IOError`, `IOErrorEvent`, `JointStyle`, `Key`, `Keyboard`, `KeyboardEvent`, `KeyLocation`, `LineScaleMode`, `Loader`, `LoaderContext`, `LoaderInfo`, `LoadVars`, `LocalConnection`, `Locale`, `Math`, `Matrix`, `MemoryError`, `Microphone`, `MorphShape`, `Mouse`, `MouseEvent`, `MovieClip`, `MovieClipLoader`, `Namespace`, `NetConnection`, `NetStatusEvent`, `NetStream`, `NewObjectSample`, `Number`, `Object`, `ObjectEncoding`, `PixelSnapping`, `Point`, `PrintJob`, `PrintJobOptions`, `PrintJobOrientation`, `ProgressEvent`, `Proxy`, `QName`, `RangeError`, `Rectangle`, `ReferenceError`, `RegExp`, `Responder`, `Sample`, `Scene`, `ScriptTimeoutError`, `Security`, `SecurityDomain`, `SecurityError`, `SecurityErrorEvent`, `SecurityPanel`, `Selection`, `Shape`, `SharedObject`, `SharedObjectFlushStatus`, `SimpleButton`, `Socket`, `Sound`, `SoundChannel`, `SoundLoaderContext`, `SoundMixer`, `SoundTransform`, `SpreadMethod`, `Sprite`, `StackFrame`, `StackOverflowError`, `Stage`, `StageAlign`, `StageDisplayState`, `StageQuality`, `StageScaleMode`, `StaticText`, `StatusEvent`, `String`, `StyleSheet`, `SWFVersion`, `SyncEvent`, `SyntaxError`, `System`, `TextColorType`, `TextField`, `TextFieldAutoSize`, `TextFieldType`, `TextFormat`, `TextFormatAlign`, `TextLineMetrics`, `TextRenderer`, `TextSnapshot`, `Timer`, `TimerEvent`, `Transform`, `TypeError`, `uint`, `URIError`, `URLLoader`, `URLLoaderDataFormat`, `URLRequest`, `URLRequestHeader`, `URLRequestMethod`, `URLStream`, `URLVariabeles`, `VerifyError`, `Video`, `XML`, `XMLDocument`, `XMLList`, `XMLNode`, `XMLNodeType`, `XMLSocket`, `XMLUI`), NameBuiltin, nil}, + {Words(``, `\b`, `decodeURI`, `decodeURIComponent`, `encodeURI`, `escape`, `eval`, `isFinite`, `isNaN`, `isXMLName`, `clearInterval`, `fscommand`, `getTimer`, `getURL`, `getVersion`, `parseFloat`, `parseInt`, `setInterval`, `trace`, `updateAfterEvent`, `unescape`), NameFunction, nil}, + {`[$a-zA-Z_]\w*`, NameOther, nil}, + {`[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?`, LiteralNumberFloat, nil}, + {`0x[0-9a-f]+`, LiteralNumberHex, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/actionscript3.go b/vendor/github.com/alecthomas/chroma/lexers/actionscript3.go new file mode 100644 index 0000000..86037a5 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/actionscript3.go @@ -0,0 +1,55 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Actionscript 3 lexer. +var Actionscript3 = Register(MustNewLexer( + &Config{ + Name: "ActionScript 3", + Aliases: []string{"as3", "actionscript3"}, + Filenames: []string{"*.as"}, + MimeTypes: []string{"application/x-actionscript3", "text/x-actionscript3", "text/actionscript3"}, + DotAll: true, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`(function\s+)([$a-zA-Z_]\w*)(\s*)(\()`, ByGroups(KeywordDeclaration, NameFunction, Text, Operator), Push("funcparams")}, + {`(var|const)(\s+)([$a-zA-Z_]\w*)(\s*)(:)(\s*)([$a-zA-Z_]\w*(?:\.<\w+>)?)`, ByGroups(KeywordDeclaration, Text, Name, Text, Punctuation, Text, KeywordType), nil}, + {`(import|package)(\s+)((?:[$a-zA-Z_]\w*|\.)+)(\s*)`, ByGroups(Keyword, Text, NameNamespace, Text), nil}, + {`(new)(\s+)([$a-zA-Z_]\w*(?:\.<\w+>)?)(\s*)(\()`, ByGroups(Keyword, Text, KeywordType, Text, Operator), nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*.*?\*/`, CommentMultiline, nil}, + {`/(\\\\|\\/|[^\n])*/[gisx]*`, LiteralStringRegex, nil}, + {`(\.)([$a-zA-Z_]\w*)`, ByGroups(Operator, NameAttribute), nil}, + {`(case|default|for|each|in|while|do|break|return|continue|if|else|throw|try|catch|with|new|typeof|arguments|instanceof|this|switch|import|include|as|is)\b`, Keyword, nil}, + {`(class|public|final|internal|native|override|private|protected|static|import|extends|implements|interface|intrinsic|return|super|dynamic|function|const|get|namespace|package|set)\b`, KeywordDeclaration, nil}, + {`(true|false|null|NaN|Infinity|-Infinity|undefined|void)\b`, KeywordConstant, nil}, + {`(decodeURI|decodeURIComponent|encodeURI|escape|eval|isFinite|isNaN|isXMLName|clearInterval|fscommand|getTimer|getURL|getVersion|isFinite|parseFloat|parseInt|setInterval|trace|updateAfterEvent|unescape)\b`, NameFunction, nil}, + {`[$a-zA-Z_]\w*`, Name, nil}, + {`[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?`, LiteralNumberFloat, nil}, + {`0x[0-9a-f]+`, LiteralNumberHex, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`[~^*!%&<>|+=:;,/?\\{}\[\]().-]+`, Operator, nil}, + }, + "funcparams": { + {`\s+`, Text, nil}, + {`(\s*)(\.\.\.)?([$a-zA-Z_]\w*)(\s*)(:)(\s*)([$a-zA-Z_]\w*(?:\.<\w+>)?|\*)(\s*)`, ByGroups(Text, Punctuation, Name, Text, Operator, Text, KeywordType, Text), Push("defval")}, + {`\)`, Operator, Push("type")}, + }, + "type": { + {`(\s*)(:)(\s*)([$a-zA-Z_]\w*(?:\.<\w+>)?|\*)`, ByGroups(Text, Operator, Text, KeywordType), Pop(2)}, + {`\s+`, Text, Pop(2)}, + Default(Pop(2)), + }, + "defval": { + {`(=)(\s*)([^(),]+)(\s*)(,?)`, ByGroups(Operator, Text, UsingSelf("root"), Text, Operator), Pop(1)}, + {`,`, Operator, Pop(1)}, + Default(Pop(1)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/ada.go b/vendor/github.com/alecthomas/chroma/lexers/ada.go new file mode 100644 index 0000000..f11ed8c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/ada.go @@ -0,0 +1,113 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Ada lexer. +var Ada = Register(MustNewLexer( + &Config{ + Name: "Ada", + Aliases: []string{"ada", "ada95", "ada2005"}, + Filenames: []string{"*.adb", "*.ads", "*.ada"}, + MimeTypes: []string{"text/x-ada"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`[^\S\n]+`, Text, nil}, + {`--.*?\n`, CommentSingle, nil}, + {`[^\S\n]+`, Text, nil}, + {`function|procedure|entry`, KeywordDeclaration, Push("subprogram")}, + {`(subtype|type)(\s+)(\w+)`, ByGroups(KeywordDeclaration, Text, KeywordType), Push("type_def")}, + {`task|protected`, KeywordDeclaration, nil}, + {`(subtype)(\s+)`, ByGroups(KeywordDeclaration, Text), nil}, + {`(end)(\s+)`, ByGroups(KeywordReserved, Text), Push("end")}, + {`(pragma)(\s+)(\w+)`, ByGroups(KeywordReserved, Text, CommentPreproc), nil}, + {`(true|false|null)\b`, KeywordConstant, nil}, + {Words(``, `\b`, `Address`, `Byte`, `Boolean`, `Character`, `Controlled`, `Count`, `Cursor`, `Duration`, `File_Mode`, `File_Type`, `Float`, `Generator`, `Integer`, `Long_Float`, `Long_Integer`, `Long_Long_Float`, `Long_Long_Integer`, `Natural`, `Positive`, `Reference_Type`, `Short_Float`, `Short_Integer`, `Short_Short_Float`, `Short_Short_Integer`, `String`, `Wide_Character`, `Wide_String`), KeywordType, nil}, + {`(and(\s+then)?|in|mod|not|or(\s+else)|rem)\b`, OperatorWord, nil}, + {`generic|private`, KeywordDeclaration, nil}, + {`package`, KeywordDeclaration, Push("package")}, + {`array\b`, KeywordReserved, Push("array_def")}, + {`(with|use)(\s+)`, ByGroups(KeywordNamespace, Text), Push("import")}, + {`(\w+)(\s*)(:)(\s*)(constant)`, ByGroups(NameConstant, Text, Punctuation, Text, KeywordReserved), nil}, + {`<<\w+>>`, NameLabel, nil}, + {`(\w+)(\s*)(:)(\s*)(declare|begin|loop|for|while)`, ByGroups(NameLabel, Text, Punctuation, Text, KeywordReserved), nil}, + {Words(`\b`, `\b`, `abort`, `abs`, `abstract`, `accept`, `access`, `aliased`, `all`, `array`, `at`, `begin`, `body`, `case`, `constant`, `declare`, `delay`, `delta`, `digits`, `do`, `else`, `elsif`, `end`, `entry`, `exception`, `exit`, `interface`, `for`, `goto`, `if`, `is`, `limited`, `loop`, `new`, `null`, `of`, `or`, `others`, `out`, `overriding`, `pragma`, `protected`, `raise`, `range`, `record`, `renames`, `requeue`, `return`, `reverse`, `select`, `separate`, `subtype`, `synchronized`, `task`, `tagged`, `terminate`, `then`, `type`, `until`, `when`, `while`, `xor`), KeywordReserved, nil}, + {`"[^"]*"`, LiteralString, nil}, + Include("attribute"), + Include("numbers"), + {`'[^']'`, LiteralStringChar, nil}, + {`(\w+)(\s*|[(,])`, ByGroups(Name, UsingSelf("root")), nil}, + {`(<>|=>|:=|[()|:;,.'])`, Punctuation, nil}, + {`[*<>+=/&-]`, Operator, nil}, + {`\n+`, Text, nil}, + }, + "numbers": { + {`[0-9_]+#[0-9a-f]+#`, LiteralNumberHex, nil}, + {`[0-9_]+\.[0-9_]*`, LiteralNumberFloat, nil}, + {`[0-9_]+`, LiteralNumberInteger, nil}, + }, + "attribute": { + {`(')(\w+)`, ByGroups(Punctuation, NameAttribute), nil}, + }, + "subprogram": { + {`\(`, Punctuation, Push("#pop", "formal_part")}, + {`;`, Punctuation, Pop(1)}, + {`is\b`, KeywordReserved, Pop(1)}, + {`"[^"]+"|\w+`, NameFunction, nil}, + Include("root"), + }, + "end": { + {`(if|case|record|loop|select)`, KeywordReserved, nil}, + {`"[^"]+"|[\w.]+`, NameFunction, nil}, + {`\s+`, Text, nil}, + {`;`, Punctuation, Pop(1)}, + }, + "type_def": { + {`;`, Punctuation, Pop(1)}, + {`\(`, Punctuation, Push("formal_part")}, + {`with|and|use`, KeywordReserved, nil}, + {`array\b`, KeywordReserved, Push("#pop", "array_def")}, + {`record\b`, KeywordReserved, Push("record_def")}, + {`(null record)(;)`, ByGroups(KeywordReserved, Punctuation), Pop(1)}, + Include("root"), + }, + "array_def": { + {`;`, Punctuation, Pop(1)}, + {`(\w+)(\s+)(range)`, ByGroups(KeywordType, Text, KeywordReserved), nil}, + Include("root"), + }, + "record_def": { + {`end record`, KeywordReserved, Pop(1)}, + Include("root"), + }, + "import": { + {`[\w.]+`, NameNamespace, Pop(1)}, + Default(Pop(1)), + }, + "formal_part": { + {`\)`, Punctuation, Pop(1)}, + {`\w+`, NameVariable, nil}, + {`,|:[^=]`, Punctuation, nil}, + {`(in|not|null|out|access)\b`, KeywordReserved, nil}, + Include("root"), + }, + "package": { + {`body`, KeywordDeclaration, nil}, + {`is\s+new|renames`, KeywordReserved, nil}, + {`is`, KeywordReserved, Pop(1)}, + {`;`, Punctuation, Pop(1)}, + {`\(`, Punctuation, Push("package_instantiation")}, + {`([\w.]+)`, NameClass, nil}, + Include("root"), + }, + "package_instantiation": { + {`("[^"]+"|\w+)(\s+)(=>)`, ByGroups(NameVariable, Text, Punctuation), nil}, + {`[\w.\'"]`, Text, nil}, + {`\)`, Punctuation, Pop(1)}, + Include("root"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/angular2.go b/vendor/github.com/alecthomas/chroma/lexers/angular2.go new file mode 100644 index 0000000..0e65b7f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/angular2.go @@ -0,0 +1,41 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Angular2 lexer. +var Angular2 = Register(MustNewLexer( + &Config{ + Name: "Angular2", + Aliases: []string{"ng2"}, + Filenames: []string{}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`[^{([*#]+`, Other, nil}, + {`(\{\{)(\s*)`, ByGroups(CommentPreproc, Text), Push("ngExpression")}, + {`([([]+)([\w:.-]+)([\])]+)(\s*)(=)(\s*)`, ByGroups(Punctuation, NameAttribute, Punctuation, Text, Operator, Text), Push("attr")}, + {`([([]+)([\w:.-]+)([\])]+)(\s*)`, ByGroups(Punctuation, NameAttribute, Punctuation, Text), nil}, + {`([*#])([\w:.-]+)(\s*)(=)(\s*)`, ByGroups(Punctuation, NameAttribute, Punctuation, Operator), Push("attr")}, + {`([*#])([\w:.-]+)(\s*)`, ByGroups(Punctuation, NameAttribute, Punctuation), nil}, + }, + "ngExpression": { + {`\s+(\|\s+)?`, Text, nil}, + {`\}\}`, CommentPreproc, Pop(1)}, + {`:?(true|false)`, LiteralStringBoolean, nil}, + {`:?"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`:?'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, + {`[a-zA-Z][\w-]*(\(.*\))?`, NameVariable, nil}, + {`\.[\w-]+(\(.*\))?`, NameVariable, nil}, + {`(\?)(\s*)([^}\s]+)(\s*)(:)(\s*)([^}\s]+)(\s*)`, ByGroups(Operator, Text, LiteralString, Text, Operator, Text, LiteralString, Text), nil}, + }, + "attr": { + {`".*?"`, LiteralString, Pop(1)}, + {`'.*?'`, LiteralString, Pop(1)}, + {`[^\s>]+`, LiteralString, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/antlr.go b/vendor/github.com/alecthomas/chroma/lexers/antlr.go new file mode 100644 index 0000000..9260925 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/antlr.go @@ -0,0 +1,100 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// ANTLR lexer. +var ANTLR = Register(MustNewLexer( + &Config{ + Name: "ANTLR", + Aliases: []string{"antlr"}, + Filenames: []string{}, + MimeTypes: []string{}, + }, + Rules{ + "whitespace": { + {`\s+`, TextWhitespace, nil}, + }, + "comments": { + {`//.*$`, Comment, nil}, + {`/\*(.|\n)*?\*/`, Comment, nil}, + }, + "root": { + Include("whitespace"), + Include("comments"), + {`(lexer|parser|tree)?(\s*)(grammar\b)(\s*)([A-Za-z]\w*)(;)`, ByGroups(Keyword, TextWhitespace, Keyword, TextWhitespace, NameClass, Punctuation), nil}, + {`options\b`, Keyword, Push("options")}, + {`tokens\b`, Keyword, Push("tokens")}, + {`(scope)(\s*)([A-Za-z]\w*)(\s*)(\{)`, ByGroups(Keyword, TextWhitespace, NameVariable, TextWhitespace, Punctuation), Push("action")}, + {`(catch|finally)\b`, Keyword, Push("exception")}, + {`(@[A-Za-z]\w*)(\s*)(::)?(\s*)([A-Za-z]\w*)(\s*)(\{)`, ByGroups(NameLabel, TextWhitespace, Punctuation, TextWhitespace, NameLabel, TextWhitespace, Punctuation), Push("action")}, + {`((?:protected|private|public|fragment)\b)?(\s*)([A-Za-z]\w*)(!)?`, ByGroups(Keyword, TextWhitespace, NameLabel, Punctuation), Push("rule-alts", "rule-prelims")}, + }, + "exception": { + {`\n`, TextWhitespace, Pop(1)}, + {`\s`, TextWhitespace, nil}, + Include("comments"), + {`\[`, Punctuation, Push("nested-arg-action")}, + {`\{`, Punctuation, Push("action")}, + }, + "rule-prelims": { + Include("whitespace"), + Include("comments"), + {`returns\b`, Keyword, nil}, + {`\[`, Punctuation, Push("nested-arg-action")}, + {`\{`, Punctuation, Push("action")}, + {`(throws)(\s+)([A-Za-z]\w*)`, ByGroups(Keyword, TextWhitespace, NameLabel), nil}, + {`(,)(\s*)([A-Za-z]\w*)`, ByGroups(Punctuation, TextWhitespace, NameLabel), nil}, + {`options\b`, Keyword, Push("options")}, + {`(scope)(\s+)(\{)`, ByGroups(Keyword, TextWhitespace, Punctuation), Push("action")}, + {`(scope)(\s+)([A-Za-z]\w*)(\s*)(;)`, ByGroups(Keyword, TextWhitespace, NameLabel, TextWhitespace, Punctuation), nil}, + {`(@[A-Za-z]\w*)(\s*)(\{)`, ByGroups(NameLabel, TextWhitespace, Punctuation), Push("action")}, + {`:`, Punctuation, Pop(1)}, + }, + "rule-alts": { + Include("whitespace"), + Include("comments"), + {`options\b`, Keyword, Push("options")}, + {`:`, Punctuation, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralString, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`<<([^>]|>[^>])>>`, LiteralString, nil}, + {`\$?[A-Z_]\w*`, NameConstant, nil}, + {`\$?[a-z_]\w*`, NameVariable, nil}, + {`(\+|\||->|=>|=|\(|\)|\.\.|\.|\?|\*|\^|!|\#|~)`, Operator, nil}, + {`,`, Punctuation, nil}, + {`\[`, Punctuation, Push("nested-arg-action")}, + {`\{`, Punctuation, Push("action")}, + {`;`, Punctuation, Pop(1)}, + }, + "tokens": { + Include("whitespace"), + Include("comments"), + {`\{`, Punctuation, nil}, + {`([A-Z]\w*)(\s*)(=)?(\s*)(\'(?:\\\\|\\\'|[^\']*)\')?(\s*)(;)`, ByGroups(NameLabel, TextWhitespace, Punctuation, TextWhitespace, LiteralString, TextWhitespace, Punctuation), nil}, + {`\}`, Punctuation, Pop(1)}, + }, + "options": { + Include("whitespace"), + Include("comments"), + {`\{`, Punctuation, nil}, + {`([A-Za-z]\w*)(\s*)(=)(\s*)([A-Za-z]\w*|\'(?:\\\\|\\\'|[^\']*)\'|[0-9]+|\*)(\s*)(;)`, ByGroups(NameVariable, TextWhitespace, Punctuation, TextWhitespace, Text, TextWhitespace, Punctuation), nil}, + {`\}`, Punctuation, Pop(1)}, + }, + "action": { + {`([^${}\'"/\\]+|"(\\\\|\\"|[^"])*"|'(\\\\|\\'|[^'])*'|//.*$\n?|/\*(.|\n)*?\*/|/(?!\*)(\\\\|\\/|[^/])*/|\\(?!%)|/)+`, Other, nil}, + {`(\\)(%)`, ByGroups(Punctuation, Other), nil}, + {`(\$[a-zA-Z]+)(\.?)(text|value)?`, ByGroups(NameVariable, Punctuation, NameProperty), nil}, + {`\{`, Punctuation, Push()}, + {`\}`, Punctuation, Pop(1)}, + }, + "nested-arg-action": { + {`([^$\[\]\'"/]+|"(\\\\|\\"|[^"])*"|'(\\\\|\\'|[^'])*'|//.*$\n?|/\*(.|\n)*?\*/|/(?!\*)(\\\\|\\/|[^/])*/|/)+`, Other, nil}, + {`\[`, Punctuation, Push()}, + {`\]`, Punctuation, Pop(1)}, + {`(\$[a-zA-Z]+)(\.?)(text|value)?`, ByGroups(NameVariable, Punctuation, NameProperty), nil}, + {`(\\\\|\\\]|\\\[|[^\[\]])+`, Other, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/apache.go b/vendor/github.com/alecthomas/chroma/lexers/apache.go new file mode 100644 index 0000000..7ef5e0b --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/apache.go @@ -0,0 +1,37 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Apacheconf lexer. +var Apacheconf = Register(MustNewLexer( + &Config{ + Name: "ApacheConf", + Aliases: []string{"apacheconf", "aconf", "apache"}, + Filenames: []string{".htaccess", "apache.conf", "apache2.conf"}, + MimeTypes: []string{"text/x-apacheconf"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`(#.*?)$`, Comment, nil}, + {`(<[^\s>]+)(?:(\s+)(.*?))?(>)`, ByGroups(NameTag, Text, LiteralString, NameTag), nil}, + {`([a-z]\w*)(\s+)`, ByGroups(NameBuiltin, Text), Push("value")}, + {`\.+`, Text, nil}, + }, + "value": { + {`\\\n`, Text, nil}, + {`$`, Text, Pop(1)}, + {`\\`, Text, nil}, + {`[^\S\n]+`, Text, nil}, + {`\d+\.\d+\.\d+\.\d+(?:/\d+)?`, LiteralNumber, nil}, + {`\d+`, LiteralNumber, nil}, + {`/([a-z0-9][\w./-]+)`, LiteralStringOther, nil}, + {`(on|off|none|any|all|double|email|dns|min|minimal|os|productonly|full|emerg|alert|crit|error|warn|notice|info|debug|registry|script|inetd|standalone|user|group)\b`, Keyword, nil}, + {`"([^"\\]*(?:\\.[^"\\]*)*)"`, LiteralStringDouble, nil}, + {`[^\s"\\]+`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/api.go b/vendor/github.com/alecthomas/chroma/lexers/api.go new file mode 100644 index 0000000..8ca064f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/api.go @@ -0,0 +1,116 @@ +package lexers + +import ( + "path/filepath" + "sort" + + "github.com/danwakefield/fnmatch" + + "github.com/alecthomas/chroma" +) + +// Registry of Lexers. +var Registry = struct { + Lexers chroma.Lexers + byName map[string]chroma.Lexer + byAlias map[string]chroma.Lexer +}{ + byName: map[string]chroma.Lexer{}, + byAlias: map[string]chroma.Lexer{}, +} + +// Names of all lexers, optionally including aliases. +func Names(withAliases bool) []string { + out := []string{} + for _, lexer := range Registry.Lexers { + config := lexer.Config() + out = append(out, config.Name) + if withAliases { + out = append(out, config.Aliases...) + } + } + sort.Strings(out) + return out +} + +// Get a Lexer by name. +func Get(name string) chroma.Lexer { + if lexer := Registry.byName[name]; lexer != nil { + return lexer + } + return Registry.byAlias[name] +} + +// MatchMimeType attempts to find a lexer for the given MIME type. +func MatchMimeType(mimeType string) chroma.Lexer { + for _, l := range Registry.Lexers { + for _, lmt := range l.Config().MimeTypes { + if mimeType == lmt { + return l + } + } + } + return nil +} + +// Match returns the first lexer matching filename. +func Match(filename string) chroma.Lexer { + filename = filepath.Base(filename) + // First, try primary filename matches. + for _, lexer := range Registry.Lexers { + config := lexer.Config() + for _, glob := range config.Filenames { + if fnmatch.Match(glob, filename, 0) { + return lexer + } + } + } + // Next, try filename aliases. + for _, lexer := range Registry.Lexers { + config := lexer.Config() + for _, glob := range config.AliasFilenames { + if fnmatch.Match(glob, filename, 0) { + return lexer + } + } + } + return nil +} + +// Analyse text content and return the "best" lexer.. +func Analyse(text string) chroma.Lexer { + var picked chroma.Lexer + highest := float32(0.0) + for _, lexer := range Registry.Lexers { + if analyser, ok := lexer.(chroma.Analyser); ok { + weight := analyser.AnalyseText(text) + if weight > highest { + picked = lexer + highest = weight + } + } + } + return picked +} + +// Register a Lexer with the global registry. +func Register(lexer chroma.Lexer) chroma.Lexer { + config := lexer.Config() + Registry.byName[config.Name] = lexer + for _, alias := range config.Aliases { + Registry.byAlias[alias] = lexer + } + Registry.Lexers = append(Registry.Lexers, lexer) + return lexer +} + +// Fallback lexer if no other is found. +var Fallback chroma.Lexer = chroma.MustNewLexer(&chroma.Config{ + Name: "fallback", + Filenames: []string{"*"}, +}, chroma.Rules{ + "root": []chroma.Rule{ + {`.+`, chroma.Text, nil}, + {`\n`, chroma.Text, nil}, + }, +}) diff --git a/vendor/github.com/alecthomas/chroma/lexers/api_test.go b/vendor/github.com/alecthomas/chroma/lexers/api_test.go new file mode 100644 index 0000000..5d6b39e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/api_test.go @@ -0,0 +1,21 @@ +package lexers_test + +import ( + "io/ioutil" + "testing" + + "github.com/alecthomas/assert" + + "github.com/alecthomas/chroma/formatters" + "github.com/alecthomas/chroma/lexers" + "github.com/alecthomas/chroma/styles" +) + +func TestCompileAllRegexes(t *testing.T) { + for _, lexer := range lexers.Registry.Lexers { + it, err := lexer.Tokenise(nil, "") + assert.NoError(t, err, "%s failed", lexer.Config().Name) + err = formatters.NoOp.Format(ioutil.Discard, styles.SwapOff, it) + assert.NoError(t, err, "%s failed", lexer.Config().Name) + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/apl.go b/vendor/github.com/alecthomas/chroma/lexers/apl.go new file mode 100644 index 0000000..1d50b2a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/apl.go @@ -0,0 +1,35 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Apl lexer. +var Apl = Register(MustNewLexer( + &Config{ + Name: "APL", + Aliases: []string{"apl"}, + Filenames: []string{"*.apl"}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`[⍝#].*$`, CommentSingle, nil}, + {`\'((\'\')|[^\'])*\'`, LiteralStringSingle, nil}, + {`"(("")|[^"])*"`, LiteralStringDouble, nil}, + {`[⋄◇()]`, Punctuation, nil}, + {`[\[\];]`, LiteralStringRegex, nil}, + {`⎕[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*`, NameFunction, nil}, + {`[A-Za-zΔ∆⍙][A-Za-zΔ∆⍙_¯0-9]*`, NameVariable, nil}, + {`¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞)([Jj]¯?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+¯]?[0-9]+)?|¯|∞))?`, LiteralNumber, nil}, + {`[\.\\/⌿⍀¨⍣⍨⍠⍤∘]`, NameAttribute, nil}, + {`[+\-×÷⌈⌊∣|⍳?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⌸⍯↗]`, Operator, nil}, + {`⍬`, NameConstant, nil}, + {`[⎕⍞]`, NameVariableGlobal, nil}, + {`[←→]`, KeywordDeclaration, nil}, + {`[⍺⍵⍶⍹∇:]`, NameBuiltinPseudo, nil}, + {`[{}]`, KeywordType, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/applescript.go b/vendor/github.com/alecthomas/chroma/lexers/applescript.go new file mode 100644 index 0000000..8e7cac0 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/applescript.go @@ -0,0 +1,54 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Applescript lexer. +var Applescript = Register(MustNewLexer( + &Config{ + Name: "AppleScript", + Aliases: []string{"applescript"}, + Filenames: []string{"*.applescript"}, + MimeTypes: []string{}, + DotAll: true, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`¬\n`, LiteralStringEscape, nil}, + {`'s\s+`, Text, nil}, + {`(--|#).*?$`, Comment, nil}, + {`\(\*`, CommentMultiline, Push("comment")}, + {`[(){}!,.:]`, Punctuation, nil}, + {`(«)([^»]+)(»)`, ByGroups(Text, NameBuiltin, Text), nil}, + {`\b((?:considering|ignoring)\s*)(application responses|case|diacriticals|hyphens|numeric strings|punctuation|white space)`, ByGroups(Keyword, NameBuiltin), nil}, + {`(-|\*|\+|&|≠|>=?|<=?|=|≥|≤|/|÷|\^)`, Operator, nil}, + {`\b(and|or|is equal|equals|(is )?equal to|is not|isn't|isn't equal( to)?|is not equal( to)?|doesn't equal|does not equal|(is )?greater than|comes after|is not less than or equal( to)?|isn't less than or equal( to)?|(is )?less than|comes before|is not greater than or equal( to)?|isn't greater than or equal( to)?|(is )?greater than or equal( to)?|is not less than|isn't less than|does not come before|doesn't come before|(is )?less than or equal( to)?|is not greater than|isn't greater than|does not come after|doesn't come after|starts? with|begins? with|ends? with|contains?|does not contain|doesn't contain|is in|is contained by|is not in|is not contained by|isn't contained by|div|mod|not|(a )?(ref( to)?|reference to)|is|does)\b`, OperatorWord, nil}, + {`^(\s*(?:on|end)\s+)(zoomed|write to file|will zoom|will show|will select tab view item|will resize( sub views)?|will resign active|will quit|will pop up|will open|will move|will miniaturize|will hide|will finish launching|will display outline cell|will display item cell|will display cell|will display browser cell|will dismiss|will close|will become active|was miniaturized|was hidden|update toolbar item|update parameters|update menu item|shown|should zoom|should selection change|should select tab view item|should select row|should select item|should select column|should quit( after last window closed)?|should open( untitled)?|should expand item|should end editing|should collapse item|should close|should begin editing|selection changing|selection changed|selected tab view item|scroll wheel|rows changed|right mouse up|right mouse dragged|right mouse down|resized( sub views)?|resigned main|resigned key|resigned active|read from file|prepare table drop|prepare table drag|prepare outline drop|prepare outline drag|prepare drop|plugin loaded|parameters updated|panel ended|opened|open untitled|number of rows|number of items|number of browser rows|moved|mouse up|mouse moved|mouse exited|mouse entered|mouse dragged|mouse down|miniaturized|load data representation|launched|keyboard up|keyboard down|items changed|item value changed|item value|item expandable|idle|exposed|end editing|drop|drag( (entered|exited|updated))?|double clicked|document nib name|dialog ended|deminiaturized|data representation|conclude drop|column resized|column moved|column clicked|closed|clicked toolbar item|clicked|choose menu item|child of item|changed|change item value|change cell value|cell value changed|cell value|bounds changed|begin editing|became main|became key|awake from nib|alert ended|activated|action|accept table drop|accept outline drop)`, ByGroups(Keyword, NameFunction), nil}, + {`^(\s*)(in|on|script|to)(\s+)`, ByGroups(Text, Keyword, Text), nil}, + {`\b(as )(alias |application |boolean |class |constant |date |file |integer |list |number |POSIX file |real |record |reference |RGB color |script |text |unit types|(?:Unicode )?text|string)\b`, ByGroups(Keyword, NameClass), nil}, + {`\b(AppleScript|current application|false|linefeed|missing value|pi|quote|result|return|space|tab|text item delimiters|true|version)\b`, NameConstant, nil}, + {`\b(ASCII (character|number)|activate|beep|choose URL|choose application|choose color|choose file( name)?|choose folder|choose from list|choose remote application|clipboard info|close( access)?|copy|count|current date|delay|delete|display (alert|dialog)|do shell script|duplicate|exists|get eof|get volume settings|info for|launch|list (disks|folder)|load script|log|make|mount volume|new|offset|open( (for access|location))?|path to|print|quit|random number|read|round|run( script)?|say|scripting components|set (eof|the clipboard to|volume)|store script|summarize|system attribute|system info|the clipboard|time to GMT|write|quoted form)\b`, NameBuiltin, nil}, + {`\b(considering|else|error|exit|from|if|ignoring|in|repeat|tell|then|times|to|try|until|using terms from|while|whith|with timeout( of)?|with transaction|by|continue|end|its?|me|my|return|of|as)\b`, Keyword, nil}, + {`\b(global|local|prop(erty)?|set|get)\b`, Keyword, nil}, + {`\b(but|put|returning|the)\b`, NameBuiltin, nil}, + {`\b(attachment|attribute run|character|day|month|paragraph|word|year)s?\b`, NameBuiltin, nil}, + {`\b(about|above|against|apart from|around|aside from|at|below|beneath|beside|between|for|given|instead of|on|onto|out of|over|since)\b`, NameBuiltin, nil}, + {`\b(accepts arrow key|action method|active|alignment|allowed identifiers|allows branch selection|allows column reordering|allows column resizing|allows column selection|allows customization|allows editing text attributes|allows empty selection|allows mixed state|allows multiple selection|allows reordering|allows undo|alpha( value)?|alternate image|alternate increment value|alternate title|animation delay|associated file name|associated object|auto completes|auto display|auto enables items|auto repeat|auto resizes( outline column)?|auto save expanded items|auto save name|auto save table columns|auto saves configuration|auto scroll|auto sizes all columns to fit|auto sizes cells|background color|bezel state|bezel style|bezeled|border rect|border type|bordered|bounds( rotation)?|box type|button returned|button type|can choose directories|can choose files|can draw|can hide|cell( (background color|size|type))?|characters|class|click count|clicked( data)? column|clicked data item|clicked( data)? row|closeable|collating|color( (mode|panel))|command key down|configuration|content(s| (size|view( margins)?))?|context|continuous|control key down|control size|control tint|control view|controller visible|coordinate system|copies( on scroll)?|corner view|current cell|current column|current( field)? editor|current( menu)? item|current row|current tab view item|data source|default identifiers|delta (x|y|z)|destination window|directory|display mode|displayed cell|document( (edited|rect|view))?|double value|dragged column|dragged distance|dragged items|draws( cell)? background|draws grid|dynamically scrolls|echos bullets|edge|editable|edited( data)? column|edited data item|edited( data)? row|enabled|enclosing scroll view|ending page|error handling|event number|event type|excluded from windows menu|executable path|expanded|fax number|field editor|file kind|file name|file type|first responder|first visible column|flipped|floating|font( panel)?|formatter|frameworks path|frontmost|gave up|grid color|has data items|has horizontal ruler|has horizontal scroller|has parent data item|has resize indicator|has shadow|has sub menu|has vertical ruler|has vertical scroller|header cell|header view|hidden|hides when deactivated|highlights by|horizontal line scroll|horizontal page scroll|horizontal ruler view|horizontally resizable|icon image|id|identifier|ignores multiple clicks|image( (alignment|dims when disabled|frame style|scaling))?|imports graphics|increment value|indentation per level|indeterminate|index|integer value|intercell spacing|item height|key( (code|equivalent( modifier)?|window))?|knob thickness|label|last( visible)? column|leading offset|leaf|level|line scroll|loaded|localized sort|location|loop mode|main( (bunde|menu|window))?|marker follows cell|matrix mode|maximum( content)? size|maximum visible columns|menu( form representation)?|miniaturizable|miniaturized|minimized image|minimized title|minimum column width|minimum( content)? size|modal|modified|mouse down state|movie( (controller|file|rect))?|muted|name|needs display|next state|next text|number of tick marks|only tick mark values|opaque|open panel|option key down|outline table column|page scroll|pages across|pages down|palette label|pane splitter|parent data item|parent window|pasteboard|path( (names|separator))?|playing|plays every frame|plays selection only|position|preferred edge|preferred type|pressure|previous text|prompt|properties|prototype cell|pulls down|rate|released when closed|repeated|requested print time|required file type|resizable|resized column|resource path|returns records|reuses columns|rich text|roll over|row height|rulers visible|save panel|scripts path|scrollable|selectable( identifiers)?|selected cell|selected( data)? columns?|selected data items?|selected( data)? rows?|selected item identifier|selection by rect|send action on arrow key|sends action when done editing|separates columns|separator item|sequence number|services menu|shared frameworks path|shared support path|sheet|shift key down|shows alpha|shows state by|size( mode)?|smart insert delete enabled|sort case sensitivity|sort column|sort order|sort type|sorted( data rows)?|sound|source( mask)?|spell checking enabled|starting page|state|string value|sub menu|super menu|super view|tab key traverses cells|tab state|tab type|tab view|table view|tag|target( printer)?|text color|text container insert|text container origin|text returned|tick mark position|time stamp|title(d| (cell|font|height|position|rect))?|tool tip|toolbar|trailing offset|transparent|treat packages as directories|truncated labels|types|unmodified characters|update views|use sort indicator|user defaults|uses data source|uses ruler|uses threaded animation|uses title from previous column|value wraps|version|vertical( (line scroll|page scroll|ruler view))?|vertically resizable|view|visible( document rect)?|volume|width|window|windows menu|wraps|zoomable|zoomed)\b`, NameAttribute, nil}, + {`\b(action cell|alert reply|application|box|browser( cell)?|bundle|button( cell)?|cell|clip view|color well|color-panel|combo box( item)?|control|data( (cell|column|item|row|source))?|default entry|dialog reply|document|drag info|drawer|event|font(-panel)?|formatter|image( (cell|view))?|matrix|menu( item)?|item|movie( view)?|open-panel|outline view|panel|pasteboard|plugin|popup button|progress indicator|responder|save-panel|scroll view|secure text field( cell)?|slider|sound|split view|stepper|tab view( item)?|table( (column|header cell|header view|view))|text( (field( cell)?|view))?|toolbar( item)?|user-defaults|view|window)s?\b`, NameBuiltin, nil}, + {`\b(animate|append|call method|center|close drawer|close panel|display|display alert|display dialog|display panel|go|hide|highlight|increment|item for|load image|load movie|load nib|load panel|load sound|localized string|lock focus|log|open drawer|path for|pause|perform action|play|register|resume|scroll|select( all)?|show|size to fit|start|step back|step forward|stop|synchronize|unlock focus|update)\b`, NameBuiltin, nil}, + {`\b((in )?back of|(in )?front of|[0-9]+(st|nd|rd|th)|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|after|back|before|behind|every|front|index|last|middle|some|that|through|thru|where|whose)\b`, NameBuiltin, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`\b([a-zA-Z]\w*)\b`, NameVariable, nil}, + {`[-+]?(\d+\.\d*|\d*\.\d+)(E[-+][0-9]+)?`, LiteralNumberFloat, nil}, + {`[-+]?\d+`, LiteralNumberInteger, nil}, + }, + "comment": { + {`\(\*`, CommentMultiline, Push()}, + {`\*\)`, CommentMultiline, Pop(1)}, + {`[^*(]+`, CommentMultiline, nil}, + {`[*(]`, CommentMultiline, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/awk.go b/vendor/github.com/alecthomas/chroma/lexers/awk.go new file mode 100644 index 0000000..60424ee --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/awk.go @@ -0,0 +1,47 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Awk lexer. +var Awk = Register(MustNewLexer( + &Config{ + Name: "Awk", + Aliases: []string{"awk", "gawk", "mawk", "nawk"}, + Filenames: []string{"*.awk"}, + MimeTypes: []string{"application/x-awk"}, + }, + Rules{ + "commentsandwhitespace": { + {`\s+`, Text, nil}, + {`#.*$`, CommentSingle, nil}, + }, + "slashstartsregex": { + Include("commentsandwhitespace"), + {`/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/\B`, LiteralStringRegex, Pop(1)}, + {`(?=/)`, Text, Push("#pop", "badregex")}, + Default(Pop(1)), + }, + "badregex": { + {`\n`, Text, Pop(1)}, + }, + "root": { + {`^(?=\s|/)`, Text, Push("slashstartsregex")}, + Include("commentsandwhitespace"), + {`\+\+|--|\|\||&&|in\b|\$|!?~|(\*\*|[-<>+*%\^/!=|])=?`, Operator, Push("slashstartsregex")}, + {`[{(\[;,]`, Punctuation, Push("slashstartsregex")}, + {`[})\].]`, Punctuation, nil}, + {`(break|continue|do|while|exit|for|if|else|return)\b`, Keyword, Push("slashstartsregex")}, + {`function\b`, KeywordDeclaration, Push("slashstartsregex")}, + {`(atan2|cos|exp|int|log|rand|sin|sqrt|srand|gensub|gsub|index|length|match|split|sprintf|sub|substr|tolower|toupper|close|fflush|getline|next|nextfile|print|printf|strftime|systime|delete|system)\b`, KeywordReserved, nil}, + {`(ARGC|ARGIND|ARGV|BEGIN|CONVFMT|ENVIRON|END|ERRNO|FIELDWIDTHS|FILENAME|FNR|FS|IGNORECASE|NF|NR|OFMT|OFS|ORFS|RLENGTH|RS|RSTART|RT|SUBSEP)\b`, NameBuiltin, nil}, + {`[$a-zA-Z_]\w*`, NameOther, nil}, + {`[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?`, LiteralNumberFloat, nil}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/bash.go b/vendor/github.com/alecthomas/chroma/lexers/bash.go new file mode 100644 index 0000000..acd0f0c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/bash.go @@ -0,0 +1,94 @@ +package lexers + +import ( + "regexp" + + . "github.com/alecthomas/chroma" // nolint +) + +var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:bash|zsh|sh|ksh)`) + +// Bash lexer. +var Bash = Register(MustNewLexer( + &Config{ + Name: "Bash", + Aliases: []string{"bash", "sh", "ksh", "zsh", "shell"}, + Filenames: []string{"*.sh", "*.ksh", "*.bash", "*.ebuild", "*.eclass", "*.exheres-0", "*.exlib", "*.zsh", "*.zshrc", ".bashrc", "bashrc", ".bash_*", "bash_*", "zshrc", ".zshrc", "PKGBUILD"}, + MimeTypes: []string{"application/x-sh", "application/x-shellscript"}, + }, + Rules{ + "root": { + Include("basic"), + {"`", LiteralStringBacktick, Push("backticks")}, + Include("data"), + Include("interp"), + }, + "interp": { + {`\$\(\(`, Keyword, Push("math")}, + {`\$\(`, Keyword, Push("paren")}, + {`\$\{#?`, LiteralStringInterpol, Push("curly")}, + {`\$[a-zA-Z_]\w*`, NameVariable, nil}, + {`\$(?:\d+|[#$?!_*@-])`, NameVariable, nil}, + {`\$`, Text, nil}, + }, + "basic": { + {`\b(if|fi|else|while|do|done|for|then|return|function|case|select|continue|until|esac|elif)(\s*)\b`, ByGroups(Keyword, Text), nil}, + {"\\b(alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|declare|dirs|disown|echo|enable|eval|exec|exit|export|false|fc|fg|getopts|hash|help|history|jobs|kill|let|local|logout|popd|printf|pushd|pwd|read|readonly|set|shift|shopt|source|suspend|test|time|times|trap|true|type|typeset|ulimit|umask|unalias|unset|wait)(?=[\\s)`])", NameBuiltin, nil}, + {`\A#!.+\n`, CommentPreproc, nil}, + {`#.*\n`, CommentSingle, nil}, + {`\\[\w\W]`, LiteralStringEscape, nil}, + {`(\b\w+)(\s*)(\+?=)`, ByGroups(NameVariable, Text, Operator), nil}, + {`[\[\]{}()=]`, Operator, nil}, + {`<<<`, Operator, nil}, + {`<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2`, LiteralString, nil}, + {`&&|\|\|`, Operator, nil}, + }, + "data": { + {`(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"`, LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Push("string")}, + {`(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'`, LiteralStringSingle, nil}, + {`(?s)'.*?'`, LiteralStringSingle, nil}, + {`;`, Punctuation, nil}, + {`&`, Punctuation, nil}, + {`\|`, Punctuation, nil}, + {`\s+`, Text, nil}, + {`\d+\b`, LiteralNumber, nil}, + {"[^=\\s\\[\\]{}()$\"\\'`\\\\<&|;]+", Text, nil}, + {`<`, Text, nil}, + }, + "string": { + {`"`, LiteralStringDouble, Pop(1)}, + {`(?s)(\\\\|\\[0-7]+|\\.|[^"\\$])+`, LiteralStringDouble, nil}, + Include("interp"), + }, + "curly": { + {`\}`, LiteralStringInterpol, Pop(1)}, + {`:-`, Keyword, nil}, + {`\w+`, NameVariable, nil}, + {"[^}:\"\\'`$\\\\]+", Punctuation, nil}, + {`:`, Punctuation, nil}, + Include("root"), + }, + "paren": { + {`\)`, Keyword, Pop(1)}, + Include("root"), + }, + "math": { + {`\)\)`, Keyword, Pop(1)}, + {`[-+*/%^|&]|\*\*|\|\|`, Operator, nil}, + {`\d+#\d+`, LiteralNumber, nil}, + {`\d+#(?! )`, LiteralNumber, nil}, + {`\d+`, LiteralNumber, nil}, + Include("root"), + }, + "backticks": { + {"`", LiteralStringBacktick, Pop(1)}, + Include("root"), + }, + }, +).SetAnalyser(func(text string) float32 { + if bashAnalyserRe.FindString(text) != "" { + return 1.0 + } + return 0.0 +})) diff --git a/vendor/github.com/alecthomas/chroma/lexers/batch.go b/vendor/github.com/alecthomas/chroma/lexers/batch.go new file mode 100644 index 0000000..ae32c18 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/batch.go @@ -0,0 +1,193 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Batchfile lexer. +var Batchfile = Register(MustNewLexer( + &Config{ + Name: "Batchfile", + Aliases: []string{"bat", "batch", "dosbatch", "winbatch"}, + Filenames: []string{"*.bat", "*.cmd"}, + MimeTypes: []string{"application/x-dos-batch"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\)((?=\()|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))(?:(?:[^\n\x1a^]|\^[\n\x1a]?[\w\W])*)`, CommentSingle, nil}, + {`(?=((?:(?<=^[^:])|^[^:]?)[\t\v\f\r ,;=\xa0]*)(:))`, Text, Push("follow")}, + {`(?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)`, UsingSelf("text"), nil}, + Include("redirect"), + {`[\n\x1a]+`, Text, nil}, + {`\(`, Punctuation, Push("root/compound")}, + {`@+`, Punctuation, nil}, + {`((?:for|if|rem)(?:(?=(?:\^[\n\x1a]?)?/)|(?:(?!\^)|(?<=m))(?:(?=\()|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0])+)?(?:\^[\n\x1a]?)?/(?:\^[\n\x1a]?)?\?)`, ByGroups(Keyword, UsingSelf("text")), Push("follow")}, + {`(goto(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(]))((?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|[^"%\n\x1a&<>|])*(?:\^[\n\x1a]?)?/(?:\^[\n\x1a]?)?\?(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|[^"%\n\x1a&<>|])*)`, ByGroups(Keyword, UsingSelf("text")), Push("follow")}, + {Words(``, `(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(])`, `assoc`, `break`, `cd`, `chdir`, `cls`, `color`, `copy`, `date`, `del`, `dir`, `dpath`, `echo`, `endlocal`, `erase`, `exit`, `ftype`, `keys`, `md`, `mkdir`, `mklink`, `move`, `path`, `pause`, `popd`, `prompt`, `pushd`, `rd`, `ren`, `rename`, `rmdir`, `setlocal`, `shift`, `start`, `time`, `title`, `type`, `ver`, `verify`, `vol`), Keyword, Push("follow")}, + {`(call)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)(:)`, ByGroups(Keyword, UsingSelf("text"), Punctuation), Push("call")}, + {`call(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(])`, Keyword, nil}, + {`(for(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])(?!\^))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))(/f(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))`, ByGroups(Keyword, UsingSelf("text"), Keyword), Push("for/f", "for")}, + {`(for(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])(?!\^))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))(/l(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))`, ByGroups(Keyword, UsingSelf("text"), Keyword), Push("for/l", "for")}, + {`for(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])(?!\^)`, Keyword, Push("for2", "for")}, + {`(goto(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(]))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)(:?)`, ByGroups(Keyword, UsingSelf("text"), Punctuation), Push("label")}, + {`(if(?:(?=\()|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))(?!\^))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)((?:/i(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))?)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)((?:not(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))?)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)`, ByGroups(Keyword, UsingSelf("text"), Keyword, UsingSelf("text"), Keyword, UsingSelf("text")), Push("(?", "if")}, + {`rem(((?=\()|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))(?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?(?:[&<>|]+|(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0])+))+)?.*|(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(])(?:(?:[^\n\x1a^]|\^[\n\x1a]?[\w\W])*))`, CommentSingle, Push("follow")}, + {`(set(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(]))((?:(?:\^[\n\x1a]?)?[^\S\n])*)(/a)`, ByGroups(Keyword, UsingSelf("text"), Keyword), Push("arithmetic")}, + {`(set(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(]))((?:(?:\^[\n\x1a]?)?[^\S\n])*)((?:/p)?)((?:(?:\^[\n\x1a]?)?[^\S\n])*)((?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|^=]|\^[\n\x1a]?[^"=])+)?)((?:(?:\^[\n\x1a]?)?=)?)`, ByGroups(Keyword, UsingSelf("text"), Keyword, UsingSelf("text"), UsingSelf("variable"), Punctuation), Push("follow")}, + Default(Push("follow")), + }, + "follow": { + {`((?:(?<=^[^:])|^[^:]?)[\t\v\f\r ,;=\xa0]*)(:)([\t\v\f\r ,;=\xa0]*)((?:(?:[^\n\x1a&<>|\t\v\f\r ,;=\xa0+:^]|\^[\n\x1a]?[\w\W])*))(.*)`, ByGroups(Text, Punctuation, Text, NameLabel, CommentSingle), nil}, + Include("redirect"), + {`(?=[\n\x1a])`, Text, Pop(1)}, + {`\|\|?|&&?`, Punctuation, Pop(1)}, + Include("text"), + }, + "arithmetic": { + {`0[0-7]+`, LiteralNumberOct, nil}, + {`0x[\da-f]+`, LiteralNumberHex, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`[(),]+`, Punctuation, nil}, + {`([=+\-*/!~]|%|\^\^)+`, Operator, nil}, + {`((?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(\^[\n\x1a]?)?[^()=+\-*/!~%^"\n\x1a&<>|\t\v\f\r ,;=\xa0]|\^[\n\x1a\t\v\f\r ,;=\xa0]?[\w\W])+`, UsingSelf("variable"), nil}, + {`(?=[\x00|&])`, Text, Pop(1)}, + Include("follow"), + }, + "call": { + {`(:?)((?:(?:[^\n\x1a&<>|\t\v\f\r ,;=\xa0+:^]|\^[\n\x1a]?[\w\W])*))`, ByGroups(Punctuation, NameLabel), Pop(1)}, + }, + "label": { + {`((?:(?:[^\n\x1a&<>|\t\v\f\r ,;=\xa0+:^]|\^[\n\x1a]?[\w\W])*)?)((?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|\^[\n\x1a]?[\w\W]|[^"%^\n\x1a&<>|])*)`, ByGroups(NameLabel, CommentSingle), Pop(1)}, + }, + "redirect": { + {`((?:(?<=[\n\x1a\t\v\f\r ,;=\xa0])\d)?)(>>?&|<&)([\n\x1a\t\v\f\r ,;=\xa0]*)(\d)`, ByGroups(LiteralNumberInteger, Punctuation, Text, LiteralNumberInteger), nil}, + {`((?:(?<=[\n\x1a\t\v\f\r ,;=\xa0])(?>?|<)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?(?:[&<>|]+|(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0])+))+))`, ByGroups(LiteralNumberInteger, Punctuation, UsingSelf("text")), nil}, + }, + "root/compound": { + {`\)`, Punctuation, Pop(1)}, + {`(?=((?:(?<=^[^:])|^[^:]?)[\t\v\f\r ,;=\xa0]*)(:))`, Text, Push("follow/compound")}, + {`(?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)`, UsingSelf("text"), nil}, + Include("redirect/compound"), + {`[\n\x1a]+`, Text, nil}, + {`\(`, Punctuation, Push("root/compound")}, + {`@+`, Punctuation, nil}, + {`((?:for|if|rem)(?:(?=(?:\^[\n\x1a]?)?/)|(?:(?!\^)|(?<=m))(?:(?=\()|(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])))))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0)])+)?(?:\^[\n\x1a]?)?/(?:\^[\n\x1a]?)?\?)`, ByGroups(Keyword, UsingSelf("text")), Push("follow/compound")}, + {`(goto(?:(?=\))|(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(])))((?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|[^"%\n\x1a&<>|)])*(?:\^[\n\x1a]?)?/(?:\^[\n\x1a]?)?\?(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|[^"%\n\x1a&<>|)])*)`, ByGroups(Keyword, UsingSelf("text")), Push("follow/compound")}, + {Words(``, `(?:(?=\))|(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(]))`, `assoc`, `break`, `cd`, `chdir`, `cls`, `color`, `copy`, `date`, `del`, `dir`, `dpath`, `echo`, `endlocal`, `erase`, `exit`, `ftype`, `keys`, `md`, `mkdir`, `mklink`, `move`, `path`, `pause`, `popd`, `prompt`, `pushd`, `rd`, `ren`, `rename`, `rmdir`, `setlocal`, `shift`, `start`, `time`, `title`, `type`, `ver`, `verify`, `vol`), Keyword, Push("follow/compound")}, + {`(call)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)(:)`, ByGroups(Keyword, UsingSelf("text"), Punctuation), Push("call/compound")}, + {`call(?:(?=\))|(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(]))`, Keyword, nil}, + {`(for(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))(?!\^))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))(/f(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])))`, ByGroups(Keyword, UsingSelf("text"), Keyword), Push("for/f", "for")}, + {`(for(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))(?!\^))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))(/l(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])))`, ByGroups(Keyword, UsingSelf("text"), Keyword), Push("for/l", "for")}, + {`for(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))(?!\^)`, Keyword, Push("for2", "for")}, + {`(goto(?:(?=\))|(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(])))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)(:?)`, ByGroups(Keyword, UsingSelf("text"), Punctuation), Push("label/compound")}, + {`(if(?:(?=\()|(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])))(?!\^))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)((?:/i(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])))?)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)((?:not(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])))?)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)`, ByGroups(Keyword, UsingSelf("text"), Keyword, UsingSelf("text"), Keyword, UsingSelf("text")), Push("(?", "if")}, + {`rem(((?=\()|(?:(?=\))|(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])))(?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?(?:[&<>|]+|(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0])+))+)?.*|(?:(?=\))|(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(]))(?:(?:[^\n\x1a^)]|\^[\n\x1a]?[^)])*))`, CommentSingle, Push("follow/compound")}, + {`(set(?:(?=\))|(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(])))((?:(?:\^[\n\x1a]?)?[^\S\n])*)(/a)`, ByGroups(Keyword, UsingSelf("text"), Keyword), Push("arithmetic/compound")}, + {`(set(?:(?=\))|(?=(?:\^[\n\x1a]?)?[\t\v\f\r ,;=\xa0+./:[\\\]]|[\n\x1a&<>|(])))((?:(?:\^[\n\x1a]?)?[^\S\n])*)((?:/p)?)((?:(?:\^[\n\x1a]?)?[^\S\n])*)((?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|^=)]|\^[\n\x1a]?[^"=])+)?)((?:(?:\^[\n\x1a]?)?=)?)`, ByGroups(Keyword, UsingSelf("text"), Keyword, UsingSelf("text"), UsingSelf("variable"), Punctuation), Push("follow/compound")}, + Default(Push("follow/compound")), + }, + "follow/compound": { + {`(?=\))`, Text, Pop(1)}, + {`((?:(?<=^[^:])|^[^:]?)[\t\v\f\r ,;=\xa0]*)(:)([\t\v\f\r ,;=\xa0]*)((?:(?:[^\n\x1a&<>|\t\v\f\r ,;=\xa0+:^)]|\^[\n\x1a]?[^)])*))(.*)`, ByGroups(Text, Punctuation, Text, NameLabel, CommentSingle), nil}, + Include("redirect/compound"), + {`(?=[\n\x1a])`, Text, Pop(1)}, + {`\|\|?|&&?`, Punctuation, Pop(1)}, + Include("text"), + }, + "arithmetic/compound": { + {`(?=\))`, Text, Pop(1)}, + {`0[0-7]+`, LiteralNumberOct, nil}, + {`0x[\da-f]+`, LiteralNumberHex, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`[(),]+`, Punctuation, nil}, + {`([=+\-*/!~]|%|\^\^)+`, Operator, nil}, + {`((?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(\^[\n\x1a]?)?[^()=+\-*/!~%^"\n\x1a&<>|\t\v\f\r ,;=\xa0]|\^[\n\x1a\t\v\f\r ,;=\xa0]?[^)])+`, UsingSelf("variable"), nil}, + {`(?=[\x00|&])`, Text, Pop(1)}, + Include("follow"), + }, + "call/compound": { + {`(?=\))`, Text, Pop(1)}, + {`(:?)((?:(?:[^\n\x1a&<>|\t\v\f\r ,;=\xa0+:^)]|\^[\n\x1a]?[^)])*))`, ByGroups(Punctuation, NameLabel), Pop(1)}, + }, + "label/compound": { + {`(?=\))`, Text, Pop(1)}, + {`((?:(?:[^\n\x1a&<>|\t\v\f\r ,;=\xa0+:^)]|\^[\n\x1a]?[^)])*)?)((?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|\^[\n\x1a]?[^)]|[^"%^\n\x1a&<>|)])*)`, ByGroups(NameLabel, CommentSingle), Pop(1)}, + }, + "redirect/compound": { + {`((?:(?<=[\n\x1a\t\v\f\r ,;=\xa0])\d)?)(>>?&|<&)([\n\x1a\t\v\f\r ,;=\xa0]*)(\d)`, ByGroups(LiteralNumberInteger, Punctuation, Text, LiteralNumberInteger), nil}, + {`((?:(?<=[\n\x1a\t\v\f\r ,;=\xa0])(?>?|<)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?(?:[&<>|]+|(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0)])+))+))`, ByGroups(LiteralNumberInteger, Punctuation, UsingSelf("text")), nil}, + }, + "variable-or-escape": { + {`(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))`, NameVariable, nil}, + {`%%|\^[\n\x1a]?(\^!|[\w\W])`, LiteralStringEscape, nil}, + }, + "string": { + {`"`, LiteralStringDouble, Pop(1)}, + {`(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))`, NameVariable, nil}, + {`\^!|%%`, LiteralStringEscape, nil}, + {`[^"%^\n\x1a]+|[%^]`, LiteralStringDouble, nil}, + Default(Pop(1)), + }, + "sqstring": { + Include("variable-or-escape"), + {`[^%]+|%`, LiteralStringSingle, nil}, + }, + "bqstring": { + Include("variable-or-escape"), + {`[^%]+|%`, LiteralStringBacktick, nil}, + }, + "text": { + {`"`, LiteralStringDouble, Push("string")}, + Include("variable-or-escape"), + {`[^"%^\n\x1a&<>|\t\v\f\r ,;=\xa0\d)]+|.`, Text, nil}, + }, + "variable": { + {`"`, LiteralStringDouble, Push("string")}, + Include("variable-or-escape"), + {`[^"%^\n\x1a]+|.`, NameVariable, nil}, + }, + "for": { + {`((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))(in)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))(\()`, ByGroups(UsingSelf("text"), Keyword, UsingSelf("text"), Punctuation), Pop(1)}, + Include("follow"), + }, + "for2": { + {`\)`, Punctuation, nil}, + {`((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))(do(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))`, ByGroups(UsingSelf("text"), Keyword), Pop(1)}, + {`[\n\x1a]+`, Text, nil}, + Include("follow"), + }, + "for/f": { + {`(")((?:(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|[^"])*?")([\n\x1a\t\v\f\r ,;=\xa0]*)(\))`, ByGroups(LiteralStringDouble, UsingSelf("string"), Text, Punctuation), nil}, + {`"`, LiteralStringDouble, Push("#pop", "for2", "string")}, + {`('(?:%%|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|[\w\W])*?')([\n\x1a\t\v\f\r ,;=\xa0]*)(\))`, ByGroups(UsingSelf("sqstring"), Text, Punctuation), nil}, + {"(`(?:%%|(?:(?:%(?:\\*|(?:~[a-z]*(?:\\$[^:]+:)?)?\\d|[^%:\\n\\x1a]+(?::(?:~(?:-?\\d+)?(?:,(?:-?\\d+)?)?|(?:[^%\\n\\x1a^]|\\^[^%\\n\\x1a])[^=\\n\\x1a]*=(?:[^%\\n\\x1a^]|\\^[^%\\n\\x1a])*)?)?%))|(?:\\^?![^!:\\n\\x1a]+(?::(?:~(?:-?\\d+)?(?:,(?:-?\\d+)?)?|(?:[^!\\n\\x1a^]|\\^[^!\\n\\x1a])[^=\\n\\x1a]*=(?:[^!\\n\\x1a^]|\\^[^!\\n\\x1a])*)?)?\\^?!))|[\\w\\W])*?`)([\\n\\x1a\\t\\v\\f\\r ,;=\\xa0]*)(\\))", ByGroups(UsingSelf("bqstring"), Text, Punctuation), nil}, + Include("for2"), + }, + "for/l": { + {`-?\d+`, LiteralNumberInteger, nil}, + Include("for2"), + }, + "if": { + {`((?:cmdextversion|errorlevel)(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))(\d+)`, ByGroups(Keyword, UsingSelf("text"), LiteralNumberInteger), Pop(1)}, + {`(defined(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))((?:[&<>|]+|(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0])+))+))`, ByGroups(Keyword, UsingSelf("text"), UsingSelf("variable")), Pop(1)}, + {`(exist(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)(?:[&<>|]+|(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0])+))+))`, ByGroups(Keyword, UsingSelf("text")), Pop(1)}, + {`((?:-?(?:0[0-7]+|0x[\da-f]+|\d+)(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a]))(?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))((?:equ|geq|gtr|leq|lss|neq))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)(?:-?(?:0[0-7]+|0x[\da-f]+|\d+)(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])))`, ByGroups(UsingSelf("arithmetic"), OperatorWord, UsingSelf("arithmetic")), Pop(1)}, + {`(?:[&<>|]+|(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0])+))+)`, UsingSelf("text"), Push("#pop", "if2")}, + }, + "if2": { + {`((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?)(==)((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)?(?:[&<>|]+|(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0])+))+))`, ByGroups(UsingSelf("text"), Operator, UsingSelf("text")), Pop(1)}, + {`((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+))((?:equ|geq|gtr|leq|lss|neq))((?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)(?:[&<>|]+|(?:(?:"[^\n\x1a"]*(?:"|(?=[\n\x1a])))|(?:(?:%(?:\*|(?:~[a-z]*(?:\$[^:]+:)?)?\d|[^%:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^%\n\x1a^]|\^[^%\n\x1a])[^=\n\x1a]*=(?:[^%\n\x1a^]|\^[^%\n\x1a])*)?)?%))|(?:\^?![^!:\n\x1a]+(?::(?:~(?:-?\d+)?(?:,(?:-?\d+)?)?|(?:[^!\n\x1a^]|\^[^!\n\x1a])[^=\n\x1a]*=(?:[^!\n\x1a^]|\^[^!\n\x1a])*)?)?\^?!))|(?:(?:(?:\^[\n\x1a]?)?[^"\n\x1a&<>|\t\v\f\r ,;=\xa0])+))+))`, ByGroups(UsingSelf("text"), OperatorWord, UsingSelf("text")), Pop(1)}, + }, + "(?": { + {`(?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)`, UsingSelf("text"), nil}, + {`\(`, Punctuation, Push("#pop", "else?", "root/compound")}, + Default(Pop(1)), + }, + "else?": { + {`(?:(?:(?:\^[\n\x1a])?[\t\v\f\r ,;=\xa0])+)`, UsingSelf("text"), nil}, + {`else(?=\^?[\t\v\f\r ,;=\xa0]|[&<>|\n\x1a])`, Keyword, Pop(1)}, + Default(Pop(1)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/blitz.go b/vendor/github.com/alecthomas/chroma/lexers/blitz.go new file mode 100644 index 0000000..7626783 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/blitz.go @@ -0,0 +1,47 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Blitzbasic lexer. +var Blitzbasic = Register(MustNewLexer( + &Config{ + Name: "BlitzBasic", + Aliases: []string{"blitzbasic", "b3d", "bplus"}, + Filenames: []string{"*.bb", "*.decls"}, + MimeTypes: []string{"text/x-bb"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`[ \t]+`, Text, nil}, + {`;.*?\n`, CommentSingle, nil}, + {`"`, LiteralStringDouble, Push("string")}, + {`[0-9]+\.[0-9]*(?!\.)`, LiteralNumberFloat, nil}, + {`\.[0-9]+(?!\.)`, LiteralNumberFloat, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`\$[0-9a-f]+`, LiteralNumberHex, nil}, + {`\%[10]+`, LiteralNumberBin, nil}, + {Words(`\b`, `\b`, `Shl`, `Shr`, `Sar`, `Mod`, `Or`, `And`, `Not`, `Abs`, `Sgn`, `Handle`, `Int`, `Float`, `Str`, `First`, `Last`, `Before`, `After`), Operator, nil}, + {`([+\-*/~=<>^])`, Operator, nil}, + {`[(),:\[\]\\]`, Punctuation, nil}, + {`\.([ \t]*)([a-z]\w*)`, NameLabel, nil}, + {`\b(New)\b([ \t]+)([a-z]\w*)`, ByGroups(KeywordReserved, Text, NameClass), nil}, + {`\b(Gosub|Goto)\b([ \t]+)([a-z]\w*)`, ByGroups(KeywordReserved, Text, NameLabel), nil}, + {`\b(Object)\b([ \t]*)([.])([ \t]*)([a-z]\w*)\b`, ByGroups(Operator, Text, Punctuation, Text, NameClass), nil}, + {`\b([a-z]\w*)(?:([ \t]*)(@{1,2}|[#$%])|([ \t]*)([.])([ \t]*)(?:([a-z]\w*)))?\b([ \t]*)(\()`, ByGroups(NameFunction, Text, KeywordType, Text, Punctuation, Text, NameClass, Text, Punctuation), nil}, + {`\b(Function)\b([ \t]+)([a-z]\w*)(?:([ \t]*)(@{1,2}|[#$%])|([ \t]*)([.])([ \t]*)(?:([a-z]\w*)))?`, ByGroups(KeywordReserved, Text, NameFunction, Text, KeywordType, Text, Punctuation, Text, NameClass), nil}, + {`\b(Type)([ \t]+)([a-z]\w*)`, ByGroups(KeywordReserved, Text, NameClass), nil}, + {`\b(Pi|True|False|Null)\b`, KeywordConstant, nil}, + {`\b(Local|Global|Const|Field|Dim)\b`, KeywordDeclaration, nil}, + {Words(`\b`, `\b`, `End`, `Return`, `Exit`, `Chr`, `Len`, `Asc`, `New`, `Delete`, `Insert`, `Include`, `Function`, `Type`, `If`, `Then`, `Else`, `ElseIf`, `EndIf`, `For`, `To`, `Next`, `Step`, `Each`, `While`, `Wend`, `Repeat`, `Until`, `Forever`, `Select`, `Case`, `Default`, `Goto`, `Gosub`, `Data`, `Read`, `Restore`), KeywordReserved, nil}, + {`([a-z]\w*)(?:([ \t]*)(@{1,2}|[#$%])|([ \t]*)([.])([ \t]*)(?:([a-z]\w*)))?`, ByGroups(NameVariable, Text, KeywordType, Text, Punctuation, Text, NameClass), nil}, + }, + "string": { + {`""`, LiteralStringDouble, nil}, + {`"C?`, LiteralStringDouble, Pop(1)}, + {`[^"]+`, LiteralStringDouble, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/bnf.go b/vendor/github.com/alecthomas/chroma/lexers/bnf.go new file mode 100644 index 0000000..c7456e3 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/bnf.go @@ -0,0 +1,23 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Bnf lexer. +var Bnf = Register(MustNewLexer( + &Config{ + Name: "BNF", + Aliases: []string{"bnf"}, + Filenames: []string{"*.bnf"}, + MimeTypes: []string{"text/x-bnf"}, + }, + Rules{ + "root": { + {`(<)([ -;=?-~]+)(>)`, ByGroups(Punctuation, NameClass, Punctuation), nil}, + {`::=`, Operator, nil}, + {`[^<>:]+`, Text, nil}, + {`.`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/brainfuck.go b/vendor/github.com/alecthomas/chroma/lexers/brainfuck.go new file mode 100644 index 0000000..c2c0396 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/brainfuck.go @@ -0,0 +1,33 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Brainfuck lexer. +var Brainfuck = Register(MustNewLexer( + &Config{ + Name: "Brainfuck", + Aliases: []string{"brainfuck", "bf"}, + Filenames: []string{"*.bf", "*.b"}, + MimeTypes: []string{"application/x-brainfuck"}, + }, + Rules{ + "common": { + {`[.,]+`, NameTag, nil}, + {`[+-]+`, NameBuiltin, nil}, + {`[<>]+`, NameVariable, nil}, + {`[^.,+\-<>\[\]]+`, Comment, nil}, + }, + "root": { + {`\[`, Keyword, Push("loop")}, + {`\]`, Error, nil}, + Include("common"), + }, + "loop": { + {`\[`, Keyword, Push()}, + {`\]`, Keyword, Pop(1)}, + Include("common"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/c.go b/vendor/github.com/alecthomas/chroma/lexers/c.go new file mode 100644 index 0000000..b42412d --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/c.go @@ -0,0 +1,90 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// C lexer. +var C = Register(MustNewLexer( + &Config{ + Name: "C", + Aliases: []string{"c"}, + Filenames: []string{"*.c", "*.h", "*.idc"}, + MimeTypes: []string{"text/x-chdr", "text/x-csrc"}, + }, + Rules{ + "whitespace": { + {`^#if\s+0`, CommentPreproc, Push("if0")}, + {`^#`, CommentPreproc, Push("macro")}, + {`^(\s*(?:/[*].*?[*]/\s*)?)(#if\s+0)`, ByGroups(UsingSelf("root"), CommentPreproc), Push("if0")}, + {`^(\s*(?:/[*].*?[*]/\s*)?)(#)`, ByGroups(UsingSelf("root"), CommentPreproc), Push("macro")}, + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`\\\n`, Text, nil}, + {`//(\n|[\w\W]*?[^\\]\n)`, CommentSingle, nil}, + {`/(\\\n)?[*][\w\W]*?[*](\\\n)?/`, CommentMultiline, nil}, + {`/(\\\n)?[*][\w\W]*`, CommentMultiline, nil}, + }, + "statements": { + {`(L?)(")`, ByGroups(LiteralStringAffix, LiteralString), Push("string")}, + {`(L?)(')(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])(')`, ByGroups(LiteralStringAffix, LiteralStringChar, LiteralStringChar, LiteralStringChar), nil}, + {`(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*`, LiteralNumberFloat, nil}, + {`(\d+\.\d*|\.\d+|\d+[fF])[fF]?`, LiteralNumberFloat, nil}, + {`0x[0-9a-fA-F]+[LlUu]*`, LiteralNumberHex, nil}, + {`0[0-7]+[LlUu]*`, LiteralNumberOct, nil}, + {`\d+[LlUu]*`, LiteralNumberInteger, nil}, + {`\*/`, Error, nil}, + {`[~!%^&*+=|?:<>/-]`, Operator, nil}, + {`[()\[\],.]`, Punctuation, nil}, + {Words(``, `\b`, `asm`, `auto`, `break`, `case`, `const`, `continue`, `default`, `do`, `else`, `enum`, `extern`, `for`, `goto`, `if`, `register`, `restricted`, `return`, `sizeof`, `static`, `struct`, `switch`, `typedef`, `union`, `volatile`, `while`), Keyword, nil}, + {`(bool|int|long|float|short|double|char|unsigned|signed|void)\b`, KeywordType, nil}, + {Words(``, `\b`, `inline`, `_inline`, `__inline`, `naked`, `restrict`, `thread`, `typename`), KeywordReserved, nil}, + {`(__m(128i|128d|128|64))\b`, KeywordReserved, nil}, + {Words(`__`, `\b`, `asm`, `int8`, `based`, `except`, `int16`, `stdcall`, `cdecl`, `fastcall`, `int32`, `declspec`, `finally`, `int64`, `try`, `leave`, `wchar_t`, `w64`, `unaligned`, `raise`, `noop`, `identifier`, `forceinline`, `assume`), KeywordReserved, nil}, + {`(true|false|NULL)\b`, NameBuiltin, nil}, + {`([a-zA-Z_]\w*)(\s*)(:)(?!:)`, ByGroups(NameLabel, Text, Punctuation), nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + }, + "root": { + Include("whitespace"), + {`((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;{]*)(\{)`, ByGroups(UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), Push("function")}, + {`((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;]*)(;)`, ByGroups(UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), nil}, + Default(Push("statement")), + }, + "statement": { + Include("whitespace"), + Include("statements"), + {`[{}]`, Punctuation, nil}, + {`;`, Punctuation, Pop(1)}, + }, + "function": { + Include("whitespace"), + Include("statements"), + {`;`, Punctuation, nil}, + {`\{`, Punctuation, Push()}, + {`\}`, Punctuation, Pop(1)}, + }, + "string": { + {`"`, LiteralString, Pop(1)}, + {`\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})`, LiteralStringEscape, nil}, + {`[^\\"\n]+`, LiteralString, nil}, + {`\\\n`, LiteralString, nil}, + {`\\`, LiteralString, nil}, + }, + "macro": { + {`(include)(\s*(?:/[*].*?[*]/\s*)?)([^\n]+)`, ByGroups(CommentPreproc, Text, CommentPreprocFile), nil}, + {`[^/\n]+`, CommentPreproc, nil}, + {`/[*](.|\n)*?[*]/`, CommentMultiline, nil}, + {`//.*?\n`, CommentSingle, Pop(1)}, + {`/`, CommentPreproc, nil}, + {`(?<=\\)\n`, CommentPreproc, nil}, + {`\n`, CommentPreproc, Pop(1)}, + }, + "if0": { + {`^\s*#if.*?(?|+=:;,./?-]`, Operator, nil}, + {`\d{1,3}(_\d{3})+\.\d{1,3}(_\d{3})+[kMGTPmunpf]?`, LiteralNumberFloat, nil}, + {`\d{1,3}(_\d{3})+\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?`, LiteralNumberFloat, nil}, + {`[0-9][0-9]*\.\d{1,3}(_\d{3})+[kMGTPmunpf]?`, LiteralNumberFloat, nil}, + {`[0-9][0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[kMGTPmunpf]?`, LiteralNumberFloat, nil}, + {`#([0-9a-fA-F]{4})(_[0-9a-fA-F]{4})+`, LiteralNumberHex, nil}, + {`#[0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`\$([01]{4})(_[01]{4})+`, LiteralNumberBin, nil}, + {`\$[01]+`, LiteralNumberBin, nil}, + {`\d{1,3}(_\d{3})+[kMGTP]?`, LiteralNumberInteger, nil}, + {`[0-9]+[kMGTP]?`, LiteralNumberInteger, nil}, + {`\n`, Text, nil}, + }, + "class": { + {`[A-Za-z_]\w*`, NameClass, Pop(1)}, + }, + "import": { + {`[a-z][\w.]*`, NameNamespace, Pop(1)}, + }, + "comment": { + {`[^*/]`, CommentMultiline, nil}, + {`/\*`, CommentMultiline, Push()}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[*/]`, CommentMultiline, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/cfengine3.go b/vendor/github.com/alecthomas/chroma/lexers/cfengine3.go new file mode 100644 index 0000000..ef607e7 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/cfengine3.go @@ -0,0 +1,55 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Cfengine3 lexer. +var Cfengine3 = Register(MustNewLexer( + &Config{ + Name: "CFEngine3", + Aliases: []string{"cfengine3", "cf3"}, + Filenames: []string{"*.cf"}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`#.*?\n`, Comment, nil}, + {`(body)(\s+)(\S+)(\s+)(control)`, ByGroups(Keyword, Text, Keyword, Text, Keyword), nil}, + {`(body|bundle)(\s+)(\S+)(\s+)(\w+)(\()`, ByGroups(Keyword, Text, Keyword, Text, NameFunction, Punctuation), Push("arglist")}, + {`(body|bundle)(\s+)(\S+)(\s+)(\w+)`, ByGroups(Keyword, Text, Keyword, Text, NameFunction), nil}, + {`(")([^"]+)(")(\s+)(string|slist|int|real)(\s*)(=>)(\s*)`, ByGroups(Punctuation, NameVariable, Punctuation, Text, KeywordType, Text, Operator, Text), nil}, + {`(\S+)(\s*)(=>)(\s*)`, ByGroups(KeywordReserved, Text, Operator, Text), nil}, + {`"`, LiteralString, Push("string")}, + {`(\w+)(\()`, ByGroups(NameFunction, Punctuation), nil}, + {`([\w.!&|()]+)(::)`, ByGroups(NameClass, Punctuation), nil}, + {`(\w+)(:)`, ByGroups(KeywordDeclaration, Punctuation), nil}, + {`@[{(][^)}]+[})]`, NameVariable, nil}, + {`[(){},;]`, Punctuation, nil}, + {`=>`, Operator, nil}, + {`->`, Operator, nil}, + {`\d+\.\d+`, LiteralNumberFloat, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`\w+`, NameFunction, nil}, + {`\s+`, Text, nil}, + }, + "string": { + {`\$[{(]`, LiteralStringInterpol, Push("interpol")}, + {`\\.`, LiteralStringEscape, nil}, + {`"`, LiteralString, Pop(1)}, + {`\n`, LiteralString, nil}, + {`.`, LiteralString, nil}, + }, + "interpol": { + {`\$[{(]`, LiteralStringInterpol, Push()}, + {`[})]`, LiteralStringInterpol, Pop(1)}, + {`[^${()}]+`, LiteralStringInterpol, nil}, + }, + "arglist": { + {`\)`, Punctuation, Pop(1)}, + {`,`, Punctuation, nil}, + {`\w+`, NameVariable, nil}, + {`\s+`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/chaiscript.go b/vendor/github.com/alecthomas/chroma/lexers/chaiscript.go new file mode 100644 index 0000000..a2ad7bf --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/chaiscript.go @@ -0,0 +1,62 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Chaiscript lexer. +var Chaiscript = Register(MustNewLexer( + &Config{ + Name: "ChaiScript", + Aliases: []string{"chai", "chaiscript"}, + Filenames: []string{"*.chai"}, + MimeTypes: []string{"text/x-chaiscript", "application/x-chaiscript"}, + DotAll: true, + }, + Rules{ + "commentsandwhitespace": { + {`\s+`, Text, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*.*?\*/`, CommentMultiline, nil}, + {`^\#.*?\n`, CommentSingle, nil}, + }, + "slashstartsregex": { + Include("commentsandwhitespace"), + {`/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gim]+\b|\B)`, LiteralStringRegex, Pop(1)}, + {`(?=/)`, Text, Push("#pop", "badregex")}, + Default(Pop(1)), + }, + "badregex": { + {`\n`, Text, Pop(1)}, + }, + "root": { + Include("commentsandwhitespace"), + {`\n`, Text, nil}, + {`[^\S\n]+`, Text, nil}, + {`\+\+|--|~|&&|\?|:|\|\||\\(?=\n)|\.\.(<<|>>>?|==?|!=?|[-<>+*%&|^/])=?`, Operator, Push("slashstartsregex")}, + {`[{(\[;,]`, Punctuation, Push("slashstartsregex")}, + {`[})\].]`, Punctuation, nil}, + {`[=+\-*/]`, Operator, nil}, + {`(for|in|while|do|break|return|continue|if|else|throw|try|catch)\b`, Keyword, Push("slashstartsregex")}, + {`(var)\b`, KeywordDeclaration, Push("slashstartsregex")}, + {`(attr|def|fun)\b`, KeywordReserved, nil}, + {`(true|false)\b`, KeywordConstant, nil}, + {`(eval|throw)\b`, NameBuiltin, nil}, + {"`\\S+`", NameBuiltin, nil}, + {`[$a-zA-Z_]\w*`, NameOther, nil}, + {`[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?`, LiteralNumberFloat, nil}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`"`, LiteralStringDouble, Push("dqstring")}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + }, + "dqstring": { + {`\$\{[^"}]+?\}`, LiteralStringInterpol, nil}, + {`\$`, LiteralStringDouble, nil}, + {`\\\\`, LiteralStringDouble, nil}, + {`\\"`, LiteralStringDouble, nil}, + {`[^\\"$]+`, LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/cheetah.go b/vendor/github.com/alecthomas/chroma/lexers/cheetah.go new file mode 100644 index 0000000..d9bcad8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/cheetah.go @@ -0,0 +1,35 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Cheetah lexer. +var Cheetah = Register(MustNewLexer( + &Config{ + Name: "Cheetah", + Aliases: []string{"cheetah", "spitfire"}, + Filenames: []string{"*.tmpl", "*.spt"}, + MimeTypes: []string{"application/x-cheetah", "application/x-spitfire"}, + }, + Rules{ + "root": { + {`(##[^\n]*)$`, ByGroups(Comment), nil}, + {`#[*](.|\n)*?[*]#`, Comment, nil}, + {`#end[^#\n]*(?:#|$)`, CommentPreproc, nil}, + {`#slurp$`, CommentPreproc, nil}, + {`(#[a-zA-Z]+)([^#\n]*)(#|$)`, ByGroups(CommentPreproc, Using(Python, nil), CommentPreproc), nil}, + {`(\$)([a-zA-Z_][\w.]*\w)`, ByGroups(CommentPreproc, Using(Python, nil)), nil}, + {`(\$\{!?)(.*?)(\})(?s)`, ByGroups(CommentPreproc, Using(Python, nil), CommentPreproc), nil}, + {`(?sx) + (.+?) # anything, followed by: + (?: + (?=\#[#a-zA-Z]*) | # an eval comment + (?=\$[a-zA-Z_{]) | # a substitution + \Z # end of string + ) + `, Other, nil}, + {`\s+`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/cl.go b/vendor/github.com/alecthomas/chroma/lexers/cl.go new file mode 100644 index 0000000..cd0eac8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/cl.go @@ -0,0 +1,73 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Common Lisp lexer. +var CommonLisp = Register(MustNewLexer( + &Config{ + Name: "Common Lisp", + Aliases: []string{"common-lisp", "cl", "lisp"}, + Filenames: []string{"*.cl", "*.lisp"}, + MimeTypes: []string{"text/x-common-lisp"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + Default(Push("body")), + }, + "multiline-comment": { + {`#\|`, CommentMultiline, Push()}, + {`\|#`, CommentMultiline, Pop(1)}, + {`[^|#]+`, CommentMultiline, nil}, + {`[|#]`, CommentMultiline, nil}, + }, + "commented-form": { + {`\(`, CommentPreproc, Push()}, + {`\)`, CommentPreproc, Pop(1)}, + {`[^()]+`, CommentPreproc, nil}, + }, + "body": { + {`\s+`, Text, nil}, + {`;.*$`, CommentSingle, nil}, + {`#\|`, CommentMultiline, Push("multiline-comment")}, + {`#\d*Y.*$`, CommentSpecial, nil}, + {`"(\\.|\\\n|[^"\\])*"`, LiteralString, nil}, + {`:(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)`, LiteralStringSymbol, nil}, + {`::(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)`, LiteralStringSymbol, nil}, + {`:#(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)`, LiteralStringSymbol, nil}, + {`'(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)`, LiteralStringSymbol, nil}, + {`'`, Operator, nil}, + {"`", Operator, nil}, + {"[-+]?\\d+\\.?(?=[ \"()\\'\\n,;`])", LiteralNumberInteger, nil}, + {"[-+]?\\d+/\\d+(?=[ \"()\\'\\n,;`])", LiteralNumber, nil}, + {"[-+]?(\\d*\\.\\d+([defls][-+]?\\d+)?|\\d+(\\.\\d*)?[defls][-+]?\\d+)(?=[ \"()\\'\\n,;`])", LiteralNumberFloat, nil}, + {"#\\\\.(?=[ \"()\\'\\n,;`])", LiteralStringChar, nil}, + {`#\\(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)`, LiteralStringChar, nil}, + {`#\(`, Operator, Push("body")}, + {`#\d*\*[01]*`, LiteralOther, nil}, + {`#:(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)`, LiteralStringSymbol, nil}, + {`#[.,]`, Operator, nil}, + {`#\'`, NameFunction, nil}, + {`#b[+-]?[01]+(/[01]+)?`, LiteralNumberBin, nil}, + {`#o[+-]?[0-7]+(/[0-7]+)?`, LiteralNumberOct, nil}, + {`#x[+-]?[0-9a-f]+(/[0-9a-f]+)?`, LiteralNumberHex, nil}, + {`#\d+r[+-]?[0-9a-z]+(/[0-9a-z]+)?`, LiteralNumber, nil}, + {`(#c)(\()`, ByGroups(LiteralNumber, Punctuation), Push("body")}, + {`(#\d+a)(\()`, ByGroups(LiteralOther, Punctuation), Push("body")}, + {`(#s)(\()`, ByGroups(LiteralOther, Punctuation), Push("body")}, + {`#p?"(\\.|[^"])*"`, LiteralOther, nil}, + {`#\d+=`, Operator, nil}, + {`#\d+#`, Operator, nil}, + {"#+nil(?=[ \"()\\'\\n,;`])\\s*\\(", CommentPreproc, Push("commented-form")}, + {`#[+-]`, Operator, nil}, + {`(,@|,|\.)`, Operator, nil}, + {"(t|nil)(?=[ \"()\\'\\n,;`])", NameConstant, nil}, + {`\*(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)\*`, NameVariableGlobal, nil}, + {`(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)`, NameVariable, nil}, + {`\(`, Punctuation, Push("body")}, + {`\)`, Punctuation, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/clojure.go b/vendor/github.com/alecthomas/chroma/lexers/clojure.go new file mode 100644 index 0000000..ba0f0ae --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/clojure.go @@ -0,0 +1,37 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Clojure lexer. +var Clojure = Register(MustNewLexer( + &Config{ + Name: "Clojure", + Aliases: []string{"clojure", "clj"}, + Filenames: []string{"*.clj"}, + MimeTypes: []string{"text/x-clojure", "application/x-clojure"}, + }, + Rules{ + "root": { + {`;.*$`, CommentSingle, nil}, + {`[,\s]+`, Text, nil}, + {`-?\d+\.\d+`, LiteralNumberFloat, nil}, + {`-?\d+`, LiteralNumberInteger, nil}, + {`0x-?[abcdef\d]+`, LiteralNumberHex, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`'(?!#)[\w!$%*+<=>?/.#-]+`, LiteralStringSymbol, nil}, + {`\\(.|[a-z]+)`, LiteralStringChar, nil}, + {`::?#?(?!#)[\w!$%*+<=>?/.#-]+`, LiteralStringSymbol, nil}, + {"~@|[`\\'#^~&@]", Operator, nil}, + {Words(``, ` `, `.`, `def`, `do`, `fn`, `if`, `let`, `new`, `quote`, `var`, `loop`), Keyword, nil}, + {Words(``, ` `, `def-`, `defn`, `defn-`, `defmacro`, `defmulti`, `defmethod`, `defstruct`, `defonce`, `declare`, `definline`, `definterface`, `defprotocol`, `defrecord`, `deftype`, `defproject`, `ns`), KeywordDeclaration, nil}, + {Words(``, ` `, `*`, `+`, `-`, `->`, `/`, `<`, `<=`, `=`, `==`, `>`, `>=`, `..`, `accessor`, `agent`, `agent-errors`, `aget`, `alength`, `all-ns`, `alter`, `and`, `append-child`, `apply`, `array-map`, `aset`, `aset-boolean`, `aset-byte`, `aset-char`, `aset-double`, `aset-float`, `aset-int`, `aset-long`, `aset-short`, `assert`, `assoc`, `await`, `await-for`, `bean`, `binding`, `bit-and`, `bit-not`, `bit-or`, `bit-shift-left`, `bit-shift-right`, `bit-xor`, `boolean`, `branch?`, `butlast`, `byte`, `cast`, `char`, `children`, `class`, `clear-agent-errors`, `comment`, `commute`, `comp`, `comparator`, `complement`, `concat`, `conj`, `cons`, `constantly`, `cond`, `if-not`, `construct-proxy`, `contains?`, `count`, `create-ns`, `create-struct`, `cycle`, `dec`, `deref`, `difference`, `disj`, `dissoc`, `distinct`, `doall`, `doc`, `dorun`, `doseq`, `dosync`, `dotimes`, `doto`, `double`, `down`, `drop`, `drop-while`, `edit`, `end?`, `ensure`, `eval`, `every?`, `false?`, `ffirst`, `file-seq`, `filter`, `find`, `find-doc`, `find-ns`, `find-var`, `first`, `float`, `flush`, `for`, `fnseq`, `frest`, `gensym`, `get-proxy-class`, `get`, `hash-map`, `hash-set`, `identical?`, `identity`, `if-let`, `import`, `in-ns`, `inc`, `index`, `insert-child`, `insert-left`, `insert-right`, `inspect-table`, `inspect-tree`, `instance?`, `int`, `interleave`, `intersection`, `into`, `into-array`, `iterate`, `join`, `key`, `keys`, `keyword`, `keyword?`, `last`, `lazy-cat`, `lazy-cons`, `left`, `lefts`, `line-seq`, `list*`, `list`, `load`, `load-file`, `locking`, `long`, `loop`, `macroexpand`, `macroexpand-1`, `make-array`, `make-node`, `map`, `map-invert`, `map?`, `mapcat`, `max`, `max-key`, `memfn`, `merge`, `merge-with`, `meta`, `min`, `min-key`, `name`, `namespace`, `neg?`, `new`, `newline`, `next`, `nil?`, `node`, `not`, `not-any?`, `not-every?`, `not=`, `ns-imports`, `ns-interns`, `ns-map`, `ns-name`, `ns-publics`, `ns-refers`, `ns-resolve`, `ns-unmap`, `nth`, `nthrest`, `or`, `parse`, `partial`, `path`, `peek`, `pop`, `pos?`, `pr`, `pr-str`, `print`, `print-str`, `println`, `println-str`, `prn`, `prn-str`, `project`, `proxy`, `proxy-mappings`, `quot`, `rand`, `rand-int`, `range`, `re-find`, `re-groups`, `re-matcher`, `re-matches`, `re-pattern`, `re-seq`, `read`, `read-line`, `reduce`, `ref`, `ref-set`, `refer`, `rem`, `remove`, `remove-method`, `remove-ns`, `rename`, `rename-keys`, `repeat`, `replace`, `replicate`, `resolve`, `rest`, `resultset-seq`, `reverse`, `rfirst`, `right`, `rights`, `root`, `rrest`, `rseq`, `second`, `select`, `select-keys`, `send`, `send-off`, `seq`, `seq-zip`, `seq?`, `set`, `short`, `slurp`, `some`, `sort`, `sort-by`, `sorted-map`, `sorted-map-by`, `sorted-set`, `special-symbol?`, `split-at`, `split-with`, `str`, `string?`, `struct`, `struct-map`, `subs`, `subvec`, `symbol`, `symbol?`, `sync`, `take`, `take-nth`, `take-while`, `test`, `time`, `to-array`, `to-array-2d`, `tree-seq`, `true?`, `union`, `up`, `update-proxy`, `val`, `vals`, `var-get`, `var-set`, `var?`, `vector`, `vector-zip`, `vector?`, `when`, `when-first`, `when-let`, `when-not`, `with-local-vars`, `with-meta`, `with-open`, `with-out-str`, `xml-seq`, `xml-zip`, `zero?`, `zipmap`, `zipper`), NameBuiltin, nil}, + {`(?<=\()(?!#)[\w!$%*+<=>?/.#-]+`, NameFunction, nil}, + {`(?!#)[\w!$%*+<=>?/.#-]+`, NameVariable, nil}, + {`(\[|\])`, Punctuation, nil}, + {`(\{|\})`, Punctuation, nil}, + {`(\(|\))`, Punctuation, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/cmake.go b/vendor/github.com/alecthomas/chroma/lexers/cmake.go new file mode 100644 index 0000000..04128a4 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/cmake.go @@ -0,0 +1,43 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Cmake lexer. +var Cmake = Register(MustNewLexer( + &Config{ + Name: "CMake", + Aliases: []string{"cmake"}, + Filenames: []string{"*.cmake", "CMakeLists.txt"}, + MimeTypes: []string{"text/x-cmake"}, + }, + Rules{ + "root": { + {`\b(\w+)([ \t]*)(\()`, ByGroups(NameBuiltin, Text, Punctuation), Push("args")}, + Include("keywords"), + Include("ws"), + }, + "args": { + {`\(`, Punctuation, Push()}, + {`\)`, Punctuation, Pop(1)}, + {`(\$\{)(.+?)(\})`, ByGroups(Operator, NameVariable, Operator), nil}, + {`(\$ENV\{)(.+?)(\})`, ByGroups(Operator, NameVariable, Operator), nil}, + {`(\$<)(.+?)(>)`, ByGroups(Operator, NameVariable, Operator), nil}, + {`(?s)".*?"`, LiteralStringDouble, nil}, + {`\\\S+`, LiteralString, nil}, + {`[^)$"# \t\n]+`, LiteralString, nil}, + {`\n`, Text, nil}, + Include("keywords"), + Include("ws"), + }, + "string": {}, + "keywords": { + {`\b(WIN32|UNIX|APPLE|CYGWIN|BORLAND|MINGW|MSVC|MSVC_IDE|MSVC60|MSVC70|MSVC71|MSVC80|MSVC90)\b`, Keyword, nil}, + }, + "ws": { + {`[ \t]+`, Text, nil}, + {`#.*\n`, Comment, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/cobol.go b/vendor/github.com/alecthomas/chroma/lexers/cobol.go new file mode 100644 index 0000000..307047b --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/cobol.go @@ -0,0 +1,50 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Cobol lexer. +var Cobol = Register(MustNewLexer( + &Config{ + Name: "COBOL", + Aliases: []string{"cobol"}, + Filenames: []string{"*.cob", "*.COB", "*.cpy", "*.CPY"}, + MimeTypes: []string{"text/x-cobol"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + Include("comment"), + Include("strings"), + Include("core"), + Include("nums"), + {`[a-z0-9]([\w\-]*[a-z0-9]+)?`, NameVariable, nil}, + {`[ \t]+`, Text, nil}, + }, + "comment": { + {`(^.{6}[*/].*\n|^.{6}|\*>.*\n)`, Comment, nil}, + }, + "core": { + {`(^|(?<=[^\w\-]))(ALL\s+)?((ZEROES)|(HIGH-VALUE|LOW-VALUE|QUOTE|SPACE|ZERO)(S)?)\s*($|(?=[^\w\-]))`, NameConstant, nil}, + {Words(`(^|(?<=[^\w\-]))`, `\s*($|(?=[^\w\-]))`, `ACCEPT`, `ADD`, `ALLOCATE`, `CALL`, `CANCEL`, `CLOSE`, `COMPUTE`, `CONFIGURATION`, `CONTINUE`, `DATA`, `DELETE`, `DISPLAY`, `DIVIDE`, `DIVISION`, `ELSE`, `END`, `END-ACCEPT`, `END-ADD`, `END-CALL`, `END-COMPUTE`, `END-DELETE`, `END-DISPLAY`, `END-DIVIDE`, `END-EVALUATE`, `END-IF`, `END-MULTIPLY`, `END-OF-PAGE`, `END-PERFORM`, `END-READ`, `END-RETURN`, `END-REWRITE`, `END-SEARCH`, `END-START`, `END-STRING`, `END-SUBTRACT`, `END-UNSTRING`, `END-WRITE`, `ENVIRONMENT`, `EVALUATE`, `EXIT`, `FD`, `FILE`, `FILE-CONTROL`, `FOREVER`, `FREE`, `GENERATE`, `GO`, `GOBACK`, `IDENTIFICATION`, `IF`, `INITIALIZE`, `INITIATE`, `INPUT-OUTPUT`, `INSPECT`, `INVOKE`, `I-O-CONTROL`, `LINKAGE`, `LOCAL-STORAGE`, `MERGE`, `MOVE`, `MULTIPLY`, `OPEN`, `PERFORM`, `PROCEDURE`, `PROGRAM-ID`, `RAISE`, `READ`, `RELEASE`, `RESUME`, `RETURN`, `REWRITE`, `SCREEN`, `SD`, `SEARCH`, `SECTION`, `SET`, `SORT`, `START`, `STOP`, `STRING`, `SUBTRACT`, `SUPPRESS`, `TERMINATE`, `THEN`, `UNLOCK`, `UNSTRING`, `USE`, `VALIDATE`, `WORKING-STORAGE`, `WRITE`), KeywordReserved, nil}, + {Words(`(^|(?<=[^\w\-]))`, `\s*($|(?=[^\w\-]))`, `ACCESS`, `ADDRESS`, `ADVANCING`, `AFTER`, `ALL`, `ALPHABET`, `ALPHABETIC`, `ALPHABETIC-LOWER`, `ALPHABETIC-UPPER`, `ALPHANUMERIC`, `ALPHANUMERIC-EDITED`, `ALSO`, `ALTER`, `ALTERNATEANY`, `ARE`, `AREA`, `AREAS`, `ARGUMENT-NUMBER`, `ARGUMENT-VALUE`, `AS`, `ASCENDING`, `ASSIGN`, `AT`, `AUTO`, `AUTO-SKIP`, `AUTOMATIC`, `AUTOTERMINATE`, `BACKGROUND-COLOR`, `BASED`, `BEEP`, `BEFORE`, `BELL`, `BLANK`, `BLINK`, `BLOCK`, `BOTTOM`, `BY`, `BYTE-LENGTH`, `CHAINING`, `CHARACTER`, `CHARACTERS`, `CLASS`, `CODE`, `CODE-SET`, `COL`, `COLLATING`, `COLS`, `COLUMN`, `COLUMNS`, `COMMA`, `COMMAND-LINE`, `COMMIT`, `COMMON`, `CONSTANT`, `CONTAINS`, `CONTENT`, `CONTROL`, `CONTROLS`, `CONVERTING`, `COPY`, `CORR`, `CORRESPONDING`, `COUNT`, `CRT`, `CURRENCY`, `CURSOR`, `CYCLE`, `DATE`, `DAY`, `DAY-OF-WEEK`, `DE`, `DEBUGGING`, `DECIMAL-POINT`, `DECLARATIVES`, `DEFAULT`, `DELIMITED`, `DELIMITER`, `DEPENDING`, `DESCENDING`, `DETAIL`, `DISK`, `DOWN`, `DUPLICATES`, `DYNAMIC`, `EBCDIC`, `ENTRY`, `ENVIRONMENT-NAME`, `ENVIRONMENT-VALUE`, `EOL`, `EOP`, `EOS`, `ERASE`, `ERROR`, `ESCAPE`, `EXCEPTION`, `EXCLUSIVE`, `EXTEND`, `EXTERNAL`, `FILE-ID`, `FILLER`, `FINAL`, `FIRST`, `FIXED`, `FLOAT-LONG`, `FLOAT-SHORT`, `FOOTING`, `FOR`, `FOREGROUND-COLOR`, `FORMAT`, `FROM`, `FULL`, `FUNCTION`, `FUNCTION-ID`, `GIVING`, `GLOBAL`, `GROUP`, `HEADING`, `HIGHLIGHT`, `I-O`, `ID`, `IGNORE`, `IGNORING`, `IN`, `INDEX`, `INDEXED`, `INDICATE`, `INITIAL`, `INITIALIZED`, `INPUT`, `INTO`, `INTRINSIC`, `INVALID`, `IS`, `JUST`, `JUSTIFIED`, `KEY`, `LABEL`, `LAST`, `LEADING`, `LEFT`, `LENGTH`, `LIMIT`, `LIMITS`, `LINAGE`, `LINAGE-COUNTER`, `LINE`, `LINES`, `LOCALE`, `LOCK`, `LOWLIGHT`, `MANUAL`, `MEMORY`, `MINUS`, `MODE`, `MULTIPLE`, `NATIONAL`, `NATIONAL-EDITED`, `NATIVE`, `NEGATIVE`, `NEXT`, `NO`, `NULL`, `NULLS`, `NUMBER`, `NUMBERS`, `NUMERIC`, `NUMERIC-EDITED`, `OBJECT-COMPUTER`, `OCCURS`, `OF`, `OFF`, `OMITTED`, `ON`, `ONLY`, `OPTIONAL`, `ORDER`, `ORGANIZATION`, `OTHER`, `OUTPUT`, `OVERFLOW`, `OVERLINE`, `PACKED-DECIMAL`, `PADDING`, `PAGE`, `PARAGRAPH`, `PLUS`, `POINTER`, `POSITION`, `POSITIVE`, `PRESENT`, `PREVIOUS`, `PRINTER`, `PRINTING`, `PROCEDURE-POINTER`, `PROCEDURES`, `PROCEED`, `PROGRAM`, `PROGRAM-POINTER`, `PROMPT`, `QUOTE`, `QUOTES`, `RANDOM`, `RD`, `RECORD`, `RECORDING`, `RECORDS`, `RECURSIVE`, `REDEFINES`, `REEL`, `REFERENCE`, `RELATIVE`, `REMAINDER`, `REMOVAL`, `RENAMES`, `REPLACING`, `REPORT`, `REPORTING`, `REPORTS`, `REPOSITORY`, `REQUIRED`, `RESERVE`, `RETURNING`, `REVERSE-VIDEO`, `REWIND`, `RIGHT`, `ROLLBACK`, `ROUNDED`, `RUN`, `SAME`, `SCROLL`, `SECURE`, `SEGMENT-LIMIT`, `SELECT`, `SENTENCE`, `SEPARATE`, `SEQUENCE`, `SEQUENTIAL`, `SHARING`, `SIGN`, `SIGNED`, `SIGNED-INT`, `SIGNED-LONG`, `SIGNED-SHORT`, `SIZE`, `SORT-MERGE`, `SOURCE`, `SOURCE-COMPUTER`, `SPECIAL-NAMES`, `STANDARD`, `STANDARD-1`, `STANDARD-2`, `STATUS`, `SUM`, `SYMBOLIC`, `SYNC`, `SYNCHRONIZED`, `TALLYING`, `TAPE`, `TEST`, `THROUGH`, `THRU`, `TIME`, `TIMES`, `TO`, `TOP`, `TRAILING`, `TRANSFORM`, `TYPE`, `UNDERLINE`, `UNIT`, `UNSIGNED`, `UNSIGNED-INT`, `UNSIGNED-LONG`, `UNSIGNED-SHORT`, `UNTIL`, `UP`, `UPDATE`, `UPON`, `USAGE`, `USING`, `VALUE`, `VALUES`, `VARYING`, `WAIT`, `WHEN`, `WITH`, `WORDS`, `YYYYDDD`, `YYYYMMDD`), KeywordPseudo, nil}, + {Words(`(^|(?<=[^\w\-]))`, `\s*($|(?=[^\w\-]))`, `ACTIVE-CLASS`, `ALIGNED`, `ANYCASE`, `ARITHMETIC`, `ATTRIBUTE`, `B-AND`, `B-NOT`, `B-OR`, `B-XOR`, `BIT`, `BOOLEAN`, `CD`, `CENTER`, `CF`, `CH`, `CHAIN`, `CLASS-ID`, `CLASSIFICATION`, `COMMUNICATION`, `CONDITION`, `DATA-POINTER`, `DESTINATION`, `DISABLE`, `EC`, `EGI`, `EMI`, `ENABLE`, `END-RECEIVE`, `ENTRY-CONVENTION`, `EO`, `ESI`, `EXCEPTION-OBJECT`, `EXPANDS`, `FACTORY`, `FLOAT-BINARY-16`, `FLOAT-BINARY-34`, `FLOAT-BINARY-7`, `FLOAT-DECIMAL-16`, `FLOAT-DECIMAL-34`, `FLOAT-EXTENDED`, `FORMAT`, `FUNCTION-POINTER`, `GET`, `GROUP-USAGE`, `IMPLEMENTS`, `INFINITY`, `INHERITS`, `INTERFACE`, `INTERFACE-ID`, `INVOKE`, `LC_ALL`, `LC_COLLATE`, `LC_CTYPE`, `LC_MESSAGES`, `LC_MONETARY`, `LC_NUMERIC`, `LC_TIME`, `LINE-COUNTER`, `MESSAGE`, `METHOD`, `METHOD-ID`, `NESTED`, `NONE`, `NORMAL`, `OBJECT`, `OBJECT-REFERENCE`, `OPTIONS`, `OVERRIDE`, `PAGE-COUNTER`, `PF`, `PH`, `PROPERTY`, `PROTOTYPE`, `PURGE`, `QUEUE`, `RAISE`, `RAISING`, `RECEIVE`, `RELATION`, `REPLACE`, `REPRESENTS-NOT-A-NUMBER`, `RESET`, `RESUME`, `RETRY`, `RF`, `RH`, `SECONDS`, `SEGMENT`, `SELF`, `SEND`, `SOURCES`, `STATEMENT`, `STEP`, `STRONG`, `SUB-QUEUE-1`, `SUB-QUEUE-2`, `SUB-QUEUE-3`, `SUPER`, `SYMBOL`, `SYSTEM-DEFAULT`, `TABLE`, `TERMINAL`, `TEXT`, `TYPEDEF`, `UCS-4`, `UNIVERSAL`, `USER-DEFAULT`, `UTF-16`, `UTF-8`, `VAL-STATUS`, `VALID`, `VALIDATE`, `VALIDATE-STATUS`), Error, nil}, + {`(^|(?<=[^\w\-]))(PIC\s+.+?(?=(\s|\.\s))|PICTURE\s+.+?(?=(\s|\.\s))|(COMPUTATIONAL)(-[1-5X])?|(COMP)(-[1-5X])?|BINARY-C-LONG|BINARY-CHAR|BINARY-DOUBLE|BINARY-LONG|BINARY-SHORT|BINARY)\s*($|(?=[^\w\-]))`, KeywordType, nil}, + {`(\*\*|\*|\+|-|/|<=|>=|<|>|==|/=|=)`, Operator, nil}, + {`([(),;:&%.])`, Punctuation, nil}, + {`(^|(?<=[^\w\-]))(ABS|ACOS|ANNUITY|ASIN|ATAN|BYTE-LENGTH|CHAR|COMBINED-DATETIME|CONCATENATE|COS|CURRENT-DATE|DATE-OF-INTEGER|DATE-TO-YYYYMMDD|DAY-OF-INTEGER|DAY-TO-YYYYDDD|EXCEPTION-(?:FILE|LOCATION|STATEMENT|STATUS)|EXP10|EXP|E|FACTORIAL|FRACTION-PART|INTEGER-OF-(?:DATE|DAY|PART)|INTEGER|LENGTH|LOCALE-(?:DATE|TIME(?:-FROM-SECONDS)?)|LOG(?:10)?|LOWER-CASE|MAX|MEAN|MEDIAN|MIDRANGE|MIN|MOD|NUMVAL(?:-C)?|ORD(?:-MAX|-MIN)?|PI|PRESENT-VALUE|RANDOM|RANGE|REM|REVERSE|SECONDS-FROM-FORMATTED-TIME|SECONDS-PAST-MIDNIGHT|SIGN|SIN|SQRT|STANDARD-DEVIATION|STORED-CHAR-LENGTH|SUBSTITUTE(?:-CASE)?|SUM|TAN|TEST-DATE-YYYYMMDD|TEST-DAY-YYYYDDD|TRIM|UPPER-CASE|VARIANCE|WHEN-COMPILED|YEAR-TO-YYYY)\s*($|(?=[^\w\-]))`, NameFunction, nil}, + {`(^|(?<=[^\w\-]))(true|false)\s*($|(?=[^\w\-]))`, NameBuiltin, nil}, + {`(^|(?<=[^\w\-]))(equal|equals|ne|lt|le|gt|ge|greater|less|than|not|and|or)\s*($|(?=[^\w\-]))`, OperatorWord, nil}, + }, + "strings": { + {`"[^"\n]*("|\n)`, LiteralStringDouble, nil}, + {`'[^'\n]*('|\n)`, LiteralStringSingle, nil}, + }, + "nums": { + {`\d+(\s*|\.$|$)`, LiteralNumberInteger, nil}, + {`[+-]?\d*\.\d+(E[-+]?\d+)?`, LiteralNumberFloat, nil}, + {`[+-]?\d+\.\d*(E[-+]?\d+)?`, LiteralNumberFloat, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/coffee.go b/vendor/github.com/alecthomas/chroma/lexers/coffee.go new file mode 100644 index 0000000..18a3bad --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/coffee.go @@ -0,0 +1,90 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Coffeescript lexer. +var Coffeescript = Register(MustNewLexer( + &Config{ + Name: "CoffeeScript", + Aliases: []string{"coffee-script", "coffeescript", "coffee"}, + Filenames: []string{"*.coffee"}, + MimeTypes: []string{"text/coffeescript"}, + NotMultiline: true, + DotAll: true, + }, + Rules{ + "commentsandwhitespace": { + {`\s+`, Text, nil}, + {`###[^#].*?###`, CommentMultiline, nil}, + {`#(?!##[^#]).*?\n`, CommentSingle, nil}, + }, + "multilineregex": { + {`[^/#]+`, LiteralStringRegex, nil}, + {`///([gim]+\b|\B)`, LiteralStringRegex, Pop(1)}, + {`#\{`, LiteralStringInterpol, Push("interpoling_string")}, + {`[/#]`, LiteralStringRegex, nil}, + }, + "slashstartsregex": { + Include("commentsandwhitespace"), + {`///`, LiteralStringRegex, Push("#pop", "multilineregex")}, + {`/(?! )(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gim]+\b|\B)`, LiteralStringRegex, Pop(1)}, + {`/`, Operator, nil}, + Default(Pop(1)), + }, + "root": { + Include("commentsandwhitespace"), + {`^(?=\s|/)`, Text, Push("slashstartsregex")}, + {"\\+\\+|~|&&|\\band\\b|\\bor\\b|\\bis\\b|\\bisnt\\b|\\bnot\\b|\\?|:|\\|\\||\\\\(?=\\n)|(<<|>>>?|==?(?!>)|!=?|=(?!>)|-(?!>)|[<>+*`%&\\|\\^/])=?", Operator, Push("slashstartsregex")}, + {`(?:\([^()]*\))?\s*[=-]>`, NameFunction, Push("slashstartsregex")}, + {`[{(\[;,]`, Punctuation, Push("slashstartsregex")}, + {`[})\].]`, Punctuation, nil}, + {`(?=|<|>|==`, Operator, nil}, + {`mod\b`, Operator, nil}, + {`(eq|lt|gt|lte|gte|not|is|and|or)\b`, Operator, nil}, + {`\|\||&&`, Operator, nil}, + {`\?`, Operator, nil}, + {`"`, LiteralStringDouble, Push("string")}, + {`'.*?'`, LiteralStringSingle, nil}, + {`\d+`, LiteralNumber, nil}, + {`(if|else|len|var|xml|default|break|switch|component|property|function|do|try|catch|in|continue|for|return|while|required|any|array|binary|boolean|component|date|guid|numeric|query|string|struct|uuid|case)\b`, Keyword, nil}, + {`(true|false|null)\b`, KeywordConstant, nil}, + {`(application|session|client|cookie|super|this|variables|arguments)\b`, NameConstant, nil}, + {`([a-z_$][\w.]*)(\s*)(\()`, ByGroups(NameFunction, Text, Punctuation), nil}, + {`[a-z_$][\w.]*`, NameVariable, nil}, + {`[()\[\]{};:,.\\]`, Punctuation, nil}, + {`\s+`, Text, nil}, + }, + "string": { + {`""`, LiteralStringDouble, nil}, + {`#.+?#`, LiteralStringInterpol, nil}, + {`[^"#]+`, LiteralStringDouble, nil}, + {`#`, LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/coq.go b/vendor/github.com/alecthomas/chroma/lexers/coq.go new file mode 100644 index 0000000..07ec2d3 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/coq.go @@ -0,0 +1,62 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Coq lexer. +var Coq = Register(MustNewLexer( + &Config{ + Name: "Coq", + Aliases: []string{"coq"}, + Filenames: []string{"*.v"}, + MimeTypes: []string{"text/x-coq"}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`false|true|\(\)|\[\]`, NameBuiltinPseudo, nil}, + {`\(\*`, Comment, Push("comment")}, + {Words(`\b`, `\b`, `Section`, `Module`, `End`, `Require`, `Import`, `Export`, `Variable`, `Variables`, `Parameter`, `Parameters`, `Axiom`, `Hypothesis`, `Hypotheses`, `Notation`, `Local`, `Tactic`, `Reserved`, `Scope`, `Open`, `Close`, `Bind`, `Delimit`, `Definition`, `Let`, `Ltac`, `Fixpoint`, `CoFixpoint`, `Morphism`, `Relation`, `Implicit`, `Arguments`, `Set`, `Unset`, `Contextual`, `Strict`, `Prenex`, `Implicits`, `Inductive`, `CoInductive`, `Record`, `Structure`, `Canonical`, `Coercion`, `Theorem`, `Lemma`, `Corollary`, `Proposition`, `Fact`, `Remark`, `Example`, `Proof`, `Goal`, `Save`, `Qed`, `Defined`, `Hint`, `Resolve`, `Rewrite`, `View`, `Search`, `Show`, `Print`, `Printing`, `All`, `Graph`, `Projections`, `inside`, `outside`, `Check`, `Global`, `Instance`, `Class`, `Existing`, `Universe`, `Polymorphic`, `Monomorphic`, `Context`), KeywordNamespace, nil}, + {Words(`\b`, `\b`, `forall`, `exists`, `exists2`, `fun`, `fix`, `cofix`, `struct`, `match`, `end`, `in`, `return`, `let`, `if`, `is`, `then`, `else`, `for`, `of`, `nosimpl`, `with`, `as`), Keyword, nil}, + {Words(`\b`, `\b`, `Type`, `Prop`), KeywordType, nil}, + {Words(`\b`, `\b`, `pose`, `set`, `move`, `case`, `elim`, `apply`, `clear`, `hnf`, `intro`, `intros`, `generalize`, `rename`, `pattern`, `after`, `destruct`, `induction`, `using`, `refine`, `inversion`, `injection`, `rewrite`, `congr`, `unlock`, `compute`, `ring`, `field`, `replace`, `fold`, `unfold`, `change`, `cutrewrite`, `simpl`, `have`, `suff`, `wlog`, `suffices`, `without`, `loss`, `nat_norm`, `assert`, `cut`, `trivial`, `revert`, `bool_congr`, `nat_congr`, `symmetry`, `transitivity`, `auto`, `split`, `left`, `right`, `autorewrite`, `tauto`, `setoid_rewrite`, `intuition`, `eauto`, `eapply`, `econstructor`, `etransitivity`, `constructor`, `erewrite`, `red`, `cbv`, `lazy`, `vm_compute`, `native_compute`, `subst`), Keyword, nil}, + {Words(`\b`, `\b`, `by`, `done`, `exact`, `reflexivity`, `tauto`, `romega`, `omega`, `assumption`, `solve`, `contradiction`, `discriminate`, `congruence`), KeywordPseudo, nil}, + {Words(`\b`, `\b`, `do`, `last`, `first`, `try`, `idtac`, `repeat`), KeywordReserved, nil}, + {`\b([A-Z][\w\']*)`, Name, nil}, + {"(\u03bb|\u03a0|\\|\\}|\\{\\||\\\\/|/\\\\|=>|~|\\}|\\|]|\\||\\{<|\\{|`|_|]|\\[\\||\\[>|\\[<|\\[|\\?\\?|\\?|>\\}|>]|>|=|<->|<-|<|;;|;|:>|:=|::|:|\\.\\.|\\.|->|-\\.|-|,|\\+|\\*|\\)|\\(|&&|&|#|!=)", Operator, nil}, + {`([=<>@^|&+\*/$%-]|[!?~])?[!$%&*+\./:<=>?@^|~-]`, Operator, nil}, + {`\b(unit|nat|bool|string|ascii|list)\b`, KeywordType, nil}, + {`[^\W\d][\w']*`, Name, nil}, + {`\d[\d_]*`, LiteralNumberInteger, nil}, + {`0[xX][\da-fA-F][\da-fA-F_]*`, LiteralNumberHex, nil}, + {`0[oO][0-7][0-7_]*`, LiteralNumberOct, nil}, + {`0[bB][01][01_]*`, LiteralNumberBin, nil}, + {`-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)`, LiteralNumberFloat, nil}, + {`'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'`, LiteralStringChar, nil}, + {`'.'`, LiteralStringChar, nil}, + {`'`, Keyword, nil}, + {`"`, LiteralStringDouble, Push("string")}, + {`[~?][a-z][\w\']*:`, Name, nil}, + }, + "comment": { + {`[^(*)]+`, Comment, nil}, + {`\(\*`, Comment, Push()}, + {`\*\)`, Comment, Pop(1)}, + {`[(*)]`, Comment, nil}, + }, + "string": { + {`[^"]+`, LiteralStringDouble, nil}, + {`""`, LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Pop(1)}, + }, + "dotted": { + {`\s+`, Text, nil}, + {`\.`, Punctuation, nil}, + {`[A-Z][\w\']*(?=\s*\.)`, NameNamespace, nil}, + {`[A-Z][\w\']*`, NameClass, Pop(1)}, + {`[a-z][a-z0-9_\']*`, Name, Pop(1)}, + Default(Pop(1)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/cpp.go b/vendor/github.com/alecthomas/chroma/lexers/cpp.go new file mode 100644 index 0000000..18bf409 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/cpp.go @@ -0,0 +1,101 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// CPP lexer. +var CPP = Register(MustNewLexer( + &Config{ + Name: "C++", + Aliases: []string{"cpp", "c++"}, + Filenames: []string{"*.cpp", "*.hpp", "*.c++", "*.h++", "*.cc", "*.hh", "*.cxx", "*.hxx", "*.C", "*.H", "*.cp", "*.CPP"}, + MimeTypes: []string{"text/x-c++hdr", "text/x-c++src"}, + }, + Rules{ + "statements": { + {Words(``, `\b`, `catch`, `const_cast`, `delete`, `dynamic_cast`, `explicit`, `export`, `friend`, `mutable`, `namespace`, `new`, `operator`, `private`, `protected`, `public`, `reinterpret_cast`, `restrict`, `static_cast`, `template`, `this`, `throw`, `throws`, `try`, `typeid`, `typename`, `using`, `virtual`, `constexpr`, `nullptr`, `decltype`, `thread_local`, `alignas`, `alignof`, `static_assert`, `noexcept`, `override`, `final`), Keyword, nil}, + {`char(16_t|32_t)\b`, KeywordType, nil}, + {`(class)(\s+)`, ByGroups(Keyword, Text), Push("classname")}, + {`(R)(")([^\\()\s]{,16})(\()((?:.|\n)*?)(\)\3)(")`, ByGroups(LiteralStringAffix, LiteralString, LiteralStringDelimiter, LiteralStringDelimiter, LiteralString, LiteralStringDelimiter, LiteralString), nil}, + {`(u8|u|U)(")`, ByGroups(LiteralStringAffix, LiteralString), Push("string")}, + {`(L?)(")`, ByGroups(LiteralStringAffix, LiteralString), Push("string")}, + {`(L?)(')(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])(')`, ByGroups(LiteralStringAffix, LiteralStringChar, LiteralStringChar, LiteralStringChar), nil}, + {`(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*`, LiteralNumberFloat, nil}, + {`(\d+\.\d*|\.\d+|\d+[fF])[fF]?`, LiteralNumberFloat, nil}, + {`0x[0-9a-fA-F]+[LlUu]*`, LiteralNumberHex, nil}, + {`0[0-7]+[LlUu]*`, LiteralNumberOct, nil}, + {`\d+[LlUu]*`, LiteralNumberInteger, nil}, + {`\*/`, Error, nil}, + {`[~!%^&*+=|?:<>/-]`, Operator, nil}, + {`[()\[\],.]`, Punctuation, nil}, + {Words(``, `\b`, `asm`, `auto`, `break`, `case`, `const`, `continue`, `default`, `do`, `else`, `enum`, `extern`, `for`, `goto`, `if`, `register`, `restricted`, `return`, `sizeof`, `static`, `struct`, `switch`, `typedef`, `union`, `volatile`, `while`), Keyword, nil}, + {`(bool|int|long|float|short|double|char|unsigned|signed|void)\b`, KeywordType, nil}, + {Words(``, `\b`, `inline`, `_inline`, `__inline`, `naked`, `restrict`, `thread`, `typename`), KeywordReserved, nil}, + {`(__m(128i|128d|128|64))\b`, KeywordReserved, nil}, + {Words(`__`, `\b`, `asm`, `int8`, `based`, `except`, `int16`, `stdcall`, `cdecl`, `fastcall`, `int32`, `declspec`, `finally`, `int64`, `try`, `leave`, `wchar_t`, `w64`, `unaligned`, `raise`, `noop`, `identifier`, `forceinline`, `assume`), KeywordReserved, nil}, + {`(true|false|NULL)\b`, NameBuiltin, nil}, + {`([a-zA-Z_]\w*)(\s*)(:)(?!:)`, ByGroups(NameLabel, Text, Punctuation), nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + }, + "root": { + Include("whitespace"), + {`((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;{]*)(\{)`, ByGroups(UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), Push("function")}, + {`((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;]*)(;)`, ByGroups(UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), nil}, + Default(Push("statement")), + {Words(`__`, `\b`, `virtual_inheritance`, `uuidof`, `super`, `single_inheritance`, `multiple_inheritance`, `interface`, `event`), KeywordReserved, nil}, + {`__(offload|blockingoffload|outer)\b`, KeywordPseudo, nil}, + }, + "classname": { + {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + {`\s*(?=>)`, Text, Pop(1)}, + }, + "whitespace": { + {`^#if\s+0`, CommentPreproc, Push("if0")}, + {`^#`, CommentPreproc, Push("macro")}, + {`^(\s*(?:/[*].*?[*]/\s*)?)(#if\s+0)`, ByGroups(UsingSelf("root"), CommentPreproc), Push("if0")}, + {`^(\s*(?:/[*].*?[*]/\s*)?)(#)`, ByGroups(UsingSelf("root"), CommentPreproc), Push("macro")}, + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`\\\n`, Text, nil}, + {`//(\n|[\w\W]*?[^\\]\n)`, CommentSingle, nil}, + {`/(\\\n)?[*][\w\W]*?[*](\\\n)?/`, CommentMultiline, nil}, + {`/(\\\n)?[*][\w\W]*`, CommentMultiline, nil}, + }, + "statement": { + Include("whitespace"), + Include("statements"), + {`[{}]`, Punctuation, nil}, + {`;`, Punctuation, Pop(1)}, + }, + "function": { + Include("whitespace"), + Include("statements"), + {`;`, Punctuation, nil}, + {`\{`, Punctuation, Push()}, + {`\}`, Punctuation, Pop(1)}, + }, + "string": { + {`"`, LiteralString, Pop(1)}, + {`\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|[0-7]{1,3})`, LiteralStringEscape, nil}, + {`[^\\"\n]+`, LiteralString, nil}, + {`\\\n`, LiteralString, nil}, + {`\\`, LiteralString, nil}, + }, + "macro": { + {`(include)(\s*(?:/[*].*?[*]/\s*)?)([^\n]+)`, ByGroups(CommentPreproc, Text, CommentPreprocFile), nil}, + {`[^/\n]+`, CommentPreproc, nil}, + {`/[*](.|\n)*?[*]/`, CommentMultiline, nil}, + {`//.*?\n`, CommentSingle, Pop(1)}, + {`/`, CommentPreproc, nil}, + {`(?<=\\)\n`, CommentPreproc, nil}, + {`\n`, CommentPreproc, Pop(1)}, + }, + "if0": { + {`^\s*#if.*?(?=])", Keyword, Push("funcname")}, + {`(class|struct|union|type|alias|enum)(\s+)((?:[a-zA-Z_]\w*::)*)`, ByGroups(Keyword, Text, NameNamespace), Push("classname")}, + {`(self|out|uninitialized)\b|(is_a|responds_to)\?`, KeywordPseudo, nil}, + {Words(``, `\b`, `debugger`, `record`, `pp`, `assert_responds_to`, `spawn`, `parallel`, `getter`, `setter`, `property`, `delegate`, `def_hash`, `def_equals`, `def_equals_and_hash`, `forward_missing_to`), NameBuiltinPseudo, nil}, + {`getter[!?]|property[!?]|__(DIR|FILE|LINE)__\b`, NameBuiltinPseudo, nil}, + {Words(`(?~!:])|(?<=(?:\s|;)when\s)|(?<=(?:\s|;)or\s)|(?<=(?:\s|;)and\s)|(?<=\.index\s)|(?<=\.scan\s)|(?<=\.sub\s)|(?<=\.sub!\s)|(?<=\.gsub\s)|(?<=\.gsub!\s)|(?<=\.match\s)|(?<=(?:\s|;)if\s)|(?<=(?:\s|;)elsif\s)|(?<=^when\s)|(?<=^index\s)|(?<=^scan\s)|(?<=^sub\s)|(?<=^gsub\s)|(?<=^sub!\s)|(?<=^gsub!\s)|(?<=^match\s)|(?<=^if\s)|(?<=^elsif\s))(\s*)(/)`, ByGroups(Text, LiteralStringRegex), Push("multiline-regex")}, + {`(?<=\(|,|\[)/`, LiteralStringRegex, Push("multiline-regex")}, + {`(\s+)(/)(?![\s=])`, ByGroups(Text, LiteralStringRegex), Push("multiline-regex")}, + {`(0o[0-7]+(?:_[0-7]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?`, ByGroups(LiteralNumberOct, Text, Operator), nil}, + {`(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?`, ByGroups(LiteralNumberHex, Text, Operator), nil}, + {`(0b[01]+(?:_[01]+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?`, ByGroups(LiteralNumberBin, Text, Operator), nil}, + {`((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)(?:e[+-]?[0-9]+)?(?:_?f[0-9]+)?)(\s*)([/?])?`, ByGroups(LiteralNumberFloat, Text, Operator), nil}, + {`((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)(?:_?f[0-9]+)?)(\s*)([/?])?`, ByGroups(LiteralNumberFloat, Text, Operator), nil}, + {`((?:0(?![0-9])|[1-9][\d_]*)(?:\.\d[\d_]*)?(?:e[+-]?[0-9]+)?(?:_?f[0-9]+))(\s*)([/?])?`, ByGroups(LiteralNumberFloat, Text, Operator), nil}, + {`(0\b|[1-9][\d]*(?:_\d+)*(?:_?[iu][0-9]+)?)\b(\s*)([/?])?`, ByGroups(LiteralNumberInteger, Text, Operator), nil}, + {`@@[a-zA-Z_]\w*`, NameVariableClass, nil}, + {`@[a-zA-Z_]\w*`, NameVariableInstance, nil}, + {`\$\w+`, NameVariableGlobal, nil}, + {"\\$[!@&`\\'+~=/\\\\,;.<>_*$?:\"^-]", NameVariableGlobal, nil}, + {`\$-[0adFiIlpvw]`, NameVariableGlobal, nil}, + {`::`, Operator, nil}, + Include("strings"), + {`\?(\\[MC]-)*(\\([\\befnrtv#"\']|x[a-fA-F0-9]{1,2}|[0-7]{1,3})|\S)(?!\w)`, LiteralStringChar, nil}, + {`[A-Z][A-Z_]+\b`, NameConstant, nil}, + {`\{%`, LiteralStringInterpol, Push("in-macro-control")}, + {`\{\{`, LiteralStringInterpol, Push("in-macro-expr")}, + {`(@\[)(\s*)([A-Z]\w*)`, ByGroups(Operator, Text, NameDecorator), Push("in-attr")}, + {Words(`(\.|::)`, ``, `!=`, `!~`, `!`, `%`, `&&`, `&`, `**`, `*`, `+`, `-`, `/`, `<=>`, `<<`, `<=`, `<`, `===`, `==`, `=~`, `=`, `>=`, `>>`, `>`, `[]=`, `[]?`, `[]`, `^`, `||`, `|`, `~`), ByGroups(Operator, NameOperator), nil}, + {"(\\.|::)([a-zA-Z_]\\w*[!?]?|[*%&^`~+\\-/\\[<>=])", ByGroups(Operator, Name), nil}, + {`[a-zA-Z_]\w*(?:[!?](?!=))?`, Name, nil}, + {`(\[|\]\??|\*\*|<=>?|>=|<>?|=~|===|!~|&&?|\|\||\.{1,3})`, Operator, nil}, + {`[-+/*%=<>&!^|~]=?`, Operator, nil}, + {`[(){};,/?:\\]`, Punctuation, nil}, + {`\s+`, Text, nil}, + }, + "funcname": { + {"(?:([a-zA-Z_]\\w*)(\\.))?([a-zA-Z_]\\w*[!?]?|\\*\\*?|[-+]@?|[/%&|^`~]|\\[\\]=?|<<|>>|<=?>|>=?|===?)", ByGroups(NameClass, Operator, NameFunction), Pop(1)}, + Default(Pop(1)), + }, + "classname": { + {`[A-Z_]\w*`, NameClass, nil}, + {`(\()(\s*)([A-Z_]\w*)(\s*)(\))`, ByGroups(Punctuation, Text, NameClass, Text, Punctuation), nil}, + Default(Pop(1)), + }, + "in-intp": { + {`\{`, LiteralStringInterpol, Push()}, + {`\}`, LiteralStringInterpol, Pop(1)}, + Include("root"), + }, + "string-intp": { + {`#\{`, LiteralStringInterpol, Push("in-intp")}, + }, + "string-escaped": { + {`\\([\\befnstv#"\']|x[a-fA-F0-9]{1,2}|[0-7]{1,3})`, LiteralStringEscape, nil}, + }, + "string-intp-escaped": { + Include("string-intp"), + Include("string-escaped"), + }, + "interpolated-regex": { + Include("string-intp"), + {`[\\#]`, LiteralStringRegex, nil}, + {`[^\\#]+`, LiteralStringRegex, nil}, + }, + "interpolated-string": { + Include("string-intp"), + {`[\\#]`, LiteralStringOther, nil}, + {`[^\\#]+`, LiteralStringOther, nil}, + }, + "multiline-regex": { + Include("string-intp"), + {`\\\\`, LiteralStringRegex, nil}, + {`\\/`, LiteralStringRegex, nil}, + {`[\\#]`, LiteralStringRegex, nil}, + {`[^\\/#]+`, LiteralStringRegex, nil}, + {`/[imsx]*`, LiteralStringRegex, Pop(1)}, + }, + "end-part": { + {`.+`, CommentPreproc, Pop(1)}, + }, + "in-macro-control": { + {`\{%`, LiteralStringInterpol, Push()}, + {`%\}`, LiteralStringInterpol, Pop(1)}, + {`for\b|in\b`, Keyword, nil}, + Include("root"), + }, + "in-macro-expr": { + {`\{\{`, LiteralStringInterpol, Push()}, + {`\}\}`, LiteralStringInterpol, Pop(1)}, + Include("root"), + }, + "in-attr": { + {`\[`, Operator, Push()}, + {`\]`, Operator, Pop(1)}, + Include("root"), + }, + "strings": { + {`\:@{0,2}[a-zA-Z_]\w*[!?]?`, LiteralStringSymbol, nil}, + {Words(`\:@{0,2}`, ``, `!=`, `!~`, `!`, `%`, `&&`, `&`, `**`, `*`, `+`, `-`, `/`, `<=>`, `<<`, `<=`, `<`, `===`, `==`, `=~`, `=`, `>=`, `>>`, `>`, `[]=`, `[]?`, `[]`, `^`, `||`, `|`, `~`), LiteralStringSymbol, nil}, + {`:'(\\\\|\\'|[^'])*'`, LiteralStringSymbol, nil}, + {`'(\\\\|\\'|[^']|\\[^'\\]+)'`, LiteralStringChar, nil}, + {`:"`, LiteralStringSymbol, Push("simple-sym")}, + {`([a-zA-Z_]\w*)(:)(?!:)`, ByGroups(LiteralStringSymbol, Punctuation), nil}, + {`"`, LiteralStringDouble, Push("simple-string")}, + {"(?&!^|~,(])(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)`, ByGroups(Text, LiteralStringOther, None), nil}, + {`^(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)`, ByGroups(Text, LiteralStringOther, None), nil}, + {`(%([\[{(<]))((?:\\\2|(?!\2).)*)(\2)`, String, nil}, + }, + "simple-string": { + Include("string-intp-escaped"), + {`[^\\"#]+`, LiteralStringDouble, nil}, + {`[\\#]`, LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Pop(1)}, + }, + "simple-sym": { + Include("string-escaped"), + {`[^\\"#]+`, LiteralStringSymbol, nil}, + {`[\\#]`, LiteralStringSymbol, nil}, + {`"`, LiteralStringSymbol, Pop(1)}, + }, + "simple-backtick": { + Include("string-intp-escaped"), + {"[^\\\\`#]+", LiteralStringBacktick, nil}, + {`[\\#]`, LiteralStringBacktick, nil}, + {"`", LiteralStringBacktick, Pop(1)}, + }, + "cb-intp-string": { + {`\\[\{]`, LiteralStringOther, nil}, + {`\{`, LiteralStringOther, Push()}, + {`\}`, LiteralStringOther, Pop(1)}, + Include("string-intp-escaped"), + {`[\\#{}]`, LiteralStringOther, nil}, + {`[^\\#{}]+`, LiteralStringOther, nil}, + }, + "cb-string": { + {`\\[\\{}]`, LiteralStringOther, nil}, + {`\{`, LiteralStringOther, Push()}, + {`\}`, LiteralStringOther, Pop(1)}, + {`[\\#{}]`, LiteralStringOther, nil}, + {`[^\\#{}]+`, LiteralStringOther, nil}, + }, + "cb-regex": { + {`\\[\\{}]`, LiteralStringRegex, nil}, + {`\{`, LiteralStringRegex, Push()}, + {`\}[imsx]*`, LiteralStringRegex, Pop(1)}, + Include("string-intp"), + {`[\\#{}]`, LiteralStringRegex, nil}, + {`[^\\#{}]+`, LiteralStringRegex, nil}, + }, + "sb-intp-string": { + {`\\[\[]`, LiteralStringOther, nil}, + {`\[`, LiteralStringOther, Push()}, + {`\]`, LiteralStringOther, Pop(1)}, + Include("string-intp-escaped"), + {`[\\#\[\]]`, LiteralStringOther, nil}, + {`[^\\#\[\]]+`, LiteralStringOther, nil}, + }, + "sb-string": { + {`\\[\\\[\]]`, LiteralStringOther, nil}, + {`\[`, LiteralStringOther, Push()}, + {`\]`, LiteralStringOther, Pop(1)}, + {`[\\#\[\]]`, LiteralStringOther, nil}, + {`[^\\#\[\]]+`, LiteralStringOther, nil}, + }, + "sb-regex": { + {`\\[\\\[\]]`, LiteralStringRegex, nil}, + {`\[`, LiteralStringRegex, Push()}, + {`\][imsx]*`, LiteralStringRegex, Pop(1)}, + Include("string-intp"), + {`[\\#\[\]]`, LiteralStringRegex, nil}, + {`[^\\#\[\]]+`, LiteralStringRegex, nil}, + }, + "pa-intp-string": { + {`\\[\(]`, LiteralStringOther, nil}, + {`\(`, LiteralStringOther, Push()}, + {`\)`, LiteralStringOther, Pop(1)}, + Include("string-intp-escaped"), + {`[\\#()]`, LiteralStringOther, nil}, + {`[^\\#()]+`, LiteralStringOther, nil}, + }, + "pa-string": { + {`\\[\\()]`, LiteralStringOther, nil}, + {`\(`, LiteralStringOther, Push()}, + {`\)`, LiteralStringOther, Pop(1)}, + {`[\\#()]`, LiteralStringOther, nil}, + {`[^\\#()]+`, LiteralStringOther, nil}, + }, + "pa-regex": { + {`\\[\\()]`, LiteralStringRegex, nil}, + {`\(`, LiteralStringRegex, Push()}, + {`\)[imsx]*`, LiteralStringRegex, Pop(1)}, + Include("string-intp"), + {`[\\#()]`, LiteralStringRegex, nil}, + {`[^\\#()]+`, LiteralStringRegex, nil}, + }, + "ab-intp-string": { + {`\\[<]`, LiteralStringOther, nil}, + {`<`, LiteralStringOther, Push()}, + {`>`, LiteralStringOther, Pop(1)}, + Include("string-intp-escaped"), + {`[\\#<>]`, LiteralStringOther, nil}, + {`[^\\#<>]+`, LiteralStringOther, nil}, + }, + "ab-string": { + {`\\[\\<>]`, LiteralStringOther, nil}, + {`<`, LiteralStringOther, Push()}, + {`>`, LiteralStringOther, Pop(1)}, + {`[\\#<>]`, LiteralStringOther, nil}, + {`[^\\#<>]+`, LiteralStringOther, nil}, + }, + "ab-regex": { + {`\\[\\<>]`, LiteralStringRegex, nil}, + {`<`, LiteralStringRegex, Push()}, + {`>[imsx]*`, LiteralStringRegex, Pop(1)}, + Include("string-intp"), + {`[\\#<>]`, LiteralStringRegex, nil}, + {`[^\\#<>]+`, LiteralStringRegex, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/csharp.go b/vendor/github.com/alecthomas/chroma/lexers/csharp.go new file mode 100644 index 0000000..c113fd6 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/csharp.go @@ -0,0 +1,49 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// CSharp lexer. +var CSharp = Register(MustNewLexer( + &Config{ + Name: "C#", + Aliases: []string{"csharp", "c#"}, + Filenames: []string{"*.cs"}, + MimeTypes: []string{"text/x-csharp"}, + DotAll: true, + }, + Rules{ + "root": { + {`^\s*\[.*?\]`, NameAttribute, nil}, + {`[^\S\n]+`, Text, nil}, + {`\\\n`, Text, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/[*].*?[*]/`, CommentMultiline, nil}, + {`\n`, Text, nil}, + {`[~!%^&*()+=|\[\]:;,.<>/?-]`, Punctuation, nil}, + {`[{}]`, Punctuation, nil}, + {`@"(""|[^"])*"`, LiteralString, nil}, + {`\$@?"(""|[^"])*"`, LiteralString, nil}, + {`"(\\\\|\\"|[^"\n])*["\n]`, LiteralString, nil}, + {`'\\.'|'[^\\]'`, LiteralStringChar, nil}, + {`[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, + {`#[ \t]*(if|endif|else|elif|define|undef|line|error|warning|region|endregion|pragma)\b.*?\n`, CommentPreproc, nil}, + {`\b(extern)(\s+)(alias)\b`, ByGroups(Keyword, Text, Keyword), nil}, + {`(abstract|as|async|await|base|break|by|case|catch|checked|const|continue|default|delegate|do|else|enum|event|explicit|extern|false|finally|fixed|for|foreach|goto|if|implicit|in|interface|internal|is|let|lock|new|null|on|operator|out|override|params|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|true|try|typeof|unchecked|unsafe|virtual|void|while|get|set|new|partial|yield|add|remove|value|alias|ascending|descending|from|group|into|orderby|select|thenby|where|join|equals)\b`, Keyword, nil}, + {`(global)(::)`, ByGroups(Keyword, Punctuation), nil}, + {`(bool|byte|char|decimal|double|dynamic|float|int|long|object|sbyte|short|string|uint|ulong|ushort|var)\b\??`, KeywordType, nil}, + {`(class|struct)(\s+)`, ByGroups(Keyword, Text), Push("class")}, + {`(namespace|using)(\s+)`, ByGroups(Keyword, Text), Push("namespace")}, + {`@?[_a-zA-Z]\w*`, Name, nil}, + }, + "class": { + {`@?[_a-zA-Z]\w*`, NameClass, Pop(1)}, + Default(Pop(1)), + }, + "namespace": { + {`(?=\()`, Text, Pop(1)}, + {`(@?[_a-zA-Z]\w*|\.)+`, NameNamespace, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/css.go b/vendor/github.com/alecthomas/chroma/lexers/css.go new file mode 100644 index 0000000..fa91b85 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/css.go @@ -0,0 +1,106 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// CSS lexer. +var CSS = Register(MustNewLexer( + &Config{ + Name: "CSS", + Aliases: []string{"css"}, + Filenames: []string{"*.css"}, + MimeTypes: []string{"text/css"}, + }, + Rules{ + "root": { + Include("basics"), + }, + "basics": { + {`\s+`, Text, nil}, + {`/\*(?:.|\n)*?\*/`, Comment, nil}, + {`\{`, Punctuation, Push("content")}, + {`(\:{1,2})([\w-]+)`, ByGroups(Punctuation, NameDecorator), nil}, + {`(\.)([\w-]+)`, ByGroups(Punctuation, NameClass), nil}, + {`(\#)([\w-]+)`, ByGroups(Punctuation, NameNamespace), nil}, + {`(@)([\w-]+)`, ByGroups(Punctuation, Keyword), Push("atrule")}, + {`[\w-]+`, NameTag, nil}, + {`[~^*!%&$\[\]()<>|+=@:;,./?-]`, Operator, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + }, + "atrule": { + {`\{`, Punctuation, Push("atcontent")}, + {`;`, Punctuation, Pop(1)}, + Include("basics"), + }, + "atcontent": { + Include("basics"), + {`\}`, Punctuation, Pop(2)}, + }, + "content": { + {`\s+`, Text, nil}, + {`\}`, Punctuation, Pop(1)}, + {`;`, Punctuation, nil}, + {`^@.*?$`, CommentPreproc, nil}, + {Words(``, ``, `-ms-`, `mso-`, `-moz-`, `-o-`, `-xv-`, `-atsc-`, `-wap-`, `-khtml-`, `-webkit-`, `prince-`, `-ah-`, `-hp-`, `-ro-`, `-rim-`, `-tc-`), KeywordPseudo, nil}, + {`(align-content|align-items|align-self|alignment-baseline|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|appearance|azimuth|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|baseline-shift|bookmark-label|bookmark-level|bookmark-state|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-boundary|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|bottom|box-decoration-break|box-shadow|box-sizing|box-snap|box-suppress|break-after|break-before|break-inside|caption-side|caret|caret-animation|caret-color|caret-shape|chains|clear|clip|clip-path|clip-rule|color|color-interpolation-filters|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|counter-set|crop|cue|cue-after|cue-before|cursor|direction|display|dominant-baseline|elevation|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|float-defer|float-offset|float-reference|flood-color|flood-opacity|flow|flow-from|flow-into|font|font-family|font-feature-settings|font-kerning|font-language-override|font-size|font-size-adjust|font-stretch|font-style|font-synthesis|font-variant|font-variant-alternates|font-variant-caps|font-variant-east-asian|font-variant-ligatures|font-variant-numeric|font-variant-position|font-weight|footnote-display|footnote-policy|glyph-orientation-vertical|grid|grid-area|grid-auto-columns|grid-auto-flow|grid-auto-rows|grid-column|grid-column-end|grid-column-gap|grid-column-start|grid-gap|grid-row|grid-row-end|grid-row-gap|grid-row-start|grid-template|grid-template-areas|grid-template-columns|grid-template-rows|hanging-punctuation|height|hyphenate-character|hyphenate-limit-chars|hyphenate-limit-last|hyphenate-limit-lines|hyphenate-limit-zone|hyphens|image-orientation|image-resolution|initial-letter|initial-letter-align|initial-letter-wrap|isolation|justify-content|justify-items|justify-self|left|letter-spacing|lighting-color|line-break|line-grid|line-height|line-snap|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|marker-side|marquee-direction|marquee-loop|marquee-speed|marquee-style|mask|mask-border|mask-border-mode|mask-border-outset|mask-border-repeat|mask-border-slice|mask-border-source|mask-border-width|mask-clip|mask-composite|mask-image|mask-mode|mask-origin|mask-position|mask-repeat|mask-size|mask-type|max-height|max-lines|max-width|min-height|min-width|mix-blend-mode|motion|motion-offset|motion-path|motion-rotation|move-to|nav-down|nav-left|nav-right|nav-up|object-fit|object-position|offset-after|offset-before|offset-end|offset-start|opacity|order|orphans|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-style|overflow-wrap|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page|page-break-after|page-break-before|page-break-inside|page-policy|pause|pause-after|pause-before|perspective|perspective-origin|pitch|pitch-range|play-during|polar-angle|polar-distance|position|presentation-level|quotes|region-fragment|resize|rest|rest-after|rest-before|richness|right|rotation|rotation-point|ruby-align|ruby-merge|ruby-position|running|scroll-snap-coordinate|scroll-snap-destination|scroll-snap-points-x|scroll-snap-points-y|scroll-snap-type|shape-image-threshold|shape-inside|shape-margin|shape-outside|size|speak|speak-as|speak-header|speak-numeral|speak-punctuation|speech-rate|stress|string-set|tab-size|table-layout|text-align|text-align-last|text-combine-upright|text-decoration|text-decoration-color|text-decoration-line|text-decoration-skip|text-decoration-style|text-emphasis|text-emphasis-color|text-emphasis-position|text-emphasis-style|text-indent|text-justify|text-orientation|text-overflow|text-shadow|text-space-collapse|text-space-trim|text-spacing|text-transform|text-underline-position|text-wrap|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch|voice-range|voice-rate|voice-stress|voice-volume|volume|white-space|widows|width|will-change|word-break|word-spacing|word-wrap|wrap-after|wrap-before|wrap-flow|wrap-inside|wrap-through|writing-mode|z-index)(\s*)(\:)`, ByGroups(Keyword, Text, Punctuation), Push("value-start")}, + {`([a-zA-Z_][\w-]*)(\s*)(\:)`, ByGroups(Name, Text, Punctuation), Push("value-start")}, + {`/\*(?:.|\n)*?\*/`, Comment, nil}, + }, + "value-start": { + {`\s+`, Text, nil}, + {Words(``, ``, `-ms-`, `mso-`, `-moz-`, `-o-`, `-xv-`, `-atsc-`, `-wap-`, `-khtml-`, `-webkit-`, `prince-`, `-ah-`, `-hp-`, `-ro-`, `-rim-`, `-tc-`), NameBuiltinPseudo, nil}, + Include("urls"), + {`(attr|blackness|blend|blenda|blur|brightness|calc|circle|color-mod|contrast|counter|cubic-bezier|device-cmyk|drop-shadow|ellipse|gray|grayscale|hsl|hsla|hue|hue-rotate|hwb|image|inset|invert|lightness|linear-gradient|matrix|matrix3d|opacity|perspective|polygon|radial-gradient|rect|repeating-linear-gradient|repeating-radial-gradient|rgb|rgba|rotate|rotate3d|rotateX|rotateY|rotateZ|saturate|saturation|scale|scale3d|scaleX|scaleY|scaleZ|sepia|shade|skewX|skewY|steps|tint|toggle|translate|translate3d|translateX|translateY|translateZ|whiteness)(\()`, ByGroups(NameBuiltin, Punctuation), Push("function-start")}, + {`([a-zA-Z_][\w-]+)(\()`, ByGroups(NameFunction, Punctuation), Push("function-start")}, + {Words(``, `\b`, `absolute`, `alias`, `all`, `all-petite-caps`, `all-scroll`, `all-small-caps`, `allow-end`, `alpha`, `alternate`, `alternate-reverse`, `always`, `armenian`, `auto`, `avoid`, `avoid-column`, `avoid-page`, `backwards`, `balance`, `baseline`, `below`, `blink`, `block`, `bold`, `bolder`, `border-box`, `both`, `bottom`, `box-decoration`, `break-word`, `capitalize`, `cell`, `center`, `circle`, `clip`, `clone`, `close-quote`, `col-resize`, `collapse`, `color`, `color-burn`, `color-dodge`, `column`, `column-reverse`, `compact`, `condensed`, `contain`, `container`, `content-box`, `context-menu`, `copy`, `cover`, `crisp-edges`, `crosshair`, `currentColor`, `cursive`, `darken`, `dashed`, `decimal`, `decimal-leading-zero`, `default`, `descendants`, `difference`, `digits`, `disc`, `distribute`, `dot`, `dotted`, `double`, `double-circle`, `e-resize`, `each-line`, `ease`, `ease-in`, `ease-in-out`, `ease-out`, `edges`, `ellipsis`, `end`, `ew-resize`, `exclusion`, `expanded`, `extra-condensed`, `extra-expanded`, `fantasy`, `fill`, `fill-box`, `filled`, `first`, `fixed`, `flat`, `flex`, `flex-end`, `flex-start`, `flip`, `force-end`, `forwards`, `from-image`, `full-width`, `geometricPrecision`, `georgian`, `groove`, `hanging`, `hard-light`, `help`, `hidden`, `hide`, `horizontal`, `hue`, `icon`, `infinite`, `inherit`, `initial`, `ink`, `inline`, `inline-block`, `inline-flex`, `inline-table`, `inset`, `inside`, `inter-word`, `invert`, `isolate`, `italic`, `justify`, `large`, `larger`, `last`, `left`, `lighten`, `lighter`, `line-through`, `linear`, `list-item`, `local`, `loose`, `lower-alpha`, `lower-greek`, `lower-latin`, `lower-roman`, `lowercase`, `ltr`, `luminance`, `luminosity`, `mandatory`, `manipulation`, `manual`, `margin-box`, `match-parent`, `medium`, `mixed`, `monospace`, `move`, `multiply`, `n-resize`, `ne-resize`, `nesw-resize`, `no-close-quote`, `no-drop`, `no-open-quote`, `no-repeat`, `none`, `normal`, `not-allowed`, `nowrap`, `ns-resize`, `nw-resize`, `nwse-resize`, `objects`, `oblique`, `off`, `on`, `open`, `open-quote`, `optimizeLegibility`, `optimizeSpeed`, `outset`, `outside`, `over`, `overlay`, `overline`, `padding-box`, `page`, `pan-down`, `pan-left`, `pan-right`, `pan-up`, `pan-x`, `pan-y`, `paused`, `petite-caps`, `pixelated`, `pointer`, `preserve-3d`, `progress`, `proximity`, `relative`, `repeat`, `repeat no-repeat`, `repeat-x`, `repeat-y`, `reverse`, `ridge`, `right`, `round`, `row`, `row-resize`, `row-reverse`, `rtl`, `ruby`, `ruby-base`, `ruby-base-container`, `ruby-text`, `ruby-text-container`, `run-in`, `running`, `s-resize`, `sans-serif`, `saturation`, `scale-down`, `screen`, `scroll`, `se-resize`, `semi-condensed`, `semi-expanded`, `separate`, `serif`, `sesame`, `show`, `sideways`, `sideways-left`, `sideways-right`, `slice`, `small`, `small-caps`, `smaller`, `smooth`, `snap`, `soft-light`, `solid`, `space`, `space-around`, `space-between`, `spaces`, `square`, `start`, `static`, `step-end`, `step-start`, `sticky`, `stretch`, `strict`, `stroke-box`, `style`, `sw-resize`, `table`, `table-caption`, `table-cell`, `table-column`, `table-column-group`, `table-footer-group`, `table-header-group`, `table-row`, `table-row-group`, `text`, `thick`, `thin`, `titling-caps`, `to`, `top`, `triangle`, `ultra-condensed`, `ultra-expanded`, `under`, `underline`, `unicase`, `unset`, `upper-alpha`, `upper-latin`, `upper-roman`, `uppercase`, `upright`, `use-glyph-orientation`, `vertical`, `vertical-text`, `view-box`, `visible`, `w-resize`, `wait`, `wavy`, `weight`, `weight style`, `wrap`, `wrap-reverse`, `x-large`, `x-small`, `xx-large`, `xx-small`, `zoom-in`, `zoom-out`), KeywordConstant, nil}, + {Words(``, `\b`, `above`, `aural`, `behind`, `bidi-override`, `center-left`, `center-right`, `cjk-ideographic`, `continuous`, `crop`, `cross`, `embed`, `far-left`, `far-right`, `fast`, `faster`, `hebrew`, `high`, `higher`, `hiragana`, `hiragana-iroha`, `katakana`, `katakana-iroha`, `landscape`, `left-side`, `leftwards`, `level`, `loud`, `low`, `lower`, `message-box`, `middle`, `mix`, `narrower`, `once`, `portrait`, `right-side`, `rightwards`, `silent`, `slow`, `slower`, `small-caption`, `soft`, `spell-out`, `status-bar`, `super`, `text-bottom`, `text-top`, `wider`, `x-fast`, `x-high`, `x-loud`, `x-low`, `x-soft`, `yes`, `pre`, `pre-wrap`, `pre-line`), KeywordConstant, nil}, + {Words(``, `\b`, `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`, `black`, `blanchedalmond`, `blue`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`, `chocolate`, `coral`, `cornflowerblue`, `cornsilk`, `crimson`, `cyan`, `darkblue`, `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkgrey`, `darkkhaki`, `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`, `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkslategrey`, `darkturquoise`, `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dimgrey`, `dodgerblue`, `firebrick`, `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`, `goldenrod`, `gray`, `green`, `greenyellow`, `grey`, `honeydew`, `hotpink`, `indianred`, `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`, `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrodyellow`, `lightgray`, `lightgreen`, `lightgrey`, `lightpink`, `lightsalmon`, `lightseagreen`, `lightskyblue`, `lightslategray`, `lightslategrey`, `lightsteelblue`, `lightyellow`, `lime`, `limegreen`, `linen`, `magenta`, `maroon`, `mediumaquamarine`, `mediumblue`, `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`, `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`, `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navy`, `oldlace`, `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`, `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`, `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `red`, `rosybrown`, `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`, `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `slategrey`, `snow`, `springgreen`, `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`, `wheat`, `white`, `whitesmoke`, `yellow`, `yellowgreen`, `transparent`), KeywordConstant, nil}, + {Words(``, `\b`, `align-content`, `align-items`, `align-self`, `alignment-baseline`, `all`, `animation`, `animation-delay`, `animation-direction`, `animation-duration`, `animation-fill-mode`, `animation-iteration-count`, `animation-name`, `animation-play-state`, `animation-timing-function`, `appearance`, `azimuth`, `backface-visibility`, `background`, `background-attachment`, `background-blend-mode`, `background-clip`, `background-color`, `background-image`, `background-origin`, `background-position`, `background-repeat`, `background-size`, `baseline-shift`, `bookmark-label`, `bookmark-level`, `bookmark-state`, `border`, `border-bottom`, `border-bottom-color`, `border-bottom-left-radius`, `border-bottom-right-radius`, `border-bottom-style`, `border-bottom-width`, `border-boundary`, `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`, `bottom`, `box-decoration-break`, `box-shadow`, `box-sizing`, `box-snap`, `box-suppress`, `break-after`, `break-before`, `break-inside`, `caption-side`, `caret`, `caret-animation`, `caret-color`, `caret-shape`, `chains`, `clear`, `clip`, `clip-path`, `clip-rule`, `color`, `color-interpolation-filters`, `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`, `counter-set`, `crop`, `cue`, `cue-after`, `cue-before`, `cursor`, `direction`, `display`, `dominant-baseline`, `elevation`, `empty-cells`, `filter`, `flex`, `flex-basis`, `flex-direction`, `flex-flow`, `flex-grow`, `flex-shrink`, `flex-wrap`, `float`, `float-defer`, `float-offset`, `float-reference`, `flood-color`, `flood-opacity`, `flow`, `flow-from`, `flow-into`, `font`, `font-family`, `font-feature-settings`, `font-kerning`, `font-language-override`, `font-size`, `font-size-adjust`, `font-stretch`, `font-style`, `font-synthesis`, `font-variant`, `font-variant-alternates`, `font-variant-caps`, `font-variant-east-asian`, `font-variant-ligatures`, `font-variant-numeric`, `font-variant-position`, `font-weight`, `footnote-display`, `footnote-policy`, `glyph-orientation-vertical`, `grid`, `grid-area`, `grid-auto-columns`, `grid-auto-flow`, `grid-auto-rows`, `grid-column`, `grid-column-end`, `grid-column-gap`, `grid-column-start`, `grid-gap`, `grid-row`, `grid-row-end`, `grid-row-gap`, `grid-row-start`, `grid-template`, `grid-template-areas`, `grid-template-columns`, `grid-template-rows`, `hanging-punctuation`, `height`, `hyphenate-character`, `hyphenate-limit-chars`, `hyphenate-limit-last`, `hyphenate-limit-lines`, `hyphenate-limit-zone`, `hyphens`, `image-orientation`, `image-resolution`, `initial-letter`, `initial-letter-align`, `initial-letter-wrap`, `isolation`, `justify-content`, `justify-items`, `justify-self`, `left`, `letter-spacing`, `lighting-color`, `line-break`, `line-grid`, `line-height`, `line-snap`, `list-style`, `list-style-image`, `list-style-position`, `list-style-type`, `margin`, `margin-bottom`, `margin-left`, `margin-right`, `margin-top`, `marker-side`, `marquee-direction`, `marquee-loop`, `marquee-speed`, `marquee-style`, `mask`, `mask-border`, `mask-border-mode`, `mask-border-outset`, `mask-border-repeat`, `mask-border-slice`, `mask-border-source`, `mask-border-width`, `mask-clip`, `mask-composite`, `mask-image`, `mask-mode`, `mask-origin`, `mask-position`, `mask-repeat`, `mask-size`, `mask-type`, `max-height`, `max-lines`, `max-width`, `min-height`, `min-width`, `mix-blend-mode`, `motion`, `motion-offset`, `motion-path`, `motion-rotation`, `move-to`, `nav-down`, `nav-left`, `nav-right`, `nav-up`, `object-fit`, `object-position`, `offset-after`, `offset-before`, `offset-end`, `offset-start`, `opacity`, `order`, `orphans`, `outline`, `outline-color`, `outline-offset`, `outline-style`, `outline-width`, `overflow`, `overflow-style`, `overflow-wrap`, `overflow-x`, `overflow-y`, `padding`, `padding-bottom`, `padding-left`, `padding-right`, `padding-top`, `page`, `page-break-after`, `page-break-before`, `page-break-inside`, `page-policy`, `pause`, `pause-after`, `pause-before`, `perspective`, `perspective-origin`, `pitch`, `pitch-range`, `play-during`, `polar-angle`, `polar-distance`, `position`, `presentation-level`, `quotes`, `region-fragment`, `resize`, `rest`, `rest-after`, `rest-before`, `richness`, `right`, `rotation`, `rotation-point`, `ruby-align`, `ruby-merge`, `ruby-position`, `running`, `scroll-snap-coordinate`, `scroll-snap-destination`, `scroll-snap-points-x`, `scroll-snap-points-y`, `scroll-snap-type`, `shape-image-threshold`, `shape-inside`, `shape-margin`, `shape-outside`, `size`, `speak`, `speak-as`, `speak-header`, `speak-numeral`, `speak-punctuation`, `speech-rate`, `stress`, `string-set`, `tab-size`, `table-layout`, `text-align`, `text-align-last`, `text-combine-upright`, `text-decoration`, `text-decoration-color`, `text-decoration-line`, `text-decoration-skip`, `text-decoration-style`, `text-emphasis`, `text-emphasis-color`, `text-emphasis-position`, `text-emphasis-style`, `text-indent`, `text-justify`, `text-orientation`, `text-overflow`, `text-shadow`, `text-space-collapse`, `text-space-trim`, `text-spacing`, `text-transform`, `text-underline-position`, `text-wrap`, `top`, `transform`, `transform-origin`, `transform-style`, `transition`, `transition-delay`, `transition-duration`, `transition-property`, `transition-timing-function`, `unicode-bidi`, `user-select`, `vertical-align`, `visibility`, `voice-balance`, `voice-duration`, `voice-family`, `voice-pitch`, `voice-range`, `voice-rate`, `voice-stress`, `voice-volume`, `volume`, `white-space`, `widows`, `width`, `will-change`, `word-break`, `word-spacing`, `word-wrap`, `wrap-after`, `wrap-before`, `wrap-flow`, `wrap-inside`, `wrap-through`, `writing-mode`, `z-index`), Keyword, nil}, + {`\!important`, CommentPreproc, nil}, + {`/\*(?:.|\n)*?\*/`, Comment, nil}, + Include("numeric-values"), + {`[~^*!%&<>|+=@:./?-]+`, Operator, nil}, + {`[\[\](),]+`, Punctuation, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`[a-zA-Z_][\w-]*`, Name, nil}, + {`;`, Punctuation, Pop(1)}, + {`\}`, Punctuation, Pop(2)}, + }, + "function-start": { + {`\s+`, Text, nil}, + Include("urls"), + {Words(``, ``, `-ms-`, `mso-`, `-moz-`, `-o-`, `-xv-`, `-atsc-`, `-wap-`, `-khtml-`, `-webkit-`, `prince-`, `-ah-`, `-hp-`, `-ro-`, `-rim-`, `-tc-`), KeywordPseudo, nil}, + {Words(``, `\b`, `absolute`, `alias`, `all`, `all-petite-caps`, `all-scroll`, `all-small-caps`, `allow-end`, `alpha`, `alternate`, `alternate-reverse`, `always`, `armenian`, `auto`, `avoid`, `avoid-column`, `avoid-page`, `backwards`, `balance`, `baseline`, `below`, `blink`, `block`, `bold`, `bolder`, `border-box`, `both`, `bottom`, `box-decoration`, `break-word`, `capitalize`, `cell`, `center`, `circle`, `clip`, `clone`, `close-quote`, `col-resize`, `collapse`, `color`, `color-burn`, `color-dodge`, `column`, `column-reverse`, `compact`, `condensed`, `contain`, `container`, `content-box`, `context-menu`, `copy`, `cover`, `crisp-edges`, `crosshair`, `currentColor`, `cursive`, `darken`, `dashed`, `decimal`, `decimal-leading-zero`, `default`, `descendants`, `difference`, `digits`, `disc`, `distribute`, `dot`, `dotted`, `double`, `double-circle`, `e-resize`, `each-line`, `ease`, `ease-in`, `ease-in-out`, `ease-out`, `edges`, `ellipsis`, `end`, `ew-resize`, `exclusion`, `expanded`, `extra-condensed`, `extra-expanded`, `fantasy`, `fill`, `fill-box`, `filled`, `first`, `fixed`, `flat`, `flex`, `flex-end`, `flex-start`, `flip`, `force-end`, `forwards`, `from-image`, `full-width`, `geometricPrecision`, `georgian`, `groove`, `hanging`, `hard-light`, `help`, `hidden`, `hide`, `horizontal`, `hue`, `icon`, `infinite`, `inherit`, `initial`, `ink`, `inline`, `inline-block`, `inline-flex`, `inline-table`, `inset`, `inside`, `inter-word`, `invert`, `isolate`, `italic`, `justify`, `large`, `larger`, `last`, `left`, `lighten`, `lighter`, `line-through`, `linear`, `list-item`, `local`, `loose`, `lower-alpha`, `lower-greek`, `lower-latin`, `lower-roman`, `lowercase`, `ltr`, `luminance`, `luminosity`, `mandatory`, `manipulation`, `manual`, `margin-box`, `match-parent`, `medium`, `mixed`, `monospace`, `move`, `multiply`, `n-resize`, `ne-resize`, `nesw-resize`, `no-close-quote`, `no-drop`, `no-open-quote`, `no-repeat`, `none`, `normal`, `not-allowed`, `nowrap`, `ns-resize`, `nw-resize`, `nwse-resize`, `objects`, `oblique`, `off`, `on`, `open`, `open-quote`, `optimizeLegibility`, `optimizeSpeed`, `outset`, `outside`, `over`, `overlay`, `overline`, `padding-box`, `page`, `pan-down`, `pan-left`, `pan-right`, `pan-up`, `pan-x`, `pan-y`, `paused`, `petite-caps`, `pixelated`, `pointer`, `preserve-3d`, `progress`, `proximity`, `relative`, `repeat`, `repeat no-repeat`, `repeat-x`, `repeat-y`, `reverse`, `ridge`, `right`, `round`, `row`, `row-resize`, `row-reverse`, `rtl`, `ruby`, `ruby-base`, `ruby-base-container`, `ruby-text`, `ruby-text-container`, `run-in`, `running`, `s-resize`, `sans-serif`, `saturation`, `scale-down`, `screen`, `scroll`, `se-resize`, `semi-condensed`, `semi-expanded`, `separate`, `serif`, `sesame`, `show`, `sideways`, `sideways-left`, `sideways-right`, `slice`, `small`, `small-caps`, `smaller`, `smooth`, `snap`, `soft-light`, `solid`, `space`, `space-around`, `space-between`, `spaces`, `square`, `start`, `static`, `step-end`, `step-start`, `sticky`, `stretch`, `strict`, `stroke-box`, `style`, `sw-resize`, `table`, `table-caption`, `table-cell`, `table-column`, `table-column-group`, `table-footer-group`, `table-header-group`, `table-row`, `table-row-group`, `text`, `thick`, `thin`, `titling-caps`, `to`, `top`, `triangle`, `ultra-condensed`, `ultra-expanded`, `under`, `underline`, `unicase`, `unset`, `upper-alpha`, `upper-latin`, `upper-roman`, `uppercase`, `upright`, `use-glyph-orientation`, `vertical`, `vertical-text`, `view-box`, `visible`, `w-resize`, `wait`, `wavy`, `weight`, `weight style`, `wrap`, `wrap-reverse`, `x-large`, `x-small`, `xx-large`, `xx-small`, `zoom-in`, `zoom-out`), KeywordConstant, nil}, + {Words(``, `\b`, `above`, `aural`, `behind`, `bidi-override`, `center-left`, `center-right`, `cjk-ideographic`, `continuous`, `crop`, `cross`, `embed`, `far-left`, `far-right`, `fast`, `faster`, `hebrew`, `high`, `higher`, `hiragana`, `hiragana-iroha`, `katakana`, `katakana-iroha`, `landscape`, `left-side`, `leftwards`, `level`, `loud`, `low`, `lower`, `message-box`, `middle`, `mix`, `narrower`, `once`, `portrait`, `right-side`, `rightwards`, `silent`, `slow`, `slower`, `small-caption`, `soft`, `spell-out`, `status-bar`, `super`, `text-bottom`, `text-top`, `wider`, `x-fast`, `x-high`, `x-loud`, `x-low`, `x-soft`, `yes`, `pre`, `pre-wrap`, `pre-line`), KeywordConstant, nil}, + {Words(``, `\b`, `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`, `black`, `blanchedalmond`, `blue`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`, `chocolate`, `coral`, `cornflowerblue`, `cornsilk`, `crimson`, `cyan`, `darkblue`, `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkgrey`, `darkkhaki`, `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`, `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkslategrey`, `darkturquoise`, `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dimgrey`, `dodgerblue`, `firebrick`, `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`, `goldenrod`, `gray`, `green`, `greenyellow`, `grey`, `honeydew`, `hotpink`, `indianred`, `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`, `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrodyellow`, `lightgray`, `lightgreen`, `lightgrey`, `lightpink`, `lightsalmon`, `lightseagreen`, `lightskyblue`, `lightslategray`, `lightslategrey`, `lightsteelblue`, `lightyellow`, `lime`, `limegreen`, `linen`, `magenta`, `maroon`, `mediumaquamarine`, `mediumblue`, `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`, `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`, `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navy`, `oldlace`, `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`, `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`, `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `red`, `rosybrown`, `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`, `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `slategrey`, `snow`, `springgreen`, `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`, `wheat`, `white`, `whitesmoke`, `yellow`, `yellowgreen`, `transparent`), KeywordConstant, nil}, + {`(attr|blackness|blend|blenda|blur|brightness|calc|circle|color-mod|contrast|counter|cubic-bezier|device-cmyk|drop-shadow|ellipse|gray|grayscale|hsl|hsla|hue|hue-rotate|hwb|image|inset|invert|lightness|linear-gradient|matrix|matrix3d|opacity|perspective|polygon|radial-gradient|rect|repeating-linear-gradient|repeating-radial-gradient|rgb|rgba|rotate|rotate3d|rotateX|rotateY|rotateZ|saturate|saturation|scale|scale3d|scaleX|scaleY|scaleZ|sepia|shade|skewX|skewY|steps|tint|toggle|translate|translate3d|translateX|translateY|translateZ|whiteness)(\()`, ByGroups(NameBuiltin, Punctuation), Push("function-start")}, + {`([a-zA-Z_][\w-]+)(\()`, ByGroups(NameFunction, Punctuation), Push("function-start")}, + {`/\*(?:.|\n)*?\*/`, Comment, nil}, + Include("numeric-values"), + {`[*+/-]`, Operator, nil}, + {`[,]`, Punctuation, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`[a-zA-Z_-]\w*`, Name, nil}, + {`\)`, Punctuation, Pop(1)}, + }, + "urls": { + {`(url)(\()(".*?")(\))`, ByGroups(NameBuiltin, Punctuation, LiteralStringDouble, Punctuation), nil}, + {`(url)(\()('.*?')(\))`, ByGroups(NameBuiltin, Punctuation, LiteralStringSingle, Punctuation), nil}, + {`(url)(\()(.*?)(\))`, ByGroups(NameBuiltin, Punctuation, LiteralStringOther, Punctuation), nil}, + }, + "numeric-values": { + {`\#[a-zA-Z0-9]{1,6}`, LiteralNumberHex, nil}, + {`[+\-]?[0-9]*[.][0-9]+`, LiteralNumberFloat, Push("numeric-end")}, + {`[+\-]?[0-9]+`, LiteralNumberInteger, Push("numeric-end")}, + }, + "numeric-end": { + {Words(``, `\b`, `deg`, `grad`, `rad`, `turn`, `Hz`, `kHz`, `em`, `ex`, `ch`, `rem`, `vh`, `vw`, `vmin`, `vmax`, `px`, `mm`, `cm`, `in`, `pt`, `pc`, `q`, `dpi`, `dpcm`, `dppx`, `s`, `ms`), KeywordType, nil}, + {`%`, KeywordType, nil}, + Default(Pop(1)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/cython.go b/vendor/github.com/alecthomas/chroma/lexers/cython.go new file mode 100644 index 0000000..3b1e2d6 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/cython.go @@ -0,0 +1,134 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Cython lexer. +var Cython = Register(MustNewLexer( + &Config{ + Name: "Cython", + Aliases: []string{"cython", "pyx", "pyrex"}, + Filenames: []string{"*.pyx", "*.pxd", "*.pxi"}, + MimeTypes: []string{"text/x-cython", "application/x-cython"}, + }, + Rules{ + "root": { + {`\n`, Text, nil}, + {`^(\s*)("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringDoc), nil}, + {`^(\s*)('''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringDoc), nil}, + {`[^\S\n]+`, Text, nil}, + {`#.*$`, Comment, nil}, + {`[]{}:(),;[]`, Punctuation, nil}, + {`\\\n`, Text, nil}, + {`\\`, Text, nil}, + {`(in|is|and|or|not)\b`, OperatorWord, nil}, + {`(<)([a-zA-Z0-9.?]+)(>)`, ByGroups(Punctuation, KeywordType, Punctuation), nil}, + {`!=|==|<<|>>|[-~+/*%=<>&^|.?]`, Operator, nil}, + {`(from)(\d+)(<=)(\s+)(<)(\d+)(:)`, ByGroups(Keyword, LiteralNumberInteger, Operator, Name, Operator, Name, Punctuation), nil}, + Include("keywords"), + {`(def|property)(\s+)`, ByGroups(Keyword, Text), Push("funcname")}, + {`(cp?def)(\s+)`, ByGroups(Keyword, Text), Push("cdef")}, + {`(cdef)(:)`, ByGroups(Keyword, Punctuation), nil}, + {`(class|struct)(\s+)`, ByGroups(Keyword, Text), Push("classname")}, + {`(from)(\s+)`, ByGroups(Keyword, Text), Push("fromimport")}, + {`(c?import)(\s+)`, ByGroups(Keyword, Text), Push("import")}, + Include("builtins"), + Include("backtick"), + {`(?:[rR]|[uU][rR]|[rR][uU])"""`, LiteralString, Push("tdqs")}, + {`(?:[rR]|[uU][rR]|[rR][uU])'''`, LiteralString, Push("tsqs")}, + {`(?:[rR]|[uU][rR]|[rR][uU])"`, LiteralString, Push("dqs")}, + {`(?:[rR]|[uU][rR]|[rR][uU])'`, LiteralString, Push("sqs")}, + {`[uU]?"""`, LiteralString, Combined("stringescape", "tdqs")}, + {`[uU]?'''`, LiteralString, Combined("stringescape", "tsqs")}, + {`[uU]?"`, LiteralString, Combined("stringescape", "dqs")}, + {`[uU]?'`, LiteralString, Combined("stringescape", "sqs")}, + Include("name"), + Include("numbers"), + }, + "keywords": { + {Words(``, `\b`, `assert`, `break`, `by`, `continue`, `ctypedef`, `del`, `elif`, `else`, `except`, `except?`, `exec`, `finally`, `for`, `fused`, `gil`, `global`, `if`, `include`, `lambda`, `nogil`, `pass`, `print`, `raise`, `return`, `try`, `while`, `yield`, `as`, `with`), Keyword, nil}, + {`(DEF|IF|ELIF|ELSE)\b`, CommentPreproc, nil}, + }, + "builtins": { + {Words(`(?/-]|as\b`, Operator, nil}, + {`[a-zA-Z_$]\w*:`, NameLabel, nil}, + {`[a-zA-Z_$]\w*`, Name, nil}, + {`[(){}\[\],.;]`, Punctuation, nil}, + {`0[xX][0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`\d+(\.\d*)?([eE][+-]?\d+)?`, LiteralNumber, nil}, + {`\.\d+([eE][+-]?\d+)?`, LiteralNumber, nil}, + {`\n`, Text, nil}, + }, + "class": { + {`[a-zA-Z_$]\w*`, NameClass, Pop(1)}, + }, + "import_decl": { + Include("string_literal"), + {`\s+`, Text, nil}, + {`\b(as|show|hide)\b`, Keyword, nil}, + {`[a-zA-Z_$]\w*`, Name, nil}, + {`\,`, Punctuation, nil}, + {`\;`, Punctuation, Pop(1)}, + }, + "string_literal": { + {`r"""([\w\W]*?)"""`, LiteralStringDouble, nil}, + {`r'''([\w\W]*?)'''`, LiteralStringSingle, nil}, + {`r"(.*?)"`, LiteralStringDouble, nil}, + {`r'(.*?)'`, LiteralStringSingle, nil}, + {`"""`, LiteralStringDouble, Push("string_double_multiline")}, + {`'''`, LiteralStringSingle, Push("string_single_multiline")}, + {`"`, LiteralStringDouble, Push("string_double")}, + {`'`, LiteralStringSingle, Push("string_single")}, + }, + "string_common": { + {`\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\{[0-9A-Fa-f]*\}|[a-z'\"$\\])`, LiteralStringEscape, nil}, + {`(\$)([a-zA-Z_]\w*)`, ByGroups(LiteralStringInterpol, Name), nil}, + {`(\$\{)(.*?)(\})`, ByGroups(LiteralStringInterpol, UsingSelf("root"), LiteralStringInterpol), nil}, + }, + "string_double": { + {`"`, LiteralStringDouble, Pop(1)}, + {`[^"$\\\n]+`, LiteralStringDouble, nil}, + Include("string_common"), + {`\$+`, LiteralStringDouble, nil}, + }, + "string_double_multiline": { + {`"""`, LiteralStringDouble, Pop(1)}, + {`[^"$\\]+`, LiteralStringDouble, nil}, + Include("string_common"), + {`(\$|\")+`, LiteralStringDouble, nil}, + }, + "string_single": { + {`'`, LiteralStringSingle, Pop(1)}, + {`[^'$\\\n]+`, LiteralStringSingle, nil}, + Include("string_common"), + {`\$+`, LiteralStringSingle, nil}, + }, + "string_single_multiline": { + {`'''`, LiteralStringSingle, Pop(1)}, + {`[^\'$\\]+`, LiteralStringSingle, nil}, + Include("string_common"), + {`(\$|\')+`, LiteralStringSingle, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/diff.go b/vendor/github.com/alecthomas/chroma/lexers/diff.go new file mode 100644 index 0000000..8d9b99a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/diff.go @@ -0,0 +1,27 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Diff lexer. +var Diff = Register(MustNewLexer( + &Config{ + Name: "Diff", + Aliases: []string{"diff", "udiff"}, + Filenames: []string{"*.diff", "*.patch"}, + MimeTypes: []string{"text/x-diff", "text/x-patch"}, + }, + Rules{ + "root": { + {` .*\n`, Text, nil}, + {`\+.*\n`, GenericInserted, nil}, + {`-.*\n`, GenericDeleted, nil}, + {`!.*\n`, GenericStrong, nil}, + {`@.*\n`, GenericSubheading, nil}, + {`([Ii]ndex|diff).*\n`, GenericHeading, nil}, + {`=.*\n`, GenericHeading, nil}, + {`.*\n`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/django.go b/vendor/github.com/alecthomas/chroma/lexers/django.go new file mode 100644 index 0000000..36480f6 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/django.go @@ -0,0 +1,52 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Django/Jinja lexer. +var DjangoJinja = Register(MustNewLexer( + &Config{ + Name: "Django/Jinja", + Aliases: []string{"django", "jinja"}, + Filenames: []string{}, + MimeTypes: []string{"application/x-django-templating", "application/x-jinja"}, + DotAll: true, + }, + Rules{ + "root": { + {`[^{]+`, Other, nil}, + {`\{\{`, CommentPreproc, Push("var")}, + {`\{[*#].*?[*#]\}`, Comment, nil}, + {`(\{%)(-?\s*)(comment)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endcomment)(\s*-?)(%\})`, ByGroups(CommentPreproc, Text, Keyword, Text, CommentPreproc, Comment, CommentPreproc, Text, Keyword, Text, CommentPreproc), nil}, + {`(\{%)(-?\s*)(raw)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endraw)(\s*-?)(%\})`, ByGroups(CommentPreproc, Text, Keyword, Text, CommentPreproc, Text, CommentPreproc, Text, Keyword, Text, CommentPreproc), nil}, + {`(\{%)(-?\s*)(filter)(\s+)([a-zA-Z_]\w*)`, ByGroups(CommentPreproc, Text, Keyword, Text, NameFunction), Push("block")}, + {`(\{%)(-?\s*)([a-zA-Z_]\w*)`, ByGroups(CommentPreproc, Text, Keyword), Push("block")}, + {`\{`, Other, nil}, + }, + "varnames": { + {`(\|)(\s*)([a-zA-Z_]\w*)`, ByGroups(Operator, Text, NameFunction), nil}, + {`(is)(\s+)(not)?(\s+)?([a-zA-Z_]\w*)`, ByGroups(Keyword, Text, Keyword, Text, NameFunction), nil}, + {`(_|true|false|none|True|False|None)\b`, KeywordPseudo, nil}, + {`(in|as|reversed|recursive|not|and|or|is|if|else|import|with(?:(?:out)?\s*context)?|scoped|ignore\s+missing)\b`, Keyword, nil}, + {`(loop|block|super|forloop)\b`, NameBuiltin, nil}, + {`[a-zA-Z_][\w-]*`, NameVariable, nil}, + {`\.\w+`, NameVariable, nil}, + {`:?"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`:?'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`([{}()\[\]+\-*/,:~]|[><=]=?)`, Operator, nil}, + {`[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, + }, + "var": { + {`\s+`, Text, nil}, + {`(-?)(\}\})`, ByGroups(Text, CommentPreproc), Pop(1)}, + Include("varnames"), + }, + "block": { + {`\s+`, Text, nil}, + {`(-?)(%\})`, ByGroups(Text, CommentPreproc), Pop(1)}, + Include("varnames"), + {`.`, Punctuation, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/docker.go b/vendor/github.com/alecthomas/chroma/lexers/docker.go new file mode 100644 index 0000000..f488d73 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/docker.go @@ -0,0 +1,25 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Docker lexer. +var Docker = Register(MustNewLexer( + &Config{ + Name: "Docker", + Aliases: []string{"docker", "dockerfile"}, + Filenames: []string{"Dockerfile", "*.docker"}, + MimeTypes: []string{"text/x-dockerfile-config"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`^(ONBUILD)(\s+)((?:FROM|MAINTAINER|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|WORKDIR))\b`, ByGroups(NameKeyword, TextWhitespace, Keyword), nil}, + {`^((?:FROM|MAINTAINER|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|WORKDIR))\b(.*)`, ByGroups(Keyword, LiteralString), nil}, + {`#.*`, Comment, nil}, + {`RUN`, Keyword, nil}, + {`(.*\\\n)*.+`, Using(Bash, nil), nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/dtd.go b/vendor/github.com/alecthomas/chroma/lexers/dtd.go new file mode 100644 index 0000000..a0b1e89 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/dtd.go @@ -0,0 +1,68 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Dtd lexer. +var Dtd = Register(MustNewLexer( + &Config{ + Name: "DTD", + Aliases: []string{"dtd"}, + Filenames: []string{"*.dtd"}, + MimeTypes: []string{"application/xml-dtd"}, + DotAll: true, + }, + Rules{ + "root": { + Include("common"), + {`(\s]+)`, ByGroups(Keyword, Text, NameTag), nil}, + {`PUBLIC|SYSTEM`, KeywordConstant, nil}, + {`[\[\]>]`, Keyword, nil}, + }, + "common": { + {`\s+`, Text, nil}, + {`(%|&)[^;]*;`, NameEntity, nil}, + {``, Comment, Pop(1)}, + {`-`, Comment, nil}, + }, + "element": { + Include("common"), + {`EMPTY|ANY|#PCDATA`, KeywordConstant, nil}, + {`[^>\s|()?+*,]+`, NameTag, nil}, + {`>`, Keyword, Pop(1)}, + }, + "attlist": { + Include("common"), + {`CDATA|IDREFS|IDREF|ID|NMTOKENS|NMTOKEN|ENTITIES|ENTITY|NOTATION`, KeywordConstant, nil}, + {`#REQUIRED|#IMPLIED|#FIXED`, KeywordConstant, nil}, + {`xml:space|xml:lang`, KeywordReserved, nil}, + {`[^>\s|()?+*,]+`, NameAttribute, nil}, + {`>`, Keyword, Pop(1)}, + }, + "entity": { + Include("common"), + {`SYSTEM|PUBLIC|NDATA`, KeywordConstant, nil}, + {`[^>\s|()?+*,]+`, NameEntity, nil}, + {`>`, Keyword, Pop(1)}, + }, + "notation": { + Include("common"), + {`SYSTEM|PUBLIC`, KeywordConstant, nil}, + {`[^>\s|()?+*,]+`, NameAttribute, nil}, + {`>`, Keyword, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/ebnf.go b/vendor/github.com/alecthomas/chroma/lexers/ebnf.go new file mode 100644 index 0000000..b962b74 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/ebnf.go @@ -0,0 +1,50 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Ebnf lexer. +var Ebnf = Register(MustNewLexer( + &Config{ + Name: "EBNF", + Aliases: []string{"ebnf"}, + Filenames: []string{"*.ebnf"}, + MimeTypes: []string{"text/x-ebnf"}, + }, + Rules{ + "root": { + Include("whitespace"), + Include("comment_start"), + Include("identifier"), + {`=`, Operator, Push("production")}, + }, + "production": { + Include("whitespace"), + Include("comment_start"), + Include("identifier"), + {`"[^"]*"`, LiteralStringDouble, nil}, + {`'[^']*'`, LiteralStringSingle, nil}, + {`(\?[^?]*\?)`, NameEntity, nil}, + {`[\[\]{}(),|]`, Punctuation, nil}, + {`-`, Operator, nil}, + {`;`, Punctuation, Pop(1)}, + {`\.`, Punctuation, Pop(1)}, + }, + "whitespace": { + {`\s+`, Text, nil}, + }, + "comment_start": { + {`\(\*`, CommentMultiline, Push("comment")}, + }, + "comment": { + {`[^*)]`, CommentMultiline, nil}, + Include("comment_start"), + {`\*\)`, CommentMultiline, Pop(1)}, + {`[*)]`, CommentMultiline, nil}, + }, + "identifier": { + {`([a-zA-Z][\w \-]*)`, Keyword, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/elixir.go b/vendor/github.com/alecthomas/chroma/lexers/elixir.go new file mode 100644 index 0000000..64d1c38 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/elixir.go @@ -0,0 +1,269 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Elixir lexer. +var Elixir = Register(MustNewLexer( + &Config{ + Name: "Elixir", + Aliases: []string{"elixir", "ex", "exs"}, + Filenames: []string{"*.ex", "*.exs"}, + MimeTypes: []string{"text/x-elixir"}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`#.*$`, CommentSingle, nil}, + {`(\?)(\\x\{)([\da-fA-F]+)(\})`, ByGroups(LiteralStringChar, LiteralStringEscape, LiteralNumberHex, LiteralStringEscape), nil}, + {`(\?)(\\x[\da-fA-F]{1,2})`, ByGroups(LiteralStringChar, LiteralStringEscape), nil}, + {`(\?)(\\[abdefnrstv])`, ByGroups(LiteralStringChar, LiteralStringEscape), nil}, + {`\?\\?.`, LiteralStringChar, nil}, + {`:::`, LiteralStringSymbol, nil}, + {`::`, Operator, nil}, + {`:(?:\.\.\.|<<>>|%\{\}|%|\{\})`, LiteralStringSymbol, nil}, + {`:(?:(?:\.\.\.|[a-z_]\w*[!?]?)|[A-Z]\w*(?:\.[A-Z]\w*)*|(?:\<\<\<|\>\>\>|\|\|\||\&\&\&|\^\^\^|\~\~\~|\=\=\=|\!\=\=|\~\>\>|\<\~\>|\|\~\>|\<\|\>|\=\=|\!\=|\<\=|\>\=|\&\&|\|\||\<\>|\+\+|\-\-|\|\>|\=\~|\-\>|\<\-|\||\.|\=|\~\>|\<\~|\<|\>|\+|\-|\*|\/|\!|\^|\&))`, LiteralStringSymbol, nil}, + {`:"`, LiteralStringSymbol, Push("string_double_atom")}, + {`:'`, LiteralStringSymbol, Push("string_single_atom")}, + {`((?:\.\.\.|<<>>|%\{\}|%|\{\})|(?:(?:\.\.\.|[a-z_]\w*[!?]?)|[A-Z]\w*(?:\.[A-Z]\w*)*|(?:\<\<\<|\>\>\>|\|\|\||\&\&\&|\^\^\^|\~\~\~|\=\=\=|\!\=\=|\~\>\>|\<\~\>|\|\~\>|\<\|\>|\=\=|\!\=|\<\=|\>\=|\&\&|\|\||\<\>|\+\+|\-\-|\|\>|\=\~|\-\>|\<\-|\||\.|\=|\~\>|\<\~|\<|\>|\+|\-|\*|\/|\!|\^|\&)))(:)(?=\s|\n)`, ByGroups(LiteralStringSymbol, Punctuation), nil}, + {`@(?:\.\.\.|[a-z_]\w*[!?]?)`, NameAttribute, nil}, + {`(?:\.\.\.|[a-z_]\w*[!?]?)`, Name, nil}, + {`(%?)([A-Z]\w*(?:\.[A-Z]\w*)*)`, ByGroups(Punctuation, NameClass), nil}, + {`\<\<\<|\>\>\>|\|\|\||\&\&\&|\^\^\^|\~\~\~|\=\=\=|\!\=\=|\~\>\>|\<\~\>|\|\~\>|\<\|\>`, Operator, nil}, + {`\=\=|\!\=|\<\=|\>\=|\&\&|\|\||\<\>|\+\+|\-\-|\|\>|\=\~|\-\>|\<\-|\||\.|\=|\~\>|\<\~`, Operator, nil}, + {`\\\\|\<\<|\>\>|\=\>|\(|\)|\:|\;|\,|\[|\]`, Punctuation, nil}, + {`&\d`, NameEntity, nil}, + {`\<|\>|\+|\-|\*|\/|\!|\^|\&`, Operator, nil}, + {`0b[01]+`, LiteralNumberBin, nil}, + {`0o[0-7]+`, LiteralNumberOct, nil}, + {`0x[\da-fA-F]+`, LiteralNumberHex, nil}, + {`\d(_?\d)*\.\d(_?\d)*([eE][-+]?\d(_?\d)*)?`, LiteralNumberFloat, nil}, + {`\d(_?\d)*`, LiteralNumberInteger, nil}, + {`"""\s*`, LiteralStringHeredoc, Push("heredoc_double")}, + {`'''\s*$`, LiteralStringHeredoc, Push("heredoc_single")}, + {`"`, LiteralStringDouble, Push("string_double")}, + {`'`, LiteralStringSingle, Push("string_single")}, + Include("sigils"), + {`%\{`, Punctuation, Push("map_key")}, + {`\{`, Punctuation, Push("tuple")}, + }, + "heredoc_double": { + {`^\s*"""`, LiteralStringHeredoc, Pop(1)}, + Include("heredoc_interpol"), + }, + "heredoc_single": { + {`^\s*'''`, LiteralStringHeredoc, Pop(1)}, + Include("heredoc_interpol"), + }, + "heredoc_interpol": { + {`[^#\\\n]+`, LiteralStringHeredoc, nil}, + Include("escapes"), + {`\\.`, LiteralStringHeredoc, nil}, + {`\n+`, LiteralStringHeredoc, nil}, + Include("interpol"), + }, + "heredoc_no_interpol": { + {`[^\\\n]+`, LiteralStringHeredoc, nil}, + {`\\.`, LiteralStringHeredoc, nil}, + {`\n+`, LiteralStringHeredoc, nil}, + }, + "escapes": { + {`(\\x\{)([\da-fA-F]+)(\})`, ByGroups(LiteralStringEscape, LiteralNumberHex, LiteralStringEscape), nil}, + {`(\\x[\da-fA-F]{1,2})`, LiteralStringEscape, nil}, + {`(\\[abdefnrstv])`, LiteralStringEscape, nil}, + }, + "interpol": { + {`#\{`, LiteralStringInterpol, Push("interpol_string")}, + }, + "interpol_string": { + {`\}`, LiteralStringInterpol, Pop(1)}, + Include("root"), + }, + "map_key": { + Include("root"), + {`:`, Punctuation, Push("map_val")}, + {`=>`, Punctuation, Push("map_val")}, + {`\}`, Punctuation, Pop(1)}, + }, + "map_val": { + Include("root"), + {`,`, Punctuation, Pop(1)}, + {`(?=\})`, Punctuation, Pop(1)}, + }, + "tuple": { + Include("root"), + {`\}`, Punctuation, Pop(1)}, + }, + "string_double": { + {`[^#"\\]+`, LiteralStringDouble, nil}, + Include("escapes"), + {`\\.`, LiteralStringDouble, nil}, + {`(")`, ByGroups(LiteralStringDouble), Pop(1)}, + Include("interpol"), + }, + "string_single": { + {`[^#'\\]+`, LiteralStringSingle, nil}, + Include("escapes"), + {`\\.`, LiteralStringSingle, nil}, + {`(')`, ByGroups(LiteralStringSingle), Pop(1)}, + Include("interpol"), + }, + "string_double_atom": { + {`[^#"\\]+`, LiteralStringSymbol, nil}, + Include("escapes"), + {`\\.`, LiteralStringSymbol, nil}, + {`(")`, ByGroups(LiteralStringSymbol), Pop(1)}, + Include("interpol"), + }, + "string_single_atom": { + {`[^#'\\]+`, LiteralStringSymbol, nil}, + Include("escapes"), + {`\\.`, LiteralStringSymbol, nil}, + {`(')`, ByGroups(LiteralStringSymbol), Pop(1)}, + Include("interpol"), + }, + "sigils": { + {`(~[a-z])(""")`, ByGroups(LiteralStringOther, LiteralStringHeredoc), Push("triquot-end", "triquot-intp")}, + {`(~[A-Z])(""")`, ByGroups(LiteralStringOther, LiteralStringHeredoc), Push("triquot-end", "triquot-no-intp")}, + {`(~[a-z])(''')`, ByGroups(LiteralStringOther, LiteralStringHeredoc), Push("triapos-end", "triapos-intp")}, + {`(~[A-Z])(''')`, ByGroups(LiteralStringOther, LiteralStringHeredoc), Push("triapos-end", "triapos-no-intp")}, + {`~[a-z]\{`, LiteralStringOther, Push("cb-intp")}, + {`~[A-Z]\{`, LiteralStringOther, Push("cb-no-intp")}, + {`~[a-z]\[`, LiteralStringOther, Push("sb-intp")}, + {`~[A-Z]\[`, LiteralStringOther, Push("sb-no-intp")}, + {`~[a-z]\(`, LiteralStringOther, Push("pa-intp")}, + {`~[A-Z]\(`, LiteralStringOther, Push("pa-no-intp")}, + {`~[a-z]<`, LiteralStringOther, Push("ab-intp")}, + {`~[A-Z]<`, LiteralStringOther, Push("ab-no-intp")}, + {`~[a-z]/`, LiteralStringOther, Push("slas-intp")}, + {`~[A-Z]/`, LiteralStringOther, Push("slas-no-intp")}, + {`~[a-z]\|`, LiteralStringOther, Push("pipe-intp")}, + {`~[A-Z]\|`, LiteralStringOther, Push("pipe-no-intp")}, + {`~[a-z]"`, LiteralStringOther, Push("quot-intp")}, + {`~[A-Z]"`, LiteralStringOther, Push("quot-no-intp")}, + {`~[a-z]'`, LiteralStringOther, Push("apos-intp")}, + {`~[A-Z]'`, LiteralStringOther, Push("apos-no-intp")}, + }, + "triquot-end": { + {`[a-zA-Z]+`, LiteralStringOther, Pop(1)}, + Default(Pop(1)), + }, + "triquot-intp": { + {`^\s*"""`, LiteralStringHeredoc, Pop(1)}, + Include("heredoc_interpol"), + }, + "triquot-no-intp": { + {`^\s*"""`, LiteralStringHeredoc, Pop(1)}, + Include("heredoc_no_interpol"), + }, + "triapos-end": { + {`[a-zA-Z]+`, LiteralStringOther, Pop(1)}, + Default(Pop(1)), + }, + "triapos-intp": { + {`^\s*'''`, LiteralStringHeredoc, Pop(1)}, + Include("heredoc_interpol"), + }, + "triapos-no-intp": { + {`^\s*'''`, LiteralStringHeredoc, Pop(1)}, + Include("heredoc_no_interpol"), + }, + "cb-intp": { + {`[^#\}\\]+`, LiteralStringOther, nil}, + Include("escapes"), + {`\\.`, LiteralStringOther, nil}, + {`\}[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + Include("interpol"), + }, + "cb-no-intp": { + {`[^\}\\]+`, LiteralStringOther, nil}, + {`\\.`, LiteralStringOther, nil}, + {`\}[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + }, + "sb-intp": { + {`[^#\]\\]+`, LiteralStringOther, nil}, + Include("escapes"), + {`\\.`, LiteralStringOther, nil}, + {`\][a-zA-Z]*`, LiteralStringOther, Pop(1)}, + Include("interpol"), + }, + "sb-no-intp": { + {`[^\]\\]+`, LiteralStringOther, nil}, + {`\\.`, LiteralStringOther, nil}, + {`\][a-zA-Z]*`, LiteralStringOther, Pop(1)}, + }, + "pa-intp": { + {`[^#\)\\]+`, LiteralStringOther, nil}, + Include("escapes"), + {`\\.`, LiteralStringOther, nil}, + {`\)[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + Include("interpol"), + }, + "pa-no-intp": { + {`[^\)\\]+`, LiteralStringOther, nil}, + {`\\.`, LiteralStringOther, nil}, + {`\)[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + }, + "ab-intp": { + {`[^#>\\]+`, LiteralStringOther, nil}, + Include("escapes"), + {`\\.`, LiteralStringOther, nil}, + {`>[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + Include("interpol"), + }, + "ab-no-intp": { + {`[^>\\]+`, LiteralStringOther, nil}, + {`\\.`, LiteralStringOther, nil}, + {`>[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + }, + "slas-intp": { + {`[^#/\\]+`, LiteralStringOther, nil}, + Include("escapes"), + {`\\.`, LiteralStringOther, nil}, + {`/[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + Include("interpol"), + }, + "slas-no-intp": { + {`[^/\\]+`, LiteralStringOther, nil}, + {`\\.`, LiteralStringOther, nil}, + {`/[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + }, + "pipe-intp": { + {`[^#\|\\]+`, LiteralStringOther, nil}, + Include("escapes"), + {`\\.`, LiteralStringOther, nil}, + {`\|[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + Include("interpol"), + }, + "pipe-no-intp": { + {`[^\|\\]+`, LiteralStringOther, nil}, + {`\\.`, LiteralStringOther, nil}, + {`\|[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + }, + "quot-intp": { + {`[^#"\\]+`, LiteralStringOther, nil}, + Include("escapes"), + {`\\.`, LiteralStringOther, nil}, + {`"[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + Include("interpol"), + }, + "quot-no-intp": { + {`[^"\\]+`, LiteralStringOther, nil}, + {`\\.`, LiteralStringOther, nil}, + {`"[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + }, + "apos-intp": { + {`[^#'\\]+`, LiteralStringOther, nil}, + Include("escapes"), + {`\\.`, LiteralStringOther, nil}, + {`'[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + Include("interpol"), + }, + "apos-no-intp": { + {`[^'\\]+`, LiteralStringOther, nil}, + {`\\.`, LiteralStringOther, nil}, + {`'[a-zA-Z]*`, LiteralStringOther, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/elm.go b/vendor/github.com/alecthomas/chroma/lexers/elm.go new file mode 100644 index 0000000..31b3d86 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/elm.go @@ -0,0 +1,58 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Elm lexer. +var Elm = Register(MustNewLexer( + &Config{ + Name: "Elm", + Aliases: []string{"elm"}, + Filenames: []string{"*.elm"}, + MimeTypes: []string{"text/x-elm"}, + }, + Rules{ + "root": { + {`\{-`, CommentMultiline, Push("comment")}, + {`--.*`, CommentSingle, nil}, + {`\s+`, Text, nil}, + {`"`, LiteralString, Push("doublequote")}, + {`^\s*module\s*`, KeywordNamespace, Push("imports")}, + {`^\s*import\s*`, KeywordNamespace, Push("imports")}, + {`\[glsl\|.*`, NameEntity, Push("shader")}, + {Words(``, `\b`, `alias`, `as`, `case`, `else`, `if`, `import`, `in`, `let`, `module`, `of`, `port`, `then`, `type`, `where`), KeywordReserved, nil}, + {`[A-Z]\w*`, KeywordType, nil}, + {`^main `, KeywordReserved, nil}, + {Words(`\(`, `\)`, `~`, `||`, `|>`, `|`, "`", `^`, `\`, `'`, `>>`, `>=`, `>`, `==`, `=`, `<~`, `<|`, `<=`, `<<`, `<-`, `<`, `::`, `:`, `/=`, `//`, `/`, `..`, `.`, `->`, `-`, `++`, `+`, `*`, `&&`, `%`), NameFunction, nil}, + {Words(``, ``, `~`, `||`, `|>`, `|`, "`", `^`, `\`, `'`, `>>`, `>=`, `>`, `==`, `=`, `<~`, `<|`, `<=`, `<<`, `<-`, `<`, `::`, `:`, `/=`, `//`, `/`, `..`, `.`, `->`, `-`, `++`, `+`, `*`, `&&`, `%`), NameFunction, nil}, + Include("numbers"), + {`[a-z_][a-zA-Z_\']*`, NameVariable, nil}, + {`[,()\[\]{}]`, Punctuation, nil}, + }, + "comment": { + {`-(?!\})`, CommentMultiline, nil}, + {`\{-`, CommentMultiline, Push("comment")}, + {`[^-}]`, CommentMultiline, nil}, + {`-\}`, CommentMultiline, Pop(1)}, + }, + "doublequote": { + {`\\u[0-9a-fA-F]{4}`, LiteralStringEscape, nil}, + {`\\[nrfvb\\"]`, LiteralStringEscape, nil}, + {`[^"]`, LiteralString, nil}, + {`"`, LiteralString, Pop(1)}, + }, + "imports": { + {`\w+(\.\w+)*`, NameClass, Pop(1)}, + }, + "numbers": { + {`_?\d+\.(?=\d+)`, LiteralNumberFloat, nil}, + {`_?\d+`, LiteralNumberInteger, nil}, + }, + "shader": { + {`\|(?!\])`, NameEntity, nil}, + {`\|\]`, NameEntity, Pop(1)}, + {`.*\n`, NameEntity, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/emacs.go b/vendor/github.com/alecthomas/chroma/lexers/emacs.go new file mode 100644 index 0000000..6d7a459 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/emacs.go @@ -0,0 +1,581 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +var ( + emacsMacros = []string{ + "atomic-change-group", "case", "block", "cl-block", "cl-callf", "cl-callf2", + "cl-case", "cl-decf", "cl-declaim", "cl-declare", + "cl-define-compiler-macro", "cl-defmacro", "cl-defstruct", + "cl-defsubst", "cl-deftype", "cl-defun", "cl-destructuring-bind", + "cl-do", "cl-do*", "cl-do-all-symbols", "cl-do-symbols", "cl-dolist", + "cl-dotimes", "cl-ecase", "cl-etypecase", "eval-when", "cl-eval-when", "cl-flet", + "cl-flet*", "cl-function", "cl-incf", "cl-labels", "cl-letf", + "cl-letf*", "cl-load-time-value", "cl-locally", "cl-loop", + "cl-macrolet", "cl-multiple-value-bind", "cl-multiple-value-setq", + "cl-progv", "cl-psetf", "cl-psetq", "cl-pushnew", "cl-remf", + "cl-return", "cl-return-from", "cl-rotatef", "cl-shiftf", + "cl-symbol-macrolet", "cl-tagbody", "cl-the", "cl-typecase", + "combine-after-change-calls", "condition-case-unless-debug", "decf", + "declaim", "declare", "declare-function", "def-edebug-spec", + "defadvice", "defclass", "defcustom", "defface", "defgeneric", + "defgroup", "define-advice", "define-alternatives", + "define-compiler-macro", "define-derived-mode", "define-generic-mode", + "define-global-minor-mode", "define-globalized-minor-mode", + "define-minor-mode", "define-modify-macro", + "define-obsolete-face-alias", "define-obsolete-function-alias", + "define-obsolete-variable-alias", "define-setf-expander", + "define-skeleton", "defmacro", "defmethod", "defsetf", "defstruct", + "defsubst", "deftheme", "deftype", "defun", "defvar-local", + "delay-mode-hooks", "destructuring-bind", "do", "do*", + "do-all-symbols", "do-symbols", "dolist", "dont-compile", "dotimes", + "dotimes-with-progress-reporter", "ecase", "ert-deftest", "etypecase", + "eval-and-compile", "eval-when-compile", "flet", "ignore-errors", + "incf", "labels", "lambda", "letrec", "lexical-let", "lexical-let*", + "loop", "multiple-value-bind", "multiple-value-setq", "noreturn", + "oref", "oref-default", "oset", "oset-default", "pcase", + "pcase-defmacro", "pcase-dolist", "pcase-exhaustive", "pcase-let", + "pcase-let*", "pop", "psetf", "psetq", "push", "pushnew", "remf", + "return", "rotatef", "rx", "save-match-data", "save-selected-window", + "save-window-excursion", "setf", "setq-local", "shiftf", + "track-mouse", "typecase", "unless", "use-package", "when", + "while-no-input", "with-case-table", "with-category-table", + "with-coding-priority", "with-current-buffer", "with-demoted-errors", + "with-eval-after-load", "with-file-modes", "with-local-quit", + "with-output-to-string", "with-output-to-temp-buffer", + "with-parsed-tramp-file-name", "with-selected-frame", + "with-selected-window", "with-silent-modifications", "with-slots", + "with-syntax-table", "with-temp-buffer", "with-temp-file", + "with-temp-message", "with-timeout", "with-tramp-connection-property", + "with-tramp-file-property", "with-tramp-progress-reporter", + "with-wrapper-hook", "load-time-value", "locally", "macrolet", "progv", + "return-from", + } + + emacsSpecialForms = []string{ + "and", "catch", "cond", "condition-case", "defconst", "defvar", + "function", "if", "interactive", "let", "let*", "or", "prog1", + "prog2", "progn", "quote", "save-current-buffer", "save-excursion", + "save-restriction", "setq", "setq-default", "subr-arity", + "unwind-protect", "while", + } + + emacsBuiltinFunction = []string{ + "%", "*", "+", "-", "/", "/=", "1+", "1-", "<", "<=", "=", ">", ">=", + "Snarf-documentation", "abort-recursive-edit", "abs", + "accept-process-output", "access-file", "accessible-keymaps", "acos", + "active-minibuffer-window", "add-face-text-property", + "add-name-to-file", "add-text-properties", "all-completions", + "append", "apply", "apropos-internal", "aref", "arrayp", "aset", + "ash", "asin", "assoc", "assoc-string", "assq", "atan", "atom", + "autoload", "autoload-do-load", "backtrace", "backtrace--locals", + "backtrace-debug", "backtrace-eval", "backtrace-frame", + "backward-char", "backward-prefix-chars", "barf-if-buffer-read-only", + "base64-decode-region", "base64-decode-string", + "base64-encode-region", "base64-encode-string", "beginning-of-line", + "bidi-find-overridden-directionality", "bidi-resolved-levels", + "bitmap-spec-p", "bobp", "bolp", "bool-vector", + "bool-vector-count-consecutive", "bool-vector-count-population", + "bool-vector-exclusive-or", "bool-vector-intersection", + "bool-vector-not", "bool-vector-p", "bool-vector-set-difference", + "bool-vector-subsetp", "bool-vector-union", "boundp", + "buffer-base-buffer", "buffer-chars-modified-tick", + "buffer-enable-undo", "buffer-file-name", "buffer-has-markers-at", + "buffer-list", "buffer-live-p", "buffer-local-value", + "buffer-local-variables", "buffer-modified-p", "buffer-modified-tick", + "buffer-name", "buffer-size", "buffer-string", "buffer-substring", + "buffer-substring-no-properties", "buffer-swap-text", "bufferp", + "bury-buffer-internal", "byte-code", "byte-code-function-p", + "byte-to-position", "byte-to-string", "byteorder", + "call-interactively", "call-last-kbd-macro", "call-process", + "call-process-region", "cancel-kbd-macro-events", "capitalize", + "capitalize-region", "capitalize-word", "car", "car-less-than-car", + "car-safe", "case-table-p", "category-docstring", + "category-set-mnemonics", "category-table", "category-table-p", + "ccl-execute", "ccl-execute-on-string", "ccl-program-p", "cdr", + "cdr-safe", "ceiling", "char-after", "char-before", + "char-category-set", "char-charset", "char-equal", "char-or-string-p", + "char-resolve-modifiers", "char-syntax", "char-table-extra-slot", + "char-table-p", "char-table-parent", "char-table-range", + "char-table-subtype", "char-to-string", "char-width", "characterp", + "charset-after", "charset-id-internal", "charset-plist", + "charset-priority-list", "charsetp", "check-coding-system", + "check-coding-systems-region", "clear-buffer-auto-save-failure", + "clear-charset-maps", "clear-face-cache", "clear-font-cache", + "clear-image-cache", "clear-string", "clear-this-command-keys", + "close-font", "clrhash", "coding-system-aliases", + "coding-system-base", "coding-system-eol-type", "coding-system-p", + "coding-system-plist", "coding-system-priority-list", + "coding-system-put", "color-distance", "color-gray-p", + "color-supported-p", "combine-after-change-execute", + "command-error-default-function", "command-remapping", "commandp", + "compare-buffer-substrings", "compare-strings", + "compare-window-configurations", "completing-read", + "compose-region-internal", "compose-string-internal", + "composition-get-gstring", "compute-motion", "concat", "cons", + "consp", "constrain-to-field", "continue-process", + "controlling-tty-p", "coordinates-in-window-p", "copy-alist", + "copy-category-table", "copy-file", "copy-hash-table", "copy-keymap", + "copy-marker", "copy-sequence", "copy-syntax-table", "copysign", + "cos", "current-active-maps", "current-bidi-paragraph-direction", + "current-buffer", "current-case-table", "current-column", + "current-global-map", "current-idle-time", "current-indentation", + "current-input-mode", "current-local-map", "current-message", + "current-minor-mode-maps", "current-time", "current-time-string", + "current-time-zone", "current-window-configuration", + "cygwin-convert-file-name-from-windows", + "cygwin-convert-file-name-to-windows", "daemon-initialized", + "daemonp", "dbus--init-bus", "dbus-get-unique-name", + "dbus-message-internal", "debug-timer-check", "declare-equiv-charset", + "decode-big5-char", "decode-char", "decode-coding-region", + "decode-coding-string", "decode-sjis-char", "decode-time", + "default-boundp", "default-file-modes", "default-printer-name", + "default-toplevel-value", "default-value", "define-category", + "define-charset-alias", "define-charset-internal", + "define-coding-system-alias", "define-coding-system-internal", + "define-fringe-bitmap", "define-hash-table-test", "define-key", + "define-prefix-command", "delete", + "delete-all-overlays", "delete-and-extract-region", "delete-char", + "delete-directory-internal", "delete-field", "delete-file", + "delete-frame", "delete-other-windows-internal", "delete-overlay", + "delete-process", "delete-region", "delete-terminal", + "delete-window-internal", "delq", "describe-buffer-bindings", + "describe-vector", "destroy-fringe-bitmap", "detect-coding-region", + "detect-coding-string", "ding", "directory-file-name", + "directory-files", "directory-files-and-attributes", "discard-input", + "display-supports-face-attributes-p", "do-auto-save", "documentation", + "documentation-property", "downcase", "downcase-region", + "downcase-word", "draw-string", "dump-colors", "dump-emacs", + "dump-face", "dump-frame-glyph-matrix", "dump-glyph-matrix", + "dump-glyph-row", "dump-redisplay-history", "dump-tool-bar-row", + "elt", "emacs-pid", "encode-big5-char", "encode-char", + "encode-coding-region", "encode-coding-string", "encode-sjis-char", + "encode-time", "end-kbd-macro", "end-of-line", "eobp", "eolp", "eq", + "eql", "equal", "equal-including-properties", "erase-buffer", + "error-message-string", "eval", "eval-buffer", "eval-region", + "event-convert-list", "execute-kbd-macro", "exit-recursive-edit", + "exp", "expand-file-name", "expt", "external-debugging-output", + "face-attribute-relative-p", "face-attributes-as-vector", "face-font", + "fboundp", "fceiling", "fetch-bytecode", "ffloor", + "field-beginning", "field-end", "field-string", + "field-string-no-properties", "file-accessible-directory-p", + "file-acl", "file-attributes", "file-attributes-lessp", + "file-directory-p", "file-executable-p", "file-exists-p", + "file-locked-p", "file-modes", "file-name-absolute-p", + "file-name-all-completions", "file-name-as-directory", + "file-name-completion", "file-name-directory", + "file-name-nondirectory", "file-newer-than-file-p", "file-readable-p", + "file-regular-p", "file-selinux-context", "file-symlink-p", + "file-system-info", "file-system-info", "file-writable-p", + "fillarray", "find-charset-region", "find-charset-string", + "find-coding-systems-region-internal", "find-composition-internal", + "find-file-name-handler", "find-font", "find-operation-coding-system", + "float", "float-time", "floatp", "floor", "fmakunbound", + "following-char", "font-at", "font-drive-otf", "font-face-attributes", + "font-family-list", "font-get", "font-get-glyphs", + "font-get-system-font", "font-get-system-normal-font", "font-info", + "font-match-p", "font-otf-alternates", "font-put", + "font-shape-gstring", "font-spec", "font-variation-glyphs", + "font-xlfd-name", "fontp", "fontset-font", "fontset-info", + "fontset-list", "fontset-list-all", "force-mode-line-update", + "force-window-update", "format", "format-mode-line", + "format-network-address", "format-time-string", "forward-char", + "forward-comment", "forward-line", "forward-word", + "frame-border-width", "frame-bottom-divider-width", + "frame-can-run-window-configuration-change-hook", "frame-char-height", + "frame-char-width", "frame-face-alist", "frame-first-window", + "frame-focus", "frame-font-cache", "frame-fringe-width", "frame-list", + "frame-live-p", "frame-or-buffer-changed-p", "frame-parameter", + "frame-parameters", "frame-pixel-height", "frame-pixel-width", + "frame-pointer-visible-p", "frame-right-divider-width", + "frame-root-window", "frame-scroll-bar-height", + "frame-scroll-bar-width", "frame-selected-window", "frame-terminal", + "frame-text-cols", "frame-text-height", "frame-text-lines", + "frame-text-width", "frame-total-cols", "frame-total-lines", + "frame-visible-p", "framep", "frexp", "fringe-bitmaps-at-pos", + "fround", "fset", "ftruncate", "funcall", "funcall-interactively", + "function-equal", "functionp", "gap-position", "gap-size", + "garbage-collect", "gc-status", "generate-new-buffer-name", "get", + "get-buffer", "get-buffer-create", "get-buffer-process", + "get-buffer-window", "get-byte", "get-char-property", + "get-char-property-and-overlay", "get-file-buffer", "get-file-char", + "get-internal-run-time", "get-load-suffixes", "get-pos-property", + "get-process", "get-screen-color", "get-text-property", + "get-unicode-property-internal", "get-unused-category", + "get-unused-iso-final-char", "getenv-internal", "gethash", + "gfile-add-watch", "gfile-rm-watch", "global-key-binding", + "gnutls-available-p", "gnutls-boot", "gnutls-bye", "gnutls-deinit", + "gnutls-error-fatalp", "gnutls-error-string", "gnutls-errorp", + "gnutls-get-initstage", "gnutls-peer-status", + "gnutls-peer-status-warning-describe", "goto-char", "gpm-mouse-start", + "gpm-mouse-stop", "group-gid", "group-real-gid", + "handle-save-session", "handle-switch-frame", "hash-table-count", + "hash-table-p", "hash-table-rehash-size", + "hash-table-rehash-threshold", "hash-table-size", "hash-table-test", + "hash-table-weakness", "iconify-frame", "identity", "image-flush", + "image-mask-p", "image-metadata", "image-size", "imagemagick-types", + "imagep", "indent-to", "indirect-function", "indirect-variable", + "init-image-library", "inotify-add-watch", "inotify-rm-watch", + "input-pending-p", "insert", "insert-and-inherit", + "insert-before-markers", "insert-before-markers-and-inherit", + "insert-buffer-substring", "insert-byte", "insert-char", + "insert-file-contents", "insert-startup-screen", "int86", + "integer-or-marker-p", "integerp", "interactive-form", "intern", + "intern-soft", "internal--track-mouse", "internal-char-font", + "internal-complete-buffer", "internal-copy-lisp-face", + "internal-default-process-filter", + "internal-default-process-sentinel", "internal-describe-syntax-value", + "internal-event-symbol-parse-modifiers", + "internal-face-x-get-resource", "internal-get-lisp-face-attribute", + "internal-lisp-face-attribute-values", "internal-lisp-face-empty-p", + "internal-lisp-face-equal-p", "internal-lisp-face-p", + "internal-make-lisp-face", "internal-make-var-non-special", + "internal-merge-in-global-face", + "internal-set-alternative-font-family-alist", + "internal-set-alternative-font-registry-alist", + "internal-set-font-selection-order", + "internal-set-lisp-face-attribute", + "internal-set-lisp-face-attribute-from-resource", + "internal-show-cursor", "internal-show-cursor-p", "interrupt-process", + "invisible-p", "invocation-directory", "invocation-name", "isnan", + "iso-charset", "key-binding", "key-description", + "keyboard-coding-system", "keymap-parent", "keymap-prompt", "keymapp", + "keywordp", "kill-all-local-variables", "kill-buffer", "kill-emacs", + "kill-local-variable", "kill-process", "last-nonminibuffer-frame", + "lax-plist-get", "lax-plist-put", "ldexp", "length", + "libxml-parse-html-region", "libxml-parse-xml-region", + "line-beginning-position", "line-end-position", "line-pixel-height", + "list", "list-fonts", "list-system-processes", "listp", "load", + "load-average", "local-key-binding", "local-variable-if-set-p", + "local-variable-p", "locale-info", "locate-file-internal", + "lock-buffer", "log", "logand", "logb", "logior", "lognot", "logxor", + "looking-at", "lookup-image", "lookup-image-map", "lookup-key", + "lower-frame", "lsh", "macroexpand", "make-bool-vector", + "make-byte-code", "make-category-set", "make-category-table", + "make-char", "make-char-table", "make-directory-internal", + "make-frame-invisible", "make-frame-visible", "make-hash-table", + "make-indirect-buffer", "make-keymap", "make-list", + "make-local-variable", "make-marker", "make-network-process", + "make-overlay", "make-serial-process", "make-sparse-keymap", + "make-string", "make-symbol", "make-symbolic-link", "make-temp-name", + "make-terminal-frame", "make-variable-buffer-local", + "make-variable-frame-local", "make-vector", "makunbound", + "map-char-table", "map-charset-chars", "map-keymap", + "map-keymap-internal", "mapatoms", "mapc", "mapcar", "mapconcat", + "maphash", "mark-marker", "marker-buffer", "marker-insertion-type", + "marker-position", "markerp", "match-beginning", "match-data", + "match-end", "matching-paren", "max", "max-char", "md5", "member", + "memory-info", "memory-limit", "memory-use-counts", "memq", "memql", + "menu-bar-menu-at-x-y", "menu-or-popup-active-p", + "menu-or-popup-active-p", "merge-face-attribute", "message", + "message-box", "message-or-box", "min", + "minibuffer-completion-contents", "minibuffer-contents", + "minibuffer-contents-no-properties", "minibuffer-depth", + "minibuffer-prompt", "minibuffer-prompt-end", + "minibuffer-selected-window", "minibuffer-window", "minibufferp", + "minor-mode-key-binding", "mod", "modify-category-entry", + "modify-frame-parameters", "modify-syntax-entry", + "mouse-pixel-position", "mouse-position", "move-overlay", + "move-point-visually", "move-to-column", "move-to-window-line", + "msdos-downcase-filename", "msdos-long-file-names", "msdos-memget", + "msdos-memput", "msdos-mouse-disable", "msdos-mouse-enable", + "msdos-mouse-init", "msdos-mouse-p", "msdos-remember-default-colors", + "msdos-set-keyboard", "msdos-set-mouse-buttons", + "multibyte-char-to-unibyte", "multibyte-string-p", "narrow-to-region", + "natnump", "nconc", "network-interface-info", + "network-interface-list", "new-fontset", "newline-cache-check", + "next-char-property-change", "next-frame", "next-overlay-change", + "next-property-change", "next-read-file-uses-dialog-p", + "next-single-char-property-change", "next-single-property-change", + "next-window", "nlistp", "nreverse", "nth", "nthcdr", "null", + "number-or-marker-p", "number-to-string", "numberp", + "open-dribble-file", "open-font", "open-termscript", + "optimize-char-table", "other-buffer", "other-window-for-scrolling", + "overlay-buffer", "overlay-end", "overlay-get", "overlay-lists", + "overlay-properties", "overlay-put", "overlay-recenter", + "overlay-start", "overlayp", "overlays-at", "overlays-in", + "parse-partial-sexp", "play-sound-internal", "plist-get", + "plist-member", "plist-put", "point", "point-marker", "point-max", + "point-max-marker", "point-min", "point-min-marker", + "pos-visible-in-window-p", "position-bytes", "posix-looking-at", + "posix-search-backward", "posix-search-forward", "posix-string-match", + "posn-at-point", "posn-at-x-y", "preceding-char", + "prefix-numeric-value", "previous-char-property-change", + "previous-frame", "previous-overlay-change", + "previous-property-change", "previous-single-char-property-change", + "previous-single-property-change", "previous-window", "prin1", + "prin1-to-string", "princ", "print", "process-attributes", + "process-buffer", "process-coding-system", "process-command", + "process-connection", "process-contact", "process-datagram-address", + "process-exit-status", "process-filter", "process-filter-multibyte-p", + "process-id", "process-inherit-coding-system-flag", "process-list", + "process-mark", "process-name", "process-plist", + "process-query-on-exit-flag", "process-running-child-p", + "process-send-eof", "process-send-region", "process-send-string", + "process-sentinel", "process-status", "process-tty-name", + "process-type", "processp", "profiler-cpu-log", + "profiler-cpu-running-p", "profiler-cpu-start", "profiler-cpu-stop", + "profiler-memory-log", "profiler-memory-running-p", + "profiler-memory-start", "profiler-memory-stop", "propertize", + "purecopy", "put", "put-text-property", + "put-unicode-property-internal", "puthash", "query-font", + "query-fontset", "quit-process", "raise-frame", "random", "rassoc", + "rassq", "re-search-backward", "re-search-forward", "read", + "read-buffer", "read-char", "read-char-exclusive", + "read-coding-system", "read-command", "read-event", + "read-from-minibuffer", "read-from-string", "read-function", + "read-key-sequence", "read-key-sequence-vector", + "read-no-blanks-input", "read-non-nil-coding-system", "read-string", + "read-variable", "recent-auto-save-p", "recent-doskeys", + "recent-keys", "recenter", "recursion-depth", "recursive-edit", + "redirect-debugging-output", "redirect-frame-focus", "redisplay", + "redraw-display", "redraw-frame", "regexp-quote", "region-beginning", + "region-end", "register-ccl-program", "register-code-conversion-map", + "remhash", "remove-list-of-text-properties", "remove-text-properties", + "rename-buffer", "rename-file", "replace-match", + "reset-this-command-lengths", "resize-mini-window-internal", + "restore-buffer-modified-p", "resume-tty", "reverse", "round", + "run-hook-with-args", "run-hook-with-args-until-failure", + "run-hook-with-args-until-success", "run-hook-wrapped", "run-hooks", + "run-window-configuration-change-hook", "run-window-scroll-functions", + "safe-length", "scan-lists", "scan-sexps", "scroll-down", + "scroll-left", "scroll-other-window", "scroll-right", "scroll-up", + "search-backward", "search-forward", "secure-hash", "select-frame", + "select-window", "selected-frame", "selected-window", + "self-insert-command", "send-string-to-terminal", "sequencep", + "serial-process-configure", "set", "set-buffer", + "set-buffer-auto-saved", "set-buffer-major-mode", + "set-buffer-modified-p", "set-buffer-multibyte", "set-case-table", + "set-category-table", "set-char-table-extra-slot", + "set-char-table-parent", "set-char-table-range", "set-charset-plist", + "set-charset-priority", "set-coding-system-priority", + "set-cursor-size", "set-default", "set-default-file-modes", + "set-default-toplevel-value", "set-file-acl", "set-file-modes", + "set-file-selinux-context", "set-file-times", "set-fontset-font", + "set-frame-height", "set-frame-position", "set-frame-selected-window", + "set-frame-size", "set-frame-width", "set-fringe-bitmap-face", + "set-input-interrupt-mode", "set-input-meta-mode", "set-input-mode", + "set-keyboard-coding-system-internal", "set-keymap-parent", + "set-marker", "set-marker-insertion-type", "set-match-data", + "set-message-beep", "set-minibuffer-window", + "set-mouse-pixel-position", "set-mouse-position", + "set-network-process-option", "set-output-flow-control", + "set-process-buffer", "set-process-coding-system", + "set-process-datagram-address", "set-process-filter", + "set-process-filter-multibyte", + "set-process-inherit-coding-system-flag", "set-process-plist", + "set-process-query-on-exit-flag", "set-process-sentinel", + "set-process-window-size", "set-quit-char", + "set-safe-terminal-coding-system-internal", "set-screen-color", + "set-standard-case-table", "set-syntax-table", + "set-terminal-coding-system-internal", "set-terminal-local-value", + "set-terminal-parameter", "set-text-properties", "set-time-zone-rule", + "set-visited-file-modtime", "set-window-buffer", + "set-window-combination-limit", "set-window-configuration", + "set-window-dedicated-p", "set-window-display-table", + "set-window-fringes", "set-window-hscroll", "set-window-margins", + "set-window-new-normal", "set-window-new-pixel", + "set-window-new-total", "set-window-next-buffers", + "set-window-parameter", "set-window-point", "set-window-prev-buffers", + "set-window-redisplay-end-trigger", "set-window-scroll-bars", + "set-window-start", "set-window-vscroll", "setcar", "setcdr", + "setplist", "show-face-resources", "signal", "signal-process", "sin", + "single-key-description", "skip-chars-backward", "skip-chars-forward", + "skip-syntax-backward", "skip-syntax-forward", "sleep-for", "sort", + "sort-charsets", "special-variable-p", "split-char", + "split-window-internal", "sqrt", "standard-case-table", + "standard-category-table", "standard-syntax-table", "start-kbd-macro", + "start-process", "stop-process", "store-kbd-macro-event", "string", + "string-as-multibyte", "string-as-unibyte", "string-bytes", + "string-collate-equalp", "string-collate-lessp", "string-equal", + "string-lessp", "string-make-multibyte", "string-make-unibyte", + "string-match", "string-to-char", "string-to-multibyte", + "string-to-number", "string-to-syntax", "string-to-unibyte", + "string-width", "stringp", "subr-name", "subrp", + "subst-char-in-region", "substitute-command-keys", + "substitute-in-file-name", "substring", "substring-no-properties", + "suspend-emacs", "suspend-tty", "suspicious-object", "sxhash", + "symbol-function", "symbol-name", "symbol-plist", "symbol-value", + "symbolp", "syntax-table", "syntax-table-p", "system-groups", + "system-move-file-to-trash", "system-name", "system-users", "tan", + "terminal-coding-system", "terminal-list", "terminal-live-p", + "terminal-local-value", "terminal-name", "terminal-parameter", + "terminal-parameters", "terpri", "test-completion", + "text-char-description", "text-properties-at", "text-property-any", + "text-property-not-all", "this-command-keys", + "this-command-keys-vector", "this-single-command-keys", + "this-single-command-raw-keys", "time-add", "time-less-p", + "time-subtract", "tool-bar-get-system-style", "tool-bar-height", + "tool-bar-pixel-width", "top-level", "trace-redisplay", + "trace-to-stderr", "translate-region-internal", "transpose-regions", + "truncate", "try-completion", "tty-display-color-cells", + "tty-display-color-p", "tty-no-underline", + "tty-suppress-bold-inverse-default-colors", "tty-top-frame", + "tty-type", "type-of", "undo-boundary", "unencodable-char-position", + "unhandled-file-name-directory", "unibyte-char-to-multibyte", + "unibyte-string", "unicode-property-table-internal", "unify-charset", + "unintern", "unix-sync", "unlock-buffer", "upcase", "upcase-initials", + "upcase-initials-region", "upcase-region", "upcase-word", + "use-global-map", "use-local-map", "user-full-name", + "user-login-name", "user-real-login-name", "user-real-uid", + "user-uid", "variable-binding-locus", "vconcat", "vector", + "vector-or-char-table-p", "vectorp", "verify-visited-file-modtime", + "vertical-motion", "visible-frame-list", "visited-file-modtime", + "w16-get-clipboard-data", "w16-selection-exists-p", + "w16-set-clipboard-data", "w32-battery-status", + "w32-default-color-map", "w32-define-rgb-color", + "w32-display-monitor-attributes-list", "w32-frame-menu-bar-size", + "w32-frame-rect", "w32-get-clipboard-data", + "w32-get-codepage-charset", "w32-get-console-codepage", + "w32-get-console-output-codepage", "w32-get-current-locale-id", + "w32-get-default-locale-id", "w32-get-keyboard-layout", + "w32-get-locale-info", "w32-get-valid-codepages", + "w32-get-valid-keyboard-layouts", "w32-get-valid-locale-ids", + "w32-has-winsock", "w32-long-file-name", "w32-reconstruct-hot-key", + "w32-register-hot-key", "w32-registered-hot-keys", + "w32-selection-exists-p", "w32-send-sys-command", + "w32-set-clipboard-data", "w32-set-console-codepage", + "w32-set-console-output-codepage", "w32-set-current-locale", + "w32-set-keyboard-layout", "w32-set-process-priority", + "w32-shell-execute", "w32-short-file-name", "w32-toggle-lock-key", + "w32-unload-winsock", "w32-unregister-hot-key", "w32-window-exists-p", + "w32notify-add-watch", "w32notify-rm-watch", + "waiting-for-user-input-p", "where-is-internal", "widen", + "widget-apply", "widget-get", "widget-put", + "window-absolute-pixel-edges", "window-at", "window-body-height", + "window-body-width", "window-bottom-divider-width", "window-buffer", + "window-combination-limit", "window-configuration-frame", + "window-configuration-p", "window-dedicated-p", + "window-display-table", "window-edges", "window-end", "window-frame", + "window-fringes", "window-header-line-height", "window-hscroll", + "window-inside-absolute-pixel-edges", "window-inside-edges", + "window-inside-pixel-edges", "window-left-child", + "window-left-column", "window-line-height", "window-list", + "window-list-1", "window-live-p", "window-margins", + "window-minibuffer-p", "window-mode-line-height", "window-new-normal", + "window-new-pixel", "window-new-total", "window-next-buffers", + "window-next-sibling", "window-normal-size", "window-old-point", + "window-parameter", "window-parameters", "window-parent", + "window-pixel-edges", "window-pixel-height", "window-pixel-left", + "window-pixel-top", "window-pixel-width", "window-point", + "window-prev-buffers", "window-prev-sibling", + "window-redisplay-end-trigger", "window-resize-apply", + "window-resize-apply-total", "window-right-divider-width", + "window-scroll-bar-height", "window-scroll-bar-width", + "window-scroll-bars", "window-start", "window-system", + "window-text-height", "window-text-pixel-size", "window-text-width", + "window-top-child", "window-top-line", "window-total-height", + "window-total-width", "window-use-time", "window-valid-p", + "window-vscroll", "windowp", "write-char", "write-region", + "x-backspace-delete-keys-p", "x-change-window-property", + "x-change-window-property", "x-close-connection", + "x-close-connection", "x-create-frame", "x-create-frame", + "x-delete-window-property", "x-delete-window-property", + "x-disown-selection-internal", "x-display-backing-store", + "x-display-backing-store", "x-display-color-cells", + "x-display-color-cells", "x-display-grayscale-p", + "x-display-grayscale-p", "x-display-list", "x-display-list", + "x-display-mm-height", "x-display-mm-height", "x-display-mm-width", + "x-display-mm-width", "x-display-monitor-attributes-list", + "x-display-pixel-height", "x-display-pixel-height", + "x-display-pixel-width", "x-display-pixel-width", "x-display-planes", + "x-display-planes", "x-display-save-under", "x-display-save-under", + "x-display-screens", "x-display-screens", "x-display-visual-class", + "x-display-visual-class", "x-family-fonts", "x-file-dialog", + "x-file-dialog", "x-file-dialog", "x-focus-frame", "x-frame-geometry", + "x-frame-geometry", "x-get-atom-name", "x-get-resource", + "x-get-selection-internal", "x-hide-tip", "x-hide-tip", + "x-list-fonts", "x-load-color-file", "x-menu-bar-open-internal", + "x-menu-bar-open-internal", "x-open-connection", "x-open-connection", + "x-own-selection-internal", "x-parse-geometry", "x-popup-dialog", + "x-popup-menu", "x-register-dnd-atom", "x-select-font", + "x-select-font", "x-selection-exists-p", "x-selection-owner-p", + "x-send-client-message", "x-server-max-request-size", + "x-server-max-request-size", "x-server-vendor", "x-server-vendor", + "x-server-version", "x-server-version", "x-show-tip", "x-show-tip", + "x-synchronize", "x-synchronize", "x-uses-old-gtk-dialog", + "x-window-property", "x-window-property", "x-wm-set-size-hint", + "xw-color-defined-p", "xw-color-defined-p", "xw-color-values", + "xw-color-values", "xw-display-color-p", "xw-display-color-p", + "yes-or-no-p", "zlib-available-p", "zlib-decompress-region", + "forward-point", + } + + emacsBuiltinFunctionHighlighted = []string{ + "defvaralias", "provide", "require", + "with-no-warnings", "define-widget", "with-electric-help", + "throw", "defalias", "featurep", + } + + emacsLambdaListKeywords = []string{ + "&allow-other-keys", "&aux", "&body", "&environment", "&key", "&optional", + "&rest", "&whole", + } + + emacsErrorKeywords = []string{ + "cl-assert", "cl-check-type", "error", "signal", + "user-error", "warn", + } +) + +// EmacsLisp lexer. +var EmacsLisp = Register(TypeRemappingLexer(MustNewLexer( + &Config{ + Name: "EmacsLisp", + Aliases: []string{"emacs", "elisp", "emacs-lisp"}, + Filenames: []string{"*.el"}, + MimeTypes: []string{"text/x-elisp", "application/x-elisp"}, + }, + Rules{ + "root": { + Default(Push("body")), + }, + "body": { + {`\s+`, Text, nil}, + {`;.*$`, CommentSingle, nil}, + {`"`, LiteralString, Push("string")}, + {`\?([^\\]|\\.)`, LiteralStringChar, nil}, + {`:((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)`, NameBuiltin, nil}, + {`::((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)`, LiteralStringSymbol, nil}, + {`'((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)`, LiteralStringSymbol, nil}, + {`'`, Operator, nil}, + {"`", Operator, nil}, + {"[-+]?\\d+\\.?(?=[ \"()\\]\\'\\n,;`])", LiteralNumberInteger, nil}, + {"[-+]?\\d+/\\d+(?=[ \"()\\]\\'\\n,;`])", LiteralNumber, nil}, + {"[-+]?(\\d*\\.\\d+([defls][-+]?\\d+)?|\\d+(\\.\\d*)?[defls][-+]?\\d+)(?=[ \"()\\]\\'\\n,;`])", LiteralNumberFloat, nil}, + {`\[|\]`, Punctuation, nil}, + {`#:((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)`, LiteralStringSymbol, nil}, + {`#\^\^?`, Operator, nil}, + {`#\'`, NameFunction, nil}, + {`#[bB][+-]?[01]+(/[01]+)?`, LiteralNumberBin, nil}, + {`#[oO][+-]?[0-7]+(/[0-7]+)?`, LiteralNumberOct, nil}, + {`#[xX][+-]?[0-9a-fA-F]+(/[0-9a-fA-F]+)?`, LiteralNumberHex, nil}, + {`#\d+r[+-]?[0-9a-zA-Z]+(/[0-9a-zA-Z]+)?`, LiteralNumber, nil}, + {`#\d+=`, Operator, nil}, + {`#\d+#`, Operator, nil}, + {`(,@|,|\.|:)`, Operator, nil}, + {"(t|nil)(?=[ \"()\\]\\'\\n,;`])", NameConstant, nil}, + {`\*((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)\*`, NameVariableGlobal, nil}, + {`((?:\\.|[\w!$%&*+-/<=>?@^{}~|])(?:\\.|[\w!$%&*+-/<=>?@^{}~|]|[#.:])*)`, NameVariable, nil}, + {`#\(`, Operator, Push("body")}, + {`\(`, Punctuation, Push("body")}, + {`\)`, Punctuation, Pop(1)}, + }, + "string": { + {"[^\"\\\\`]+", LiteralString, nil}, + {"`((?:\\\\.|[\\w!$%&*+-/<=>?@^{}~|])(?:\\\\.|[\\w!$%&*+-/<=>?@^{}~|]|[#.:])*)\\'", LiteralStringSymbol, nil}, + {"`", LiteralString, nil}, + {`\\.`, LiteralString, nil}, + {`\\\n`, LiteralString, nil}, + {`"`, LiteralString, Pop(1)}, + }, + }, +), TypeMapping{ + {NameVariable, NameFunction, emacsBuiltinFunction}, + {NameVariable, NameBuiltin, emacsSpecialForms}, + {NameVariable, NameException, emacsErrorKeywords}, + {NameVariable, NameBuiltin, append(emacsBuiltinFunctionHighlighted, emacsMacros...)}, + {NameVariable, KeywordPseudo, emacsLambdaListKeywords}, +})) diff --git a/vendor/github.com/alecthomas/chroma/lexers/erlang.go b/vendor/github.com/alecthomas/chroma/lexers/erlang.go new file mode 100644 index 0000000..1b1ba4e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/erlang.go @@ -0,0 +1,65 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Erlang lexer. +var Erlang = Register(MustNewLexer( + &Config{ + Name: "Erlang", + Aliases: []string{"erlang"}, + Filenames: []string{"*.erl", "*.hrl", "*.es", "*.escript"}, + MimeTypes: []string{"text/x-erlang"}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`%.*\n`, Comment, nil}, + {Words(``, `\b`, `after`, `begin`, `case`, `catch`, `cond`, `end`, `fun`, `if`, `let`, `of`, `query`, `receive`, `try`, `when`), Keyword, nil}, + {Words(``, `\b`, `abs`, `append_element`, `apply`, `atom_to_list`, `binary_to_list`, `bitstring_to_list`, `binary_to_term`, `bit_size`, `bump_reductions`, `byte_size`, `cancel_timer`, `check_process_code`, `delete_module`, `demonitor`, `disconnect_node`, `display`, `element`, `erase`, `exit`, `float`, `float_to_list`, `fun_info`, `fun_to_list`, `function_exported`, `garbage_collect`, `get`, `get_keys`, `group_leader`, `hash`, `hd`, `integer_to_list`, `iolist_to_binary`, `iolist_size`, `is_atom`, `is_binary`, `is_bitstring`, `is_boolean`, `is_builtin`, `is_float`, `is_function`, `is_integer`, `is_list`, `is_number`, `is_pid`, `is_port`, `is_process_alive`, `is_record`, `is_reference`, `is_tuple`, `length`, `link`, `list_to_atom`, `list_to_binary`, `list_to_bitstring`, `list_to_existing_atom`, `list_to_float`, `list_to_integer`, `list_to_pid`, `list_to_tuple`, `load_module`, `localtime_to_universaltime`, `make_tuple`, `md5`, `md5_final`, `md5_update`, `memory`, `module_loaded`, `monitor`, `monitor_node`, `node`, `nodes`, `open_port`, `phash`, `phash2`, `pid_to_list`, `port_close`, `port_command`, `port_connect`, `port_control`, `port_call`, `port_info`, `port_to_list`, `process_display`, `process_flag`, `process_info`, `purge_module`, `put`, `read_timer`, `ref_to_list`, `register`, `resume_process`, `round`, `send`, `send_after`, `send_nosuspend`, `set_cookie`, `setelement`, `size`, `spawn`, `spawn_link`, `spawn_monitor`, `spawn_opt`, `split_binary`, `start_timer`, `statistics`, `suspend_process`, `system_flag`, `system_info`, `system_monitor`, `system_profile`, `term_to_binary`, `tl`, `trace`, `trace_delivered`, `trace_info`, `trace_pattern`, `trunc`, `tuple_size`, `tuple_to_list`, `universaltime_to_localtime`, `unlink`, `unregister`, `whereis`), NameBuiltin, nil}, + {Words(``, `\b`, `and`, `andalso`, `band`, `bnot`, `bor`, `bsl`, `bsr`, `bxor`, `div`, `not`, `or`, `orelse`, `rem`, `xor`), OperatorWord, nil}, + {`^-`, Punctuation, Push("directive")}, + {`(\+\+?|--?|\*|/|<|>|/=|=:=|=/=|=<|>=|==?|<-|!|\?)`, Operator, nil}, + {`"`, LiteralString, Push("string")}, + {`<<`, NameLabel, nil}, + {`>>`, NameLabel, nil}, + {`((?:[a-z]\w*|'[^\n']*[^\\]'))(:)`, ByGroups(NameNamespace, Punctuation), nil}, + {`(?:^|(?<=:))((?:[a-z]\w*|'[^\n']*[^\\]'))(\s*)(\()`, ByGroups(NameFunction, Text, Punctuation), nil}, + {`[+-]?(?:[2-9]|[12][0-9]|3[0-6])#[0-9a-zA-Z]+`, LiteralNumberInteger, nil}, + {`[+-]?\d+`, LiteralNumberInteger, nil}, + {`[+-]?\d+.\d+`, LiteralNumberFloat, nil}, + {`[]\[:_@\".{}()|;,]`, Punctuation, nil}, + {`(?:[A-Z_]\w*)`, NameVariable, nil}, + {`(?:[a-z]\w*|'[^\n']*[^\\]')`, Name, nil}, + {`\?(?:(?:[A-Z_]\w*)|(?:[a-z]\w*|'[^\n']*[^\\]'))`, NameConstant, nil}, + {`\$(?:(?:\\(?:[bdefnrstv\'"\\]|[0-7][0-7]?[0-7]?|(?:x[0-9a-fA-F]{2}|x\{[0-9a-fA-F]+\})|\^[a-zA-Z]))|\\[ %]|[^\\])`, LiteralStringChar, nil}, + {`#(?:[a-z]\w*|'[^\n']*[^\\]')(:?\.(?:[a-z]\w*|'[^\n']*[^\\]'))?`, NameLabel, nil}, + {`\A#!.+\n`, CommentHashbang, nil}, + {`#\{`, Punctuation, Push("map_key")}, + }, + "string": { + {`(?:\\(?:[bdefnrstv\'"\\]|[0-7][0-7]?[0-7]?|(?:x[0-9a-fA-F]{2}|x\{[0-9a-fA-F]+\})|\^[a-zA-Z]))`, LiteralStringEscape, nil}, + {`"`, LiteralString, Pop(1)}, + {`~[0-9.*]*[~#+BPWXb-ginpswx]`, LiteralStringInterpol, nil}, + {`[^"\\~]+`, LiteralString, nil}, + {`~`, LiteralString, nil}, + }, + "directive": { + {`(define)(\s*)(\()((?:(?:[A-Z_]\w*)|(?:[a-z]\w*|'[^\n']*[^\\]')))`, ByGroups(NameEntity, Text, Punctuation, NameConstant), Pop(1)}, + {`(record)(\s*)(\()((?:(?:[A-Z_]\w*)|(?:[a-z]\w*|'[^\n']*[^\\]')))`, ByGroups(NameEntity, Text, Punctuation, NameLabel), Pop(1)}, + {`(?:[a-z]\w*|'[^\n']*[^\\]')`, NameEntity, Pop(1)}, + }, + "map_key": { + Include("root"), + {`=>`, Punctuation, Push("map_val")}, + {`:=`, Punctuation, Push("map_val")}, + {`\}`, Punctuation, Pop(1)}, + }, + "map_val": { + Include("root"), + {`,`, Punctuation, Pop(1)}, + {`(?=\})`, Punctuation, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/factor.go b/vendor/github.com/alecthomas/chroma/lexers/factor.go new file mode 100644 index 0000000..e1ad149 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/factor.go @@ -0,0 +1,114 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Factor lexer. +var Factor = Register(MustNewLexer( + &Config{ + Name: "Factor", + Aliases: []string{"factor"}, + Filenames: []string{"*.factor"}, + MimeTypes: []string{"text/x-factor"}, + }, + Rules{ + "root": { + {`#!.*$`, CommentPreproc, nil}, + Default(Push("base")), + }, + "base": { + {`\s+`, Text, nil}, + {`((?:MACRO|MEMO|TYPED)?:[:]?)(\s+)(\S+)`, ByGroups(Keyword, Text, NameFunction), nil}, + {`(M:[:]?)(\s+)(\S+)(\s+)(\S+)`, ByGroups(Keyword, Text, NameClass, Text, NameFunction), nil}, + {`(C:)(\s+)(\S+)(\s+)(\S+)`, ByGroups(Keyword, Text, NameFunction, Text, NameClass), nil}, + {`(GENERIC:)(\s+)(\S+)`, ByGroups(Keyword, Text, NameFunction), nil}, + {`(HOOK:|GENERIC#)(\s+)(\S+)(\s+)(\S+)`, ByGroups(Keyword, Text, NameFunction, Text, NameFunction), nil}, + {`\(\s`, NameFunction, Push("stackeffect")}, + {`;\s`, Keyword, nil}, + {`(USING:)(\s+)`, ByGroups(KeywordNamespace, Text), Push("vocabs")}, + {`(USE:|UNUSE:|IN:|QUALIFIED:)(\s+)(\S+)`, ByGroups(KeywordNamespace, Text, NameNamespace), nil}, + {`(QUALIFIED-WITH:)(\s+)(\S+)(\s+)(\S+)`, ByGroups(KeywordNamespace, Text, NameNamespace, Text, NameNamespace), nil}, + {`(FROM:|EXCLUDE:)(\s+)(\S+)(\s+=>\s)`, ByGroups(KeywordNamespace, Text, NameNamespace, Text), Push("words")}, + {`(RENAME:)(\s+)(\S+)(\s+)(\S+)(\s+=>\s+)(\S+)`, ByGroups(KeywordNamespace, Text, NameFunction, Text, NameNamespace, Text, NameFunction), nil}, + {`(ALIAS:|TYPEDEF:)(\s+)(\S+)(\s+)(\S+)`, ByGroups(KeywordNamespace, Text, NameFunction, Text, NameFunction), nil}, + {`(DEFER:|FORGET:|POSTPONE:)(\s+)(\S+)`, ByGroups(KeywordNamespace, Text, NameFunction), nil}, + {`(TUPLE:|ERROR:)(\s+)(\S+)(\s+<\s+)(\S+)`, ByGroups(Keyword, Text, NameClass, Text, NameClass), Push("slots")}, + {`(TUPLE:|ERROR:|BUILTIN:)(\s+)(\S+)`, ByGroups(Keyword, Text, NameClass), Push("slots")}, + {`(MIXIN:|UNION:|INTERSECTION:)(\s+)(\S+)`, ByGroups(Keyword, Text, NameClass), nil}, + {`(PREDICATE:)(\s+)(\S+)(\s+<\s+)(\S+)`, ByGroups(Keyword, Text, NameClass, Text, NameClass), nil}, + {`(C:)(\s+)(\S+)(\s+)(\S+)`, ByGroups(Keyword, Text, NameFunction, Text, NameClass), nil}, + {`(INSTANCE:)(\s+)(\S+)(\s+)(\S+)`, ByGroups(Keyword, Text, NameClass, Text, NameClass), nil}, + {`(SLOT:)(\s+)(\S+)`, ByGroups(Keyword, Text, NameFunction), nil}, + {`(SINGLETON:)(\s+)(\S+)`, ByGroups(Keyword, Text, NameClass), nil}, + {`SINGLETONS:`, Keyword, Push("classes")}, + {`(CONSTANT:|SYMBOL:|MAIN:|HELP:)(\s+)(\S+)`, ByGroups(Keyword, Text, NameFunction), nil}, + {`SYMBOLS:\s`, Keyword, Push("words")}, + {`SYNTAX:\s`, Keyword, nil}, + {`ALIEN:\s`, Keyword, nil}, + {`(STRUCT:)(\s+)(\S+)`, ByGroups(Keyword, Text, NameClass), nil}, + {`(FUNCTION:)(\s+\S+\s+)(\S+)(\s+\(\s+[^)]+\)\s)`, ByGroups(KeywordNamespace, Text, NameFunction, Text), nil}, + {`(FUNCTION-ALIAS:)(\s+)(\S+)(\s+\S+\s+)(\S+)(\s+\(\s+[^)]+\)\s)`, ByGroups(KeywordNamespace, Text, NameFunction, Text, NameFunction, Text), nil}, + {`(?:)\s`, KeywordNamespace, nil}, + {`"""\s+(?:.|\n)*?\s+"""`, LiteralString, nil}, + {`"(?:\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`\S+"\s+(?:\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`CHAR:\s+(?:\\[\\abfnrstv]|[^\\]\S*)\s`, LiteralStringChar, nil}, + {`!\s+.*$`, Comment, nil}, + {`#!\s+.*$`, Comment, nil}, + {`/\*\s+(?:.|\n)*?\s\*/\s`, Comment, nil}, + {`[tf]\s`, NameConstant, nil}, + {`[\\$]\s+\S+`, NameConstant, nil}, + {`M\\\s+\S+\s+\S+`, NameConstant, nil}, + {`[+-]?(?:[\d,]*\d)?\.(?:\d([\d,]*\d)?)?(?:[eE][+-]?\d+)?\s`, LiteralNumber, nil}, + {`[+-]?\d(?:[\d,]*\d)?(?:[eE][+-]?\d+)?\s`, LiteralNumber, nil}, + {`0x[a-fA-F\d](?:[a-fA-F\d,]*[a-fA-F\d])?(?:p\d([\d,]*\d)?)?\s`, LiteralNumber, nil}, + {`NAN:\s+[a-fA-F\d](?:[a-fA-F\d,]*[a-fA-F\d])?(?:p\d([\d,]*\d)?)?\s`, LiteralNumber, nil}, + {`0b[01]+\s`, LiteralNumberBin, nil}, + {`0o[0-7]+\s`, LiteralNumberOct, nil}, + {`(?:\d([\d,]*\d)?)?\+\d(?:[\d,]*\d)?/\d(?:[\d,]*\d)?\s`, LiteralNumber, nil}, + {`(?:\-\d([\d,]*\d)?)?\-\d(?:[\d,]*\d)?/\d(?:[\d,]*\d)?\s`, LiteralNumber, nil}, + {`(?:deprecated|final|foldable|flushable|inline|recursive)\s`, Keyword, nil}, + {Words(``, `\s`, `-rot`, `2bi`, `2bi@`, `2bi*`, `2curry`, `2dip`, `2drop`, `2dup`, `2keep`, `2nip`, `2over`, `2tri`, `2tri@`, `2tri*`, `3bi`, `3curry`, `3dip`, `3drop`, `3dup`, `3keep`, `3tri`, `4dip`, `4drop`, `4dup`, `4keep`, ``, `=`, `>boolean`, `clone`, `?`, `?execute`, `?if`, `and`, `assert`, `assert=`, `assert?`, `bi`, `bi-curry`, `bi-curry@`, `bi-curry*`, `bi@`, `bi*`, `boa`, `boolean`, `boolean?`, `both?`, `build`, `call`, `callstack`, `callstack>array`, `callstack?`, `clear`, `(clone)`, `compose`, `compose?`, `curry`, `curry?`, `datastack`, `die`, `dip`, `do`, `drop`, `dup`, `dupd`, `either?`, `eq?`, `equal?`, `execute`, `hashcode`, `hashcode*`, `identity-hashcode`, `identity-tuple`, `identity-tuple?`, `if`, `if*`, `keep`, `loop`, `most`, `new`, `nip`, `not`, `null`, `object`, `or`, `over`, `pick`, `prepose`, `retainstack`, `rot`, `same?`, `swap`, `swapd`, `throw`, `tri`, `tri-curry`, `tri-curry@`, `tri-curry*`, `tri@`, `tri*`, `tuple`, `tuple?`, `unless`, `unless*`, `until`, `when`, `when*`, `while`, `with`, `wrapper`, `wrapper?`, `xor`), NameBuiltin, nil}, + {Words(``, `\s`, `2cache`, ``, `>alist`, `?at`, `?of`, `assoc`, `assoc-all?`, `assoc-any?`, `assoc-clone-like`, `assoc-combine`, `assoc-diff`, `assoc-diff!`, `assoc-differ`, `assoc-each`, `assoc-empty?`, `assoc-filter`, `assoc-filter!`, `assoc-filter-as`, `assoc-find`, `assoc-hashcode`, `assoc-intersect`, `assoc-like`, `assoc-map`, `assoc-map-as`, `assoc-partition`, `assoc-refine`, `assoc-size`, `assoc-stack`, `assoc-subset?`, `assoc-union`, `assoc-union!`, `assoc=`, `assoc>map`, `assoc?`, `at`, `at+`, `at*`, `cache`, `change-at`, `clear-assoc`, `delete-at`, `delete-at*`, `enum`, `enum?`, `extract-keys`, `inc-at`, `key?`, `keys`, `map>assoc`, `maybe-set-at`, `new-assoc`, `of`, `push-at`, `rename-at`, `set-at`, `sift-keys`, `sift-values`, `substitute`, `unzip`, `value-at`, `value-at*`, `value?`, `values`, `zip`), NameBuiltin, nil}, + {Words(``, `\s`, `2cleave`, `2cleave>quot`, `3cleave`, `3cleave>quot`, `4cleave`, `4cleave>quot`, `alist>quot`, `call-effect`, `case`, `case-find`, `case>quot`, `cleave`, `cleave>quot`, `cond`, `cond>quot`, `deep-spread>quot`, `execute-effect`, `linear-case-quot`, `no-case`, `no-case?`, `no-cond`, `no-cond?`, `recursive-hashcode`, `shallow-spread>quot`, `spread`, `to-fixed-point`, `wrong-values`, `wrong-values?`), NameBuiltin, nil}, + {Words(``, `\s`, `-`, `/`, `/f`, `/i`, `/mod`, `2/`, `2^`, `<`, `<=`, ``, `>`, `>=`, `>bignum`, `>fixnum`, `>float`, `>integer`, `(all-integers?)`, `(each-integer)`, `(find-integer)`, `*`, `+`, `?1+`, `abs`, `align`, `all-integers?`, `bignum`, `bignum?`, `bit?`, `bitand`, `bitnot`, `bitor`, `bits>double`, `bits>float`, `bitxor`, `complex`, `complex?`, `denominator`, `double>bits`, `each-integer`, `even?`, `find-integer`, `find-last-integer`, `fixnum`, `fixnum?`, `float`, `float>bits`, `float?`, `fp-bitwise=`, `fp-infinity?`, `fp-nan-payload`, `fp-nan?`, `fp-qnan?`, `fp-sign`, `fp-snan?`, `fp-special?`, `if-zero`, `imaginary-part`, `integer`, `integer>fixnum`, `integer>fixnum-strict`, `integer?`, `log2`, `log2-expects-positive`, `log2-expects-positive?`, `mod`, `neg`, `neg?`, `next-float`, `next-power-of-2`, `number`, `number=`, `number?`, `numerator`, `odd?`, `out-of-fixnum-range`, `out-of-fixnum-range?`, `power-of-2?`, `prev-float`, `ratio`, `ratio?`, `rational`, `rational?`, `real`, `real-part`, `real?`, `recip`, `rem`, `sgn`, `shift`, `sq`, `times`, `u<`, `u<=`, `u>`, `u>=`, `unless-zero`, `unordered?`, `when-zero`, `zero?`), NameBuiltin, nil}, + {Words(``, `\s`, `1sequence`, `2all?`, `2each`, `2map`, `2map-as`, `2map-reduce`, `2reduce`, `2selector`, `2sequence`, `3append`, `3append-as`, `3each`, `3map`, `3map-as`, `3sequence`, `4sequence`, ``, ``, ``, `?first`, `?last`, `?nth`, `?second`, `?set-nth`, `accumulate`, `accumulate!`, `accumulate-as`, `all?`, `any?`, `append`, `append!`, `append-as`, `assert-sequence`, `assert-sequence=`, `assert-sequence?`, `binary-reduce`, `bounds-check`, `bounds-check?`, `bounds-error`, `bounds-error?`, `but-last`, `but-last-slice`, `cartesian-each`, `cartesian-map`, `cartesian-product`, `change-nth`, `check-slice`, `check-slice-error`, `clone-like`, `collapse-slice`, `collector`, `collector-for`, `concat`, `concat-as`, `copy`, `count`, `cut`, `cut-slice`, `cut*`, `delete-all`, `delete-slice`, `drop-prefix`, `each`, `each-from`, `each-index`, `empty?`, `exchange`, `filter`, `filter!`, `filter-as`, `find`, `find-from`, `find-index`, `find-index-from`, `find-last`, `find-last-from`, `first`, `first2`, `first3`, `first4`, `flip`, `follow`, `fourth`, `glue`, `halves`, `harvest`, `head`, `head-slice`, `head-slice*`, `head*`, `head?`, `if-empty`, `immutable`, `immutable-sequence`, `immutable-sequence?`, `immutable?`, `index`, `index-from`, `indices`, `infimum`, `infimum-by`, `insert-nth`, `interleave`, `iota`, `iota-tuple`, `iota-tuple?`, `join`, `join-as`, `last`, `last-index`, `last-index-from`, `length`, `lengthen`, `like`, `longer`, `longer?`, `longest`, `map`, `map!`, `map-as`, `map-find`, `map-find-last`, `map-index`, `map-integers`, `map-reduce`, `map-sum`, `max-length`, `member-eq?`, `member?`, `midpoint@`, `min-length`, `mismatch`, `move`, `new-like`, `new-resizable`, `new-sequence`, `non-negative-integer-expected`, `non-negative-integer-expected?`, `nth`, `nths`, `pad-head`, `pad-tail`, `padding`, `partition`, `pop`, `pop*`, `prefix`, `prepend`, `prepend-as`, `produce`, `produce-as`, `product`, `push`, `push-all`, `push-either`, `push-if`, `reduce`, `reduce-index`, `remove`, `remove!`, `remove-eq`, `remove-eq!`, `remove-nth`, `remove-nth!`, `repetition`, `repetition?`, `replace-slice`, `replicate`, `replicate-as`, `rest`, `rest-slice`, `reverse`, `reverse!`, `reversed`, `reversed?`, `second`, `selector`, `selector-for`, `sequence`, `sequence-hashcode`, `sequence=`, `sequence?`, `set-first`, `set-fourth`, `set-last`, `set-length`, `set-nth`, `set-second`, `set-third`, `short`, `shorten`, `shorter`, `shorter?`, `shortest`, `sift`, `slice`, `slice-error`, `slice-error?`, `slice?`, `snip`, `snip-slice`, `start`, `start*`, `subseq`, `subseq?`, `suffix`, `suffix!`, `sum`, `sum-lengths`, `supremum`, `supremum-by`, `surround`, `tail`, `tail-slice`, `tail-slice*`, `tail*`, `tail?`, `third`, `trim`, `trim-head`, `trim-head-slice`, `trim-slice`, `trim-tail`, `trim-tail-slice`, `unclip`, `unclip-last`, `unclip-last-slice`, `unclip-slice`, `unless-empty`, `virtual-exemplar`, `virtual-sequence`, `virtual-sequence?`, `virtual@`, `when-empty`), NameBuiltin, nil}, + {Words(``, `\s`, `+@`, `change`, `change-global`, `counter`, `dec`, `get`, `get-global`, `global`, `inc`, `init-namespaces`, `initialize`, `is-global`, `make-assoc`, `namespace`, `namestack`, `off`, `on`, `set`, `set-global`, `set-namestack`, `toggle`, `with-global`, `with-scope`, `with-variable`, `with-variables`), NameBuiltin, nil}, + {Words(``, `\s`, `1array`, `2array`, `3array`, `4array`, ``, `>array`, `array`, `array?`, `pair`, `pair?`, `resize-array`), NameBuiltin, nil}, + {Words(``, `\s`, `(each-stream-block-slice)`, `(each-stream-block)`, `(stream-contents-by-block)`, `(stream-contents-by-element)`, `(stream-contents-by-length-or-block)`, `(stream-contents-by-length)`, `+byte+`, `+character+`, `bad-seek-type`, `bad-seek-type?`, `bl`, `contents`, `each-block`, `each-block-size`, `each-block-slice`, `each-line`, `each-morsel`, `each-stream-block`, `each-stream-block-slice`, `each-stream-line`, `error-stream`, `flush`, `input-stream`, `input-stream?`, `invalid-read-buffer`, `invalid-read-buffer?`, `lines`, `nl`, `output-stream`, `output-stream?`, `print`, `read`, `read-into`, `read-partial`, `read-partial-into`, `read-until`, `read1`, `readln`, `seek-absolute`, `seek-absolute?`, `seek-end`, `seek-end?`, `seek-input`, `seek-output`, `seek-relative`, `seek-relative?`, `stream-bl`, `stream-contents`, `stream-contents*`, `stream-copy`, `stream-copy*`, `stream-element-type`, `stream-flush`, `stream-length`, `stream-lines`, `stream-nl`, `stream-print`, `stream-read`, `stream-read-into`, `stream-read-partial`, `stream-read-partial-into`, `stream-read-partial-unsafe`, `stream-read-unsafe`, `stream-read-until`, `stream-read1`, `stream-readln`, `stream-seek`, `stream-seekable?`, `stream-tell`, `stream-write`, `stream-write1`, `tell-input`, `tell-output`, `with-error-stream`, `with-error-stream*`, `with-error>output`, `with-input-output+error-streams`, `with-input-output+error-streams*`, `with-input-stream`, `with-input-stream*`, `with-output-stream`, `with-output-stream*`, `with-output>error`, `with-output+error-stream`, `with-output+error-stream*`, `with-streams`, `with-streams*`, `write`, `write1`), NameBuiltin, nil}, + {Words(``, `\s`, `1string`, ``, `>string`, `resize-string`, `string`, `string?`), NameBuiltin, nil}, + {Words(``, `\s`, `1vector`, ``, `>vector`, `?push`, `vector`, `vector?`), NameBuiltin, nil}, + {Words(``, `\s`, ``, ``, ``, `attempt-all`, `attempt-all-error`, `attempt-all-error?`, `callback-error-hook`, `callcc0`, `callcc1`, `cleanup`, `compute-restarts`, `condition`, `condition?`, `continuation`, `continuation?`, `continue`, `continue-restart`, `continue-with`, `current-continuation`, `error`, `error-continuation`, `error-in-thread`, `error-thread`, `ifcc`, `ignore-errors`, `in-callback?`, `original-error`, `recover`, `restart`, `restart?`, `restarts`, `rethrow`, `rethrow-restarts`, `return`, `return-continuation`, `thread-error-hook`, `throw-continue`, `throw-restarts`, `with-datastack`, `with-return`), NameBuiltin, nil}, + {`\S+`, Text, nil}, + }, + "stackeffect": { + {`\s+`, Text, nil}, + {`\(\s+`, NameFunction, Push("stackeffect")}, + {`\)\s`, NameFunction, Pop(1)}, + {`--\s`, NameFunction, nil}, + {`\S+`, NameVariable, nil}, + }, + "slots": { + {`\s+`, Text, nil}, + {`;\s`, Keyword, Pop(1)}, + {`(\{\s+)(\S+)(\s+[^}]+\s+\}\s)`, ByGroups(Text, NameVariable, Text), nil}, + {`\S+`, NameVariable, nil}, + }, + "vocabs": { + {`\s+`, Text, nil}, + {`;\s`, Keyword, Pop(1)}, + {`\S+`, NameNamespace, nil}, + }, + "classes": { + {`\s+`, Text, nil}, + {`;\s`, Keyword, Pop(1)}, + {`\S+`, NameClass, nil}, + }, + "words": { + {`\s+`, Text, nil}, + {`;\s`, Keyword, Pop(1)}, + {`\S+`, NameFunction, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/fish.go b/vendor/github.com/alecthomas/chroma/lexers/fish.go new file mode 100644 index 0000000..e6b74b4 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/fish.go @@ -0,0 +1,64 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Fish lexer. +var Fish = Register(MustNewLexer( + &Config{ + Name: "Fish", + Aliases: []string{"fish", "fishshell"}, + Filenames: []string{"*.fish", "*.load"}, + MimeTypes: []string{"application/x-fish"}, + }, + Rules{ + "root": { + Include("basic"), + Include("data"), + Include("interp"), + }, + "interp": { + {`\$\(\(`, Keyword, Push("math")}, + {`\(`, Keyword, Push("paren")}, + {`\$#?(\w+|.)`, NameVariable, nil}, + }, + "basic": { + {`\b(begin|end|if|else|while|break|for|in|return|function|block|case|continue|switch|not|and|or|set|echo|exit|pwd|true|false|cd|count|test)(\s*)\b`, ByGroups(Keyword, Text), nil}, + {`\b(alias|bg|bind|breakpoint|builtin|command|commandline|complete|contains|dirh|dirs|emit|eval|exec|fg|fish|fish_config|fish_indent|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|isatty|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|random|read|set_color|source|status|trap|type|ulimit|umask|vared|fc|getopts|hash|kill|printf|time|wait)\s*\b(?!\.)`, NameBuiltin, nil}, + {`#.*\n`, Comment, nil}, + {`\\[\w\W]`, LiteralStringEscape, nil}, + {`(\b\w+)(\s*)(=)`, ByGroups(NameVariable, Text, Operator), nil}, + {`[\[\]()=]`, Operator, nil}, + {`<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2`, LiteralString, nil}, + }, + "data": { + {`(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"`, LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Push("string")}, + {`(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'`, LiteralStringSingle, nil}, + {`(?s)'.*?'`, LiteralStringSingle, nil}, + {`;`, Punctuation, nil}, + {`&|\||\^|<|>`, Operator, nil}, + {`\s+`, Text, nil}, + {`\d+(?= |\Z)`, LiteralNumber, nil}, + {"[^=\\s\\[\\]{}()$\"\\'`\\\\<&|;]+", Text, nil}, + }, + "string": { + {`"`, LiteralStringDouble, Pop(1)}, + {`(?s)(\\\\|\\[0-7]+|\\.|[^"\\$])+`, LiteralStringDouble, nil}, + Include("interp"), + }, + "paren": { + {`\)`, Keyword, Pop(1)}, + Include("root"), + }, + "math": { + {`\)\)`, Keyword, Pop(1)}, + {`[-+*/%^|&]|\*\*|\|\|`, Operator, nil}, + {`\d+#\d+`, LiteralNumber, nil}, + {`\d+#(?! )`, LiteralNumber, nil}, + {`\d+`, LiteralNumber, nil}, + Include("root"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/forth.go b/vendor/github.com/alecthomas/chroma/lexers/forth.go new file mode 100644 index 0000000..a6a4b3a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/forth.go @@ -0,0 +1,39 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Forth lexer. +var Forth = Register(MustNewLexer( + &Config{ + Name: "Forth", + Aliases: []string{"forth"}, + Filenames: []string{"*.frt", "*.fs"}, + MimeTypes: []string{"application/x-forth"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`\\.*?\n`, CommentSingle, nil}, + {`\([\s].*?\)`, CommentSingle, nil}, + {`(:|variable|constant|value|buffer:)(\s+)`, ByGroups(KeywordNamespace, Text), Push("worddef")}, + {`([.sc]")(\s+?)`, ByGroups(LiteralString, Text), Push("stringdef")}, + {`(blk|block|buffer|evaluate|flush|load|save-buffers|update|empty-buffers|list|refill|scr|thru|\#s|\*\/mod|\+loop|\/mod|0<|0=|1\+|1-|2!|2\*|2\/|2@|2drop|2dup|2over|2swap|>body|>in|>number|>r|\?dup|abort|abort\"|abs|accept|align|aligned|allot|and|base|begin|bl|c!|c,|c@|cell\+|cells|char|char\+|chars|constant|count|cr|create|decimal|depth|do|does>|drop|dup|else|emit|environment\?|evaluate|execute|exit|fill|find|fm\/mod|here|hold|i|if|immediate|invert|j|key|leave|literal|loop|lshift|m\*|max|min|mod|move|negate|or|over|postpone|quit|r>|r@|recurse|repeat|rot|rshift|s\"|s>d|sign|sm\/rem|source|space|spaces|state|swap|then|type|u\.|u\<|um\*|um\/mod|unloop|until|variable|while|word|xor|\[char\]|\[\'\]|@|!|\#|<\#|\#>|:|;|\+|-|\*|\/|,|<|>|\|1\+|1-|\.|\.r|0<>|0>|2>r|2r>|2r@|:noname|\?do|again|c\"|case|compile,|endcase|endof|erase|false|hex|marker|nip|of|pad|parse|pick|refill|restore-input|roll|save-input|source-id|to|true|tuck|u\.r|u>|unused|value|within|\[compile\]|\#tib|convert|expect|query|span|tib|2constant|2literal|2variable|d\+|d-|d\.|d\.r|d0<|d0=|d2\*|d2\/|d<|d=|d>s|dabs|dmax|dmin|dnegate|m\*\/|m\+|2rot|du<|catch|throw|abort|abort\"|at-xy|key\?|page|ekey|ekey>char|ekey\?|emit\?|ms|time&date|BIN|CLOSE-FILE|CREATE-FILE|DELETE-FILE|FILE-POSITION|FILE-SIZE|INCLUDE-FILE|INCLUDED|OPEN-FILE|R\/O|R\/W|READ-FILE|READ-LINE|REPOSITION-FILE|RESIZE-FILE|S\"|SOURCE-ID|W/O|WRITE-FILE|WRITE-LINE|FILE-STATUS|FLUSH-FILE|REFILL|RENAME-FILE|>float|d>f|f!|f\*|f\+|f-|f\/|f0<|f0=|f<|f>d|f@|falign|faligned|fconstant|fdepth|fdrop|fdup|fliteral|float\+|floats|floor|fmax|fmin|fnegate|fover|frot|fround|fswap|fvariable|represent|df!|df@|dfalign|dfaligned|dfloat\+|dfloats|f\*\*|f\.|fabs|facos|facosh|falog|fasin|fasinh|fatan|fatan2|fatanh|fcos|fcosh|fe\.|fexp|fexpm1|fln|flnp1|flog|fs\.|fsin|fsincos|fsinh|fsqrt|ftan|ftanh|f~|precision|set-precision|sf!|sf@|sfalign|sfaligned|sfloat\+|sfloats|\(local\)|to|locals\||allocate|free|resize|definitions|find|forth-wordlist|get-current|get-order|search-wordlist|set-current|set-order|wordlist|also|forth|only|order|previous|-trailing|\/string|blank|cmove|cmove>|compare|search|sliteral|.s|dump|see|words|;code|ahead|assembler|bye|code|cs-pick|cs-roll|editor|state|\[else\]|\[if\]|\[then\]|forget|defer|defer@|defer!|action-of|begin-structure|field:|buffer:|parse-name|buffer:|traverse-wordlist|n>r|nr>|2value|fvalue|name>interpret|name>compile|name>string|cfield:|end-structure)\s`, Keyword, nil}, + {`(\$[0-9A-F]+)`, LiteralNumberHex, nil}, + {`(\#|%|&|\-|\+)?[0-9]+`, LiteralNumberInteger, nil}, + {`(\#|%|&|\-|\+)?[0-9.]+`, KeywordType, nil}, + {`(@i|!i|@e|!e|pause|noop|turnkey|sleep|itype|icompare|sp@|sp!|rp@|rp!|up@|up!|>a|a>|a@|a!|a@+|a@-|>b|b>|b@|b!|b@+|b@-|find-name|1ms|sp0|rp0|\(evaluate\)|int-trap|int!)\s`, NameConstant, nil}, + {`(do-recognizer|r:fail|recognizer:|get-recognizers|set-recognizers|r:float|r>comp|r>int|r>post|r:name|r:word|r:dnum|r:num|recognizer|forth-recognizer|rec:num|rec:float|rec:word)\s`, NameDecorator, nil}, + {`(Evalue|Rvalue|Uvalue|Edefer|Rdefer|Udefer)(\s+)`, ByGroups(KeywordNamespace, Text), Push("worddef")}, + {`[^\s]+(?=[\s])`, NameFunction, nil}, + }, + "worddef": { + {`\S+`, NameClass, Pop(1)}, + }, + "stringdef": { + {`[^"]+`, LiteralString, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/fortran.go b/vendor/github.com/alecthomas/chroma/lexers/fortran.go new file mode 100644 index 0000000..5c24b32 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/fortran.go @@ -0,0 +1,46 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Fortran lexer. +var Fortran = Register(MustNewLexer( + &Config{ + Name: "Fortran", + Aliases: []string{"fortran"}, + Filenames: []string{"*.f03", "*.f90", "*.F03", "*.F90"}, + MimeTypes: []string{"text/x-fortran"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`^#.*\n`, CommentPreproc, nil}, + {`!.*\n`, Comment, nil}, + Include("strings"), + Include("core"), + {`[a-z][\w$]*`, Name, nil}, + Include("nums"), + {`[\s]+`, Text, nil}, + }, + "core": { + {Words(`\b`, `\s*\b`, `ABSTRACT`, `ACCEPT`, `ALL`, `ALLSTOP`, `ALLOCATABLE`, `ALLOCATE`, `ARRAY`, `ASSIGN`, `ASSOCIATE`, `ASYNCHRONOUS`, `BACKSPACE`, `BIND`, `BLOCK`, `BLOCKDATA`, `BYTE`, `CALL`, `CASE`, `CLASS`, `CLOSE`, `CODIMENSION`, `COMMON`, `CONCURRRENT`, `CONTIGUOUS`, `CONTAINS`, `CONTINUE`, `CRITICAL`, `CYCLE`, `DATA`, `DEALLOCATE`, `DECODE`, `DEFERRED`, `DIMENSION`, `DO`, `ELEMENTAL`, `ELSE`, `ENCODE`, `END`, `ENTRY`, `ENUM`, `ENUMERATOR`, `EQUIVALENCE`, `EXIT`, `EXTENDS`, `EXTERNAL`, `EXTRINSIC`, `FILE`, `FINAL`, `FORALL`, `FORMAT`, `FUNCTION`, `GENERIC`, `GOTO`, `IF`, `IMAGES`, `IMPLICIT`, `IMPORT`, `IMPURE`, `INCLUDE`, `INQUIRE`, `INTENT`, `INTERFACE`, `INTRINSIC`, `IS`, `LOCK`, `MEMORY`, `MODULE`, `NAMELIST`, `NULLIFY`, `NONE`, `NON_INTRINSIC`, `NON_OVERRIDABLE`, `NOPASS`, `OPEN`, `OPTIONAL`, `OPTIONS`, `PARAMETER`, `PASS`, `PAUSE`, `POINTER`, `PRINT`, `PRIVATE`, `PROGRAM`, `PROCEDURE`, `PROTECTED`, `PUBLIC`, `PURE`, `READ`, `RECURSIVE`, `RESULT`, `RETURN`, `REWIND`, `SAVE`, `SELECT`, `SEQUENCE`, `STOP`, `SUBMODULE`, `SUBROUTINE`, `SYNC`, `SYNCALL`, `SYNCIMAGES`, `SYNCMEMORY`, `TARGET`, `THEN`, `TYPE`, `UNLOCK`, `USE`, `VALUE`, `VOLATILE`, `WHERE`, `WRITE`, `WHILE`), Keyword, nil}, + {Words(`\b`, `\s*\b`, `CHARACTER`, `COMPLEX`, `DOUBLE PRECISION`, `DOUBLE COMPLEX`, `INTEGER`, `LOGICAL`, `REAL`, `C_INT`, `C_SHORT`, `C_LONG`, `C_LONG_LONG`, `C_SIGNED_CHAR`, `C_SIZE_T`, `C_INT8_T`, `C_INT16_T`, `C_INT32_T`, `C_INT64_T`, `C_INT_LEAST8_T`, `C_INT_LEAST16_T`, `C_INT_LEAST32_T`, `C_INT_LEAST64_T`, `C_INT_FAST8_T`, `C_INT_FAST16_T`, `C_INT_FAST32_T`, `C_INT_FAST64_T`, `C_INTMAX_T`, `C_INTPTR_T`, `C_FLOAT`, `C_DOUBLE`, `C_LONG_DOUBLE`, `C_FLOAT_COMPLEX`, `C_DOUBLE_COMPLEX`, `C_LONG_DOUBLE_COMPLEX`, `C_BOOL`, `C_CHAR`, `C_PTR`, `C_FUNPTR`), KeywordType, nil}, + {`(\*\*|\*|\+|-|\/|<|>|<=|>=|==|\/=|=)`, Operator, nil}, + {`(::)`, KeywordDeclaration, nil}, + {`[()\[\],:&%;.]`, Punctuation, nil}, + {Words(`\b`, `\s*\b`, `Abort`, `Abs`, `Access`, `AChar`, `ACos`, `ACosH`, `AdjustL`, `AdjustR`, `AImag`, `AInt`, `Alarm`, `All`, `Allocated`, `ALog`, `AMax`, `AMin`, `AMod`, `And`, `ANInt`, `Any`, `ASin`, `ASinH`, `Associated`, `ATan`, `ATanH`, `Atomic_Define`, `Atomic_Ref`, `BesJ`, `BesJN`, `Bessel_J0`, `Bessel_J1`, `Bessel_JN`, `Bessel_Y0`, `Bessel_Y1`, `Bessel_YN`, `BesY`, `BesYN`, `BGE`, `BGT`, `BLE`, `BLT`, `Bit_Size`, `BTest`, `CAbs`, `CCos`, `Ceiling`, `CExp`, `Char`, `ChDir`, `ChMod`, `CLog`, `Cmplx`, `Command_Argument_Count`, `Complex`, `Conjg`, `Cos`, `CosH`, `Count`, `CPU_Time`, `CShift`, `CSin`, `CSqRt`, `CTime`, `C_Loc`, `C_Associated`, `C_Null_Ptr`, `C_Null_Funptr`, `C_F_Pointer`, `C_F_ProcPointer`, `C_Null_Char`, `C_Alert`, `C_Backspace`, `C_Form_Feed`, `C_FunLoc`, `C_Sizeof`, `C_New_Line`, `C_Carriage_Return`, `C_Horizontal_Tab`, `C_Vertical_Tab`, `DAbs`, `DACos`, `DASin`, `DATan`, `Date_and_Time`, `DbesJ`, `DbesJN`, `DbesY`, `DbesYN`, `Dble`, `DCos`, `DCosH`, `DDiM`, `DErF`, `DErFC`, `DExp`, `Digits`, `DiM`, `DInt`, `DLog`, `DMax`, `DMin`, `DMod`, `DNInt`, `Dot_Product`, `DProd`, `DSign`, `DSinH`, `DShiftL`, `DShiftR`, `DSin`, `DSqRt`, `DTanH`, `DTan`, `DTime`, `EOShift`, `Epsilon`, `ErF`, `ErFC`, `ErFC_Scaled`, `ETime`, `Execute_Command_Line`, `Exit`, `Exp`, `Exponent`, `Extends_Type_Of`, `FDate`, `FGet`, `FGetC`, `FindLoc`, `Float`, `Floor`, `Flush`, `FNum`, `FPutC`, `FPut`, `Fraction`, `FSeek`, `FStat`, `FTell`, `Gamma`, `GError`, `GetArg`, `Get_Command`, `Get_Command_Argument`, `Get_Environment_Variable`, `GetCWD`, `GetEnv`, `GetGId`, `GetLog`, `GetPId`, `GetUId`, `GMTime`, `HostNm`, `Huge`, `Hypot`, `IAbs`, `IAChar`, `IAll`, `IAnd`, `IAny`, `IArgC`, `IBClr`, `IBits`, `IBSet`, `IChar`, `IDate`, `IDiM`, `IDInt`, `IDNInt`, `IEOr`, `IErrNo`, `IFix`, `Imag`, `ImagPart`, `Image_Index`, `Index`, `Int`, `IOr`, `IParity`, `IRand`, `IsaTty`, `IShft`, `IShftC`, `ISign`, `Iso_C_Binding`, `Is_Contiguous`, `Is_Iostat_End`, `Is_Iostat_Eor`, `ITime`, `Kill`, `Kind`, `LBound`, `LCoBound`, `Len`, `Len_Trim`, `LGe`, `LGt`, `Link`, `LLe`, `LLt`, `LnBlnk`, `Loc`, `Log`, `Log_Gamma`, `Logical`, `Long`, `LShift`, `LStat`, `LTime`, `MaskL`, `MaskR`, `MatMul`, `Max`, `MaxExponent`, `MaxLoc`, `MaxVal`, `MClock`, `Merge`, `Merge_Bits`, `Move_Alloc`, `Min`, `MinExponent`, `MinLoc`, `MinVal`, `Mod`, `Modulo`, `MvBits`, `Nearest`, `New_Line`, `NInt`, `Norm2`, `Not`, `Null`, `Num_Images`, `Or`, `Pack`, `Parity`, `PError`, `Precision`, `Present`, `Product`, `Radix`, `Rand`, `Random_Number`, `Random_Seed`, `Range`, `Real`, `RealPart`, `Rename`, `Repeat`, `Reshape`, `RRSpacing`, `RShift`, `Same_Type_As`, `Scale`, `Scan`, `Second`, `Selected_Char_Kind`, `Selected_Int_Kind`, `Selected_Real_Kind`, `Set_Exponent`, `Shape`, `ShiftA`, `ShiftL`, `ShiftR`, `Short`, `Sign`, `Signal`, `SinH`, `Sin`, `Sleep`, `Sngl`, `Spacing`, `Spread`, `SqRt`, `SRand`, `Stat`, `Storage_Size`, `Sum`, `SymLnk`, `System`, `System_Clock`, `Tan`, `TanH`, `Time`, `This_Image`, `Tiny`, `TrailZ`, `Transfer`, `Transpose`, `Trim`, `TtyNam`, `UBound`, `UCoBound`, `UMask`, `Unlink`, `Unpack`, `Verify`, `XOr`, `ZAbs`, `ZCos`, `ZExp`, `ZLog`, `ZSin`, `ZSqRt`), NameBuiltin, nil}, + {`\.(true|false)\.`, NameBuiltin, nil}, + {`\.(eq|ne|lt|le|gt|ge|not|and|or|eqv|neqv)\.`, OperatorWord, nil}, + }, + "strings": { + {`(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"`, LiteralStringDouble, nil}, + {`(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'`, LiteralStringSingle, nil}, + }, + "nums": { + {`\d+(?![.e])(_[a-z]\w+)?`, LiteralNumberInteger, nil}, + {`[+-]?\d*\.\d+([ed][-+]?\d+)?(_[a-z]\w+)?`, LiteralNumberFloat, nil}, + {`[+-]?\d+\.\d*([ed][-+]?\d+)?(_[a-z]\w+)?`, LiteralNumberFloat, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/fsharp.go b/vendor/github.com/alecthomas/chroma/lexers/fsharp.go new file mode 100644 index 0000000..5605871 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/fsharp.go @@ -0,0 +1,93 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Fsharp lexer. +var Fsharp = Register(MustNewLexer( + &Config{ + Name: "FSharp", + Aliases: []string{"fsharp"}, + Filenames: []string{"*.fs", "*.fsi"}, + MimeTypes: []string{"text/x-fsharp"}, + }, + Rules{ + "escape-sequence": { + {`\\[\\"\'ntbrafv]`, LiteralStringEscape, nil}, + {`\\[0-9]{3}`, LiteralStringEscape, nil}, + {`\\u[0-9a-fA-F]{4}`, LiteralStringEscape, nil}, + {`\\U[0-9a-fA-F]{8}`, LiteralStringEscape, nil}, + }, + "root": { + {`\s+`, Text, nil}, + {`\(\)|\[\]`, NameBuiltinPseudo, nil}, + {`\b(?|-|\\.\\.|\\.|::|:=|:>|:|;;|;|<-|<\\]|<|>\\]|>|\\?\\?|\\?|\\[<|\\[\\||\\[|\\]|_|`|\\{|\\|\\]|\\||\\}|~|<@@|<@|=|@>|@@>)", Operator, nil}, + {`([=<>@^|&+\*/$%-]|[!?~])?[!$%&*+\./:<=>?@^|~-]`, Operator, nil}, + {`\b(and|or|not)\b`, OperatorWord, nil}, + {`\b(sbyte|byte|char|nativeint|unativeint|float32|single|float|double|int8|uint8|int16|uint16|int32|uint32|int64|uint64|decimal|unit|bool|string|list|exn|obj|enum)\b`, KeywordType, nil}, + {`#[ \t]*(if|endif|else|line|nowarn|light|\d+)\b.*?\n`, CommentPreproc, nil}, + {`[^\W\d][\w']*`, Name, nil}, + {`\d[\d_]*[uU]?[yslLnQRZINGmM]?`, LiteralNumberInteger, nil}, + {`0[xX][\da-fA-F][\da-fA-F_]*[uU]?[yslLn]?[fF]?`, LiteralNumberHex, nil}, + {`0[oO][0-7][0-7_]*[uU]?[yslLn]?`, LiteralNumberOct, nil}, + {`0[bB][01][01_]*[uU]?[yslLn]?`, LiteralNumberBin, nil}, + {`-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)[fFmM]?`, LiteralNumberFloat, nil}, + {`'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'B?`, LiteralStringChar, nil}, + {`'.'`, LiteralStringChar, nil}, + {`'`, Keyword, nil}, + {`@?"`, LiteralStringDouble, Push("string")}, + {`[~?][a-z][\w\']*:`, NameVariable, nil}, + }, + "dotted": { + {`\s+`, Text, nil}, + {`\.`, Punctuation, nil}, + {`[A-Z][\w\']*(?=\s*\.)`, NameNamespace, nil}, + {`[A-Z][\w\']*`, Name, Pop(1)}, + {`[a-z_][\w\']*`, Name, Pop(1)}, + Default(Pop(1)), + }, + "comment": { + {`[^(*)@"]+`, Comment, nil}, + {`\(\*`, Comment, Push()}, + {`\*\)`, Comment, Pop(1)}, + {`@"`, LiteralString, Push("lstring")}, + {`"""`, LiteralString, Push("tqs")}, + {`"`, LiteralString, Push("string")}, + {`[(*)@]`, Comment, nil}, + }, + "string": { + {`[^\\"]+`, LiteralString, nil}, + Include("escape-sequence"), + {`\\\n`, LiteralString, nil}, + {`\n`, LiteralString, nil}, + {`"B?`, LiteralString, Pop(1)}, + }, + "lstring": { + {`[^"]+`, LiteralString, nil}, + {`\n`, LiteralString, nil}, + {`""`, LiteralString, nil}, + {`"B?`, LiteralString, Pop(1)}, + }, + "tqs": { + {`[^"]+`, LiteralString, nil}, + {`\n`, LiteralString, nil}, + {`"""B?`, LiteralString, Pop(1)}, + {`"`, LiteralString, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/gas.go b/vendor/github.com/alecthomas/chroma/lexers/gas.go new file mode 100644 index 0000000..5fbe72e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/gas.go @@ -0,0 +1,54 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Gas lexer. +var Gas = Register(MustNewLexer( + &Config{ + Name: "GAS", + Aliases: []string{"gas", "asm"}, + Filenames: []string{"*.s", "*.S"}, + MimeTypes: []string{"text/x-gas"}, + }, + Rules{ + "root": { + Include("whitespace"), + {`(?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+):`, NameLabel, nil}, + {`\.(?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+)`, NameAttribute, Push("directive-args")}, + {`lock|rep(n?z)?|data\d+`, NameAttribute, nil}, + {`(?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+)`, NameFunction, Push("instruction-args")}, + {`[\r\n]+`, Text, nil}, + }, + "directive-args": { + {`(?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+)`, NameConstant, nil}, + {`"(\\"|[^"])*"`, LiteralString, nil}, + {`@(?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+)`, NameAttribute, nil}, + {`(?:0[xX][a-zA-Z0-9]+|\d+)`, LiteralNumberInteger, nil}, + {`[\r\n]+`, Text, Pop(1)}, + Include("punctuation"), + Include("whitespace"), + }, + "instruction-args": { + {`([a-z0-9]+)( )(<)((?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+))(>)`, ByGroups(LiteralNumberHex, Text, Punctuation, NameConstant, Punctuation), nil}, + {`([a-z0-9]+)( )(<)((?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+))([-+])((?:0[xX][a-zA-Z0-9]+|\d+))(>)`, ByGroups(LiteralNumberHex, Text, Punctuation, NameConstant, Punctuation, LiteralNumberInteger, Punctuation), nil}, + {`(?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+)`, NameConstant, nil}, + {`(?:0[xX][a-zA-Z0-9]+|\d+)`, LiteralNumberInteger, nil}, + {`%(?:[a-zA-Z$_][\w$.@-]*|\.[\w$.@-]+)`, NameVariable, nil}, + {`$(?:0[xX][a-zA-Z0-9]+|\d+)`, LiteralNumberInteger, nil}, + {`$'(.|\\')'`, LiteralStringChar, nil}, + {`[\r\n]+`, Text, Pop(1)}, + Include("punctuation"), + Include("whitespace"), + }, + "whitespace": { + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`[;#].*?\n`, Comment, nil}, + }, + "punctuation": { + {`[-*,.()\[\]!:]+`, Punctuation, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/gdscript.go b/vendor/github.com/alecthomas/chroma/lexers/gdscript.go new file mode 100644 index 0000000..c7c8fff --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/gdscript.go @@ -0,0 +1,123 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// GDScript lexer. +var GDScript = Register(MustNewLexer( + &Config{ + Name: "GDScript", + Aliases: []string{"gdscript", "gd"}, + Filenames: []string{"*.gd"}, + MimeTypes: []string{"text/x-gdscript", "application/x-gdscript"}, + }, + Rules{ + "root": { + {`\n`, Text, nil}, + {`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, + {`^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, + {`[^\S\n]+`, Text, nil}, + {`#.*$`, CommentSingle, nil}, + {`[]{}:(),;[]`, Punctuation, nil}, + {`\\\n`, Text, nil}, + {`\\`, Text, nil}, + {`(in|and|or|not)\b`, OperatorWord, nil}, + {`!=|==|<<|>>|&&|\+=|-=|\*=|/=|%=|&=|\|=|\|\||[-~+/*%=<>&^.!|$]`, Operator, nil}, + Include("keywords"), + {`(def)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("funcname")}, + {`(class)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("classname")}, + Include("builtins"), + {`([rR]|[uUbB][rR]|[rR][uUbB])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, + {`([uUbB]?)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "tdqs")}, + {`([uUbB]?)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "tsqs")}, + {`([uUbB]?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "dqs")}, + {`([uUbB]?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "sqs")}, + Include("name"), + Include("numbers"), + }, + "keywords": { + {Words(``, `\b`, + `if`, `elif`, `else`, `for`, `do`, + `while`, `switch`, `case`, `break`, `continue`, + `pass`, `return`, `class`, `extends`, `tool`, + `signal`, `func`, `static`, `const`, `enum`, + `var`, `onready`, `export`, `setget`, `breakpoint`), Keyword, nil}, + }, + "builtins": { + {Words(`(?)`, ByGroups(CommentPreproc, Using(Python, nil), CommentPreproc), nil}, + {`<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>`, Other, nil}, + {`<\s*py:[a-zA-Z0-9]+`, NameTag, Push("pytag")}, + {`<\s*[a-zA-Z0-9:.]+`, NameTag, Push("tag")}, + Include("variable"), + {`[<$]`, Other, nil}, + }, + "pytag": { + {`\s+`, Text, nil}, + {`[\w:-]+\s*=`, NameAttribute, Push("pyattr")}, + {`/?\s*>`, NameTag, Pop(1)}, + }, + "pyattr": { + {`(")(.*?)(")`, ByGroups(LiteralString, Using(Python, nil), LiteralString), Pop(1)}, + {`(')(.*?)(')`, ByGroups(LiteralString, Using(Python, nil), LiteralString), Pop(1)}, + {`[^\s>]+`, LiteralString, Pop(1)}, + }, + "tag": { + {`\s+`, Text, nil}, + {`py:[\w-]+\s*=`, NameAttribute, Push("pyattr")}, + {`[\w:-]+\s*=`, NameAttribute, Push("attr")}, + {`/?\s*>`, NameTag, Pop(1)}, + }, + "attr": { + {`"`, LiteralString, Push("attr-dstring")}, + {`'`, LiteralString, Push("attr-sstring")}, + {`[^\s>]*`, LiteralString, Pop(1)}, + }, + "attr-dstring": { + {`"`, LiteralString, Pop(1)}, + Include("strings"), + {`'`, LiteralString, nil}, + }, + "attr-sstring": { + {`'`, LiteralString, Pop(1)}, + Include("strings"), + {`'`, LiteralString, nil}, + }, + "strings": { + {`[^"'$]+`, LiteralString, nil}, + Include("variable"), + }, + "variable": { + {`(?>|<=?|>=?|==?|&&?|\^|\|\|?`, Operator, nil}, + {`[?:]`, Operator, nil}, + {`\bdefined\b`, Operator, nil}, + {`[;{}(),\[\]]`, Punctuation, nil}, + {`[+-]?\d*\.\d+([eE][-+]?\d+)?`, LiteralNumberFloat, nil}, + {`[+-]?\d+\.\d*([eE][-+]?\d+)?`, LiteralNumberFloat, nil}, + {`0[xX][0-9a-fA-F]*`, LiteralNumberHex, nil}, + {`0[0-7]*`, LiteralNumberOct, nil}, + {`[1-9][0-9]*`, LiteralNumberInteger, nil}, + {Words(`\b`, `\b`, `attribute`, `const`, `uniform`, `varying`, `centroid`, `break`, `continue`, `do`, `for`, `while`, `if`, `else`, `in`, `out`, `inout`, `float`, `int`, `void`, `bool`, `true`, `false`, `invariant`, `discard`, `return`, `mat2`, `mat3mat4`, `mat2x2`, `mat3x2`, `mat4x2`, `mat2x3`, `mat3x3`, `mat4x3`, `mat2x4`, `mat3x4`, `mat4x4`, `vec2`, `vec3`, `vec4`, `ivec2`, `ivec3`, `ivec4`, `bvec2`, `bvec3`, `bvec4`, `sampler1D`, `sampler2D`, `sampler3DsamplerCube`, `sampler1DShadow`, `sampler2DShadow`, `struct`), Keyword, nil}, + {Words(`\b`, `\b`, `asm`, `class`, `union`, `enum`, `typedef`, `template`, `this`, `packed`, `goto`, `switch`, `default`, `inline`, `noinline`, `volatile`, `public`, `static`, `extern`, `external`, `interface`, `long`, `short`, `double`, `half`, `fixed`, `unsigned`, `lowp`, `mediump`, `highp`, `precision`, `input`, `output`, `hvec2`, `hvec3`, `hvec4`, `dvec2`, `dvec3`, `dvec4`, `fvec2`, `fvec3`, `fvec4`, `sampler2DRect`, `sampler3DRect`, `sampler2DRectShadow`, `sizeof`, `cast`, `namespace`, `using`), Keyword, nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + {`\.`, Punctuation, nil}, + {`\s+`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/gnuplot.go b/vendor/github.com/alecthomas/chroma/lexers/gnuplot.go new file mode 100644 index 0000000..6d98115 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/gnuplot.go @@ -0,0 +1,116 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Gnuplot lexer. +var Gnuplot = Register(MustNewLexer( + &Config{ + Name: "Gnuplot", + Aliases: []string{"gnuplot"}, + Filenames: []string{"*.plot", "*.plt"}, + MimeTypes: []string{"text/x-gnuplot"}, + }, + Rules{ + "root": { + Include("whitespace"), + {`bind\b|bin\b|bi\b`, Keyword, Push("bind")}, + {`exit\b|exi\b|ex\b|quit\b|qui\b|qu\b|q\b`, Keyword, Push("quit")}, + {`fit\b|fi\b|f\b`, Keyword, Push("fit")}, + {`(if)(\s*)(\()`, ByGroups(Keyword, Text, Punctuation), Push("if")}, + {`else\b`, Keyword, nil}, + {`pause\b|paus\b|pau\b|pa\b`, Keyword, Push("pause")}, + {`plot\b|plo\b|pl\b|p\b|replot\b|replo\b|repl\b|rep\b|splot\b|splo\b|spl\b|sp\b`, Keyword, Push("plot")}, + {`save\b|sav\b|sa\b`, Keyword, Push("save")}, + {`set\b|se\b`, Keyword, Push("genericargs", "optionarg")}, + {`show\b|sho\b|sh\b|unset\b|unse\b|uns\b`, Keyword, Push("noargs", "optionarg")}, + {`lower\b|lowe\b|low\b|raise\b|rais\b|rai\b|ra\b|call\b|cal\b|ca\b|cd\b|clear\b|clea\b|cle\b|cl\b|help\b|hel\b|he\b|h\b|\?\b|history\b|histor\b|histo\b|hist\b|his\b|hi\b|load\b|loa\b|lo\b|l\b|print\b|prin\b|pri\b|pr\b|pwd\b|reread\b|rerea\b|rere\b|rer\b|re\b|reset\b|rese\b|res\b|screendump\b|screendum\b|screendu\b|screend\b|screen\b|scree\b|scre\b|scr\b|shell\b|shel\b|she\b|system\b|syste\b|syst\b|sys\b|sy\b|update\b|updat\b|upda\b|upd\b|up\b`, Keyword, Push("genericargs")}, + {`pwd\b|reread\b|rerea\b|rere\b|rer\b|re\b|reset\b|rese\b|res\b|screendump\b|screendum\b|screendu\b|screend\b|screen\b|scree\b|scre\b|scr\b|shell\b|shel\b|she\b|test\b`, Keyword, Push("noargs")}, + {`([a-zA-Z_]\w*)(\s*)(=)`, ByGroups(NameVariable, Text, Operator), Push("genericargs")}, + {`([a-zA-Z_]\w*)(\s*\(.*?\)\s*)(=)`, ByGroups(NameFunction, Text, Operator), Push("genericargs")}, + {`@[a-zA-Z_]\w*`, NameConstant, nil}, + {`;`, Keyword, nil}, + }, + "comment": { + {`[^\\\n]`, Comment, nil}, + {`\\\n`, Comment, nil}, + {`\\`, Comment, nil}, + Default(Pop(1)), + }, + "whitespace": { + {`#`, Comment, Push("comment")}, + {`[ \t\v\f]+`, Text, nil}, + }, + "noargs": { + Include("whitespace"), + {`;`, Punctuation, Pop(1)}, + {`\n`, Text, Pop(1)}, + }, + "dqstring": { + {`"`, LiteralString, Pop(1)}, + {`\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})`, LiteralStringEscape, nil}, + {`[^\\"\n]+`, LiteralString, nil}, + {`\\\n`, LiteralString, nil}, + {`\\`, LiteralString, nil}, + {`\n`, LiteralString, Pop(1)}, + }, + "sqstring": { + {`''`, LiteralString, nil}, + {`'`, LiteralString, Pop(1)}, + {`[^\\'\n]+`, LiteralString, nil}, + {`\\\n`, LiteralString, nil}, + {`\\`, LiteralString, nil}, + {`\n`, LiteralString, Pop(1)}, + }, + "genericargs": { + Include("noargs"), + {`"`, LiteralString, Push("dqstring")}, + {`'`, LiteralString, Push("sqstring")}, + {`(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+`, LiteralNumberFloat, nil}, + {`(\d+\.\d*|\.\d+)`, LiteralNumberFloat, nil}, + {`-?\d+`, LiteralNumberInteger, nil}, + {`[,.~!%^&*+=|?:<>/-]`, Operator, nil}, + {`[{}()\[\]]`, Punctuation, nil}, + {`(eq|ne)\b`, OperatorWord, nil}, + {`([a-zA-Z_]\w*)(\s*)(\()`, ByGroups(NameFunction, Text, Punctuation), nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + {`@[a-zA-Z_]\w*`, NameConstant, nil}, + {`\\\n`, Text, nil}, + }, + "optionarg": { + Include("whitespace"), + {`all\b|al\b|a\b|angles\b|angle\b|angl\b|ang\b|an\b|arrow\b|arro\b|arr\b|ar\b|autoscale\b|autoscal\b|autosca\b|autosc\b|autos\b|auto\b|aut\b|au\b|bars\b|bar\b|ba\b|b\b|border\b|borde\b|bord\b|bor\b|boxwidth\b|boxwidt\b|boxwid\b|boxwi\b|boxw\b|box\b|clabel\b|clabe\b|clab\b|cla\b|cl\b|clip\b|cli\b|cl\b|c\b|cntrparam\b|cntrpara\b|cntrpar\b|cntrpa\b|cntrp\b|cntr\b|cnt\b|cn\b|contour\b|contou\b|conto\b|cont\b|con\b|co\b|data\b|dat\b|da\b|datafile\b|datafil\b|datafi\b|dataf\b|data\b|dgrid3d\b|dgrid3\b|dgrid\b|dgri\b|dgr\b|dg\b|dummy\b|dumm\b|dum\b|du\b|encoding\b|encodin\b|encodi\b|encod\b|enco\b|enc\b|decimalsign\b|decimalsig\b|decimalsi\b|decimals\b|decimal\b|decima\b|decim\b|deci\b|dec\b|fit\b|fontpath\b|fontpat\b|fontpa\b|fontp\b|font\b|format\b|forma\b|form\b|for\b|fo\b|function\b|functio\b|functi\b|funct\b|func\b|fun\b|fu\b|functions\b|function\b|functio\b|functi\b|funct\b|func\b|fun\b|fu\b|grid\b|gri\b|gr\b|g\b|hidden3d\b|hidden3\b|hidden\b|hidde\b|hidd\b|hid\b|historysize\b|historysiz\b|historysi\b|historys\b|history\b|histor\b|histo\b|hist\b|his\b|isosamples\b|isosample\b|isosampl\b|isosamp\b|isosam\b|isosa\b|isos\b|iso\b|is\b|key\b|ke\b|k\b|keytitle\b|keytitl\b|keytit\b|keyti\b|keyt\b|label\b|labe\b|lab\b|la\b|linestyle\b|linestyl\b|linesty\b|linest\b|lines\b|line\b|lin\b|li\b|ls\b|loadpath\b|loadpat\b|loadpa\b|loadp\b|load\b|loa\b|locale\b|local\b|loca\b|loc\b|logscale\b|logscal\b|logsca\b|logsc\b|logs\b|log\b|macros\b|macro\b|macr\b|mac\b|mapping\b|mappin\b|mappi\b|mapp\b|map\b|mapping3d\b|mapping3\b|mapping\b|mappin\b|mappi\b|mapp\b|map\b|margin\b|margi\b|marg\b|mar\b|lmargin\b|lmargi\b|lmarg\b|lmar\b|rmargin\b|rmargi\b|rmarg\b|rmar\b|tmargin\b|tmargi\b|tmarg\b|tmar\b|bmargin\b|bmargi\b|bmarg\b|bmar\b|mouse\b|mous\b|mou\b|mo\b|multiplot\b|multiplo\b|multipl\b|multip\b|multi\b|mxtics\b|mxtic\b|mxti\b|mxt\b|nomxtics\b|nomxtic\b|nomxti\b|nomxt\b|mx2tics\b|mx2tic\b|mx2ti\b|mx2t\b|nomx2tics\b|nomx2tic\b|nomx2ti\b|nomx2t\b|mytics\b|mytic\b|myti\b|myt\b|nomytics\b|nomytic\b|nomyti\b|nomyt\b|my2tics\b|my2tic\b|my2ti\b|my2t\b|nomy2tics\b|nomy2tic\b|nomy2ti\b|nomy2t\b|mztics\b|mztic\b|mzti\b|mzt\b|nomztics\b|nomztic\b|nomzti\b|nomzt\b|mcbtics\b|mcbtic\b|mcbti\b|mcbt\b|nomcbtics\b|nomcbtic\b|nomcbti\b|nomcbt\b|offsets\b|offset\b|offse\b|offs\b|off\b|of\b|origin\b|origi\b|orig\b|ori\b|or\b|output\b|outpu\b|outp\b|out\b|ou\b|o\b|parametric\b|parametri\b|parametr\b|paramet\b|parame\b|param\b|para\b|par\b|pa\b|pm3d\b|pm3\b|pm\b|palette\b|palett\b|palet\b|pale\b|pal\b|colorbox\b|colorbo\b|colorb\b|plot\b|plo\b|pl\b|p\b|pointsize\b|pointsiz\b|pointsi\b|points\b|point\b|poin\b|poi\b|polar\b|pola\b|pol\b|print\b|prin\b|pri\b|pr\b|object\b|objec\b|obje\b|obj\b|samples\b|sample\b|sampl\b|samp\b|sam\b|sa\b|size\b|siz\b|si\b|style\b|styl\b|sty\b|st\b|surface\b|surfac\b|surfa\b|surf\b|sur\b|su\b|table\b|terminal\b|termina\b|termin\b|termi\b|term\b|ter\b|te\b|t\b|termoptions\b|termoption\b|termoptio\b|termopti\b|termopt\b|termop\b|termo\b|tics\b|tic\b|ti\b|ticscale\b|ticscal\b|ticsca\b|ticsc\b|ticslevel\b|ticsleve\b|ticslev\b|ticsle\b|ticsl\b|timefmt\b|timefm\b|timef\b|timestamp\b|timestam\b|timesta\b|timest\b|times\b|time\b|tim\b|title\b|titl\b|tit\b|variables\b|variable\b|variabl\b|variab\b|varia\b|vari\b|var\b|va\b|v\b|version\b|versio\b|versi\b|vers\b|ver\b|ve\b|view\b|vie\b|vi\b|xyplane\b|xyplan\b|xypla\b|xypl\b|xyp\b|xdata\b|xdat\b|xda\b|x2data\b|x2dat\b|x2da\b|ydata\b|ydat\b|yda\b|y2data\b|y2dat\b|y2da\b|zdata\b|zdat\b|zda\b|cbdata\b|cbdat\b|cbda\b|xlabel\b|xlabe\b|xlab\b|xla\b|xl\b|x2label\b|x2labe\b|x2lab\b|x2la\b|x2l\b|ylabel\b|ylabe\b|ylab\b|yla\b|yl\b|y2label\b|y2labe\b|y2lab\b|y2la\b|y2l\b|zlabel\b|zlabe\b|zlab\b|zla\b|zl\b|cblabel\b|cblabe\b|cblab\b|cbla\b|cbl\b|xtics\b|xtic\b|xti\b|noxtics\b|noxtic\b|noxti\b|x2tics\b|x2tic\b|x2ti\b|nox2tics\b|nox2tic\b|nox2ti\b|ytics\b|ytic\b|yti\b|noytics\b|noytic\b|noyti\b|y2tics\b|y2tic\b|y2ti\b|noy2tics\b|noy2tic\b|noy2ti\b|ztics\b|ztic\b|zti\b|noztics\b|noztic\b|nozti\b|cbtics\b|cbtic\b|cbti\b|nocbtics\b|nocbtic\b|nocbti\b|xdtics\b|xdtic\b|xdti\b|noxdtics\b|noxdtic\b|noxdti\b|x2dtics\b|x2dtic\b|x2dti\b|nox2dtics\b|nox2dtic\b|nox2dti\b|ydtics\b|ydtic\b|ydti\b|noydtics\b|noydtic\b|noydti\b|y2dtics\b|y2dtic\b|y2dti\b|noy2dtics\b|noy2dtic\b|noy2dti\b|zdtics\b|zdtic\b|zdti\b|nozdtics\b|nozdtic\b|nozdti\b|cbdtics\b|cbdtic\b|cbdti\b|nocbdtics\b|nocbdtic\b|nocbdti\b|xmtics\b|xmtic\b|xmti\b|noxmtics\b|noxmtic\b|noxmti\b|x2mtics\b|x2mtic\b|x2mti\b|nox2mtics\b|nox2mtic\b|nox2mti\b|ymtics\b|ymtic\b|ymti\b|noymtics\b|noymtic\b|noymti\b|y2mtics\b|y2mtic\b|y2mti\b|noy2mtics\b|noy2mtic\b|noy2mti\b|zmtics\b|zmtic\b|zmti\b|nozmtics\b|nozmtic\b|nozmti\b|cbmtics\b|cbmtic\b|cbmti\b|nocbmtics\b|nocbmtic\b|nocbmti\b|xrange\b|xrang\b|xran\b|xra\b|xr\b|x2range\b|x2rang\b|x2ran\b|x2ra\b|x2r\b|yrange\b|yrang\b|yran\b|yra\b|yr\b|y2range\b|y2rang\b|y2ran\b|y2ra\b|y2r\b|zrange\b|zrang\b|zran\b|zra\b|zr\b|cbrange\b|cbrang\b|cbran\b|cbra\b|cbr\b|rrange\b|rrang\b|rran\b|rra\b|rr\b|trange\b|trang\b|tran\b|tra\b|tr\b|urange\b|urang\b|uran\b|ura\b|ur\b|vrange\b|vrang\b|vran\b|vra\b|vr\b|xzeroaxis\b|xzeroaxi\b|xzeroax\b|xzeroa\b|x2zeroaxis\b|x2zeroaxi\b|x2zeroax\b|x2zeroa\b|yzeroaxis\b|yzeroaxi\b|yzeroax\b|yzeroa\b|y2zeroaxis\b|y2zeroaxi\b|y2zeroax\b|y2zeroa\b|zzeroaxis\b|zzeroaxi\b|zzeroax\b|zzeroa\b|zeroaxis\b|zeroaxi\b|zeroax\b|zeroa\b|zero\b|zer\b|ze\b|z\b`, NameBuiltin, Pop(1)}, + }, + "bind": { + {`!`, Keyword, Pop(1)}, + {`allwindows\b|allwindow\b|allwindo\b|allwind\b|allwin\b|allwi\b|allw\b|all\b`, NameBuiltin, nil}, + Include("genericargs"), + }, + "quit": { + {`gnuplot\b`, Keyword, nil}, + Include("noargs"), + }, + "fit": { + {`via\b`, NameBuiltin, nil}, + Include("plot"), + }, + "if": { + {`\)`, Punctuation, Pop(1)}, + Include("genericargs"), + }, + "pause": { + {`(mouse|any|button1|button2|button3)\b`, NameBuiltin, nil}, + {`keypress\b|keypres\b|keypre\b|keypr\b|keyp\b|key\b`, NameBuiltin, nil}, + Include("genericargs"), + }, + "plot": { + {`axes\b|axe\b|ax\b|axis\b|axi\b|binary\b|binar\b|bina\b|bin\b|every\b|ever\b|eve\b|ev\b|index\b|inde\b|ind\b|in\b|i\b|matrix\b|matri\b|matr\b|mat\b|smooth\b|smoot\b|smoo\b|smo\b|sm\b|s\b|thru\b|title\b|titl\b|tit\b|ti\b|t\b|notitle\b|notitl\b|notit\b|noti\b|not\b|using\b|usin\b|usi\b|us\b|u\b|with\b|wit\b|wi\b|w\b`, NameBuiltin, nil}, + Include("genericargs"), + }, + "save": { + {`functions\b|function\b|functio\b|functi\b|funct\b|func\b|fun\b|fu\b|f\b|set\b|se\b|s\b|terminal\b|termina\b|termin\b|termi\b|term\b|ter\b|te\b|t\b|variables\b|variable\b|variabl\b|variab\b|varia\b|vari\b|var\b|va\b|v\b`, NameBuiltin, nil}, + Include("genericargs"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/go.go b/vendor/github.com/alecthomas/chroma/lexers/go.go new file mode 100644 index 0000000..d00c414 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/go.go @@ -0,0 +1,55 @@ +package lexers + +import ( + "strings" + + . "github.com/alecthomas/chroma" // nolint +) + +// Go lexer. +var Go = Register(MustNewLexer( + &Config{ + Name: "Go", + Aliases: []string{"go", "golang"}, + Filenames: []string{"*.go"}, + MimeTypes: []string{"text/x-gosrc"}, + }, + Rules{ + "root": { + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`\\\n`, Text, nil}, + {`//(.*?)\n`, CommentSingle, nil}, + {`/(\\\n)?[*](.|\n)*?[*](\\\n)?/`, CommentMultiline, nil}, + {`(import|package)\b`, KeywordNamespace, nil}, + {`(var|func|struct|map|chan|type|interface|const)\b`, KeywordDeclaration, nil}, + {Words(``, `\b`, `break`, `default`, `select`, `case`, `defer`, `go`, `else`, `goto`, `switch`, `fallthrough`, `if`, `range`, `continue`, `for`, `return`), Keyword, nil}, + {`(true|false|iota|nil)\b`, KeywordConstant, nil}, + {Words(``, `\b(\()`, `uint`, `uint8`, `uint16`, `uint32`, `uint64`, `int`, `int8`, `int16`, `int32`, `int64`, `float`, `float32`, `float64`, `complex64`, `complex128`, `byte`, `rune`, `string`, `bool`, `error`, `uintptr`, `print`, `println`, `panic`, `recover`, `close`, `complex`, `real`, `imag`, `len`, `cap`, `append`, `copy`, `delete`, `new`, `make`), ByGroups(NameBuiltin, Punctuation), nil}, + {Words(``, `\b`, `uint`, `uint8`, `uint16`, `uint32`, `uint64`, `int`, `int8`, `int16`, `int32`, `int64`, `float`, `float32`, `float64`, `complex64`, `complex128`, `byte`, `rune`, `string`, `bool`, `error`, `uintptr`), KeywordType, nil}, + {`\d+i`, LiteralNumber, nil}, + {`\d+\.\d*([Ee][-+]\d+)?i`, LiteralNumber, nil}, + {`\.\d+([Ee][-+]\d+)?i`, LiteralNumber, nil}, + {`\d+[Ee][-+]\d+i`, LiteralNumber, nil}, + {`\d+(\.\d+[eE][+\-]?\d+|\.\d*|[eE][+\-]?\d+)`, LiteralNumberFloat, nil}, + {`\.\d+([eE][+\-]?\d+)?`, LiteralNumberFloat, nil}, + {`0[0-7]+`, LiteralNumberOct, nil}, + {`0[xX][0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`(0|[1-9][0-9]*)`, LiteralNumberInteger, nil}, + {`'(\\['"\\abfnrtv]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|[^\\])'`, LiteralStringChar, nil}, + {"`[^`]*`", LiteralString, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`(<<=|>>=|<<|>>|<=|>=|&\^=|&\^|\+=|-=|\*=|/=|%=|&=|\|=|&&|\|\||<-|\+\+|--|==|!=|:=|\.\.\.|[+\-*/%&])`, Operator, nil}, + {`[|^<>=!()\[\]{}.,;:]`, Punctuation, nil}, + {`[^\W\d]\w*`, NameOther, nil}, + }, + }, +).SetAnalyser(func(text string) float32 { + if strings.Contains(text, "fmt.") && strings.Contains(text, "package ") { + return 0.5 + } + if strings.Contains(text, "package ") { + return 0.1 + } + return 0.0 +})) diff --git a/vendor/github.com/alecthomas/chroma/lexers/groovy.go b/vendor/github.com/alecthomas/chroma/lexers/groovy.go new file mode 100644 index 0000000..53f4418 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/groovy.go @@ -0,0 +1,57 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Groovy lexer. +var Groovy = Register(MustNewLexer( + &Config{ + Name: "Groovy", + Aliases: []string{"groovy"}, + Filenames: []string{"*.groovy", "*.gradle"}, + MimeTypes: []string{"text/x-groovy"}, + DotAll: true, + }, + Rules{ + "root": { + {`#!(.*?)$`, CommentPreproc, Push("base")}, + Default(Push("base")), + }, + "base": { + {`^(\s*(?:[a-zA-Z_][\w.\[\]]*\s+)+?)([a-zA-Z_]\w*)(\s*)(\()`, ByGroups(UsingSelf("root"), NameFunction, Text, Operator), nil}, + {`[^\S\n]+`, Text, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*.*?\*/`, CommentMultiline, nil}, + {`@[a-zA-Z_][\w.]*`, NameDecorator, nil}, + {`(as|assert|break|case|catch|continue|default|do|else|finally|for|if|in|goto|instanceof|new|return|switch|this|throw|try|while|in|as)\b`, Keyword, nil}, + {`(abstract|const|enum|extends|final|implements|native|private|protected|public|static|strictfp|super|synchronized|throws|transient|volatile)\b`, KeywordDeclaration, nil}, + {`(def|boolean|byte|char|double|float|int|long|short|void)\b`, KeywordType, nil}, + {`(package)(\s+)`, ByGroups(KeywordNamespace, Text), nil}, + {`(true|false|null)\b`, KeywordConstant, nil}, + {`(class|interface)(\s+)`, ByGroups(KeywordDeclaration, Text), Push("class")}, + {`(import)(\s+)`, ByGroups(KeywordNamespace, Text), Push("import")}, + {`""".*?"""`, LiteralStringDouble, nil}, + {`'''.*?'''`, LiteralStringSingle, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`\$/((?!/\$).)*/\$`, LiteralString, nil}, + {`/(\\\\|\\"|[^/])*/`, LiteralString, nil}, + {`'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'`, LiteralStringChar, nil}, + {`(\.)([a-zA-Z_]\w*)`, ByGroups(Operator, NameAttribute), nil}, + {`[a-zA-Z_]\w*:`, NameLabel, nil}, + {`[a-zA-Z_$]\w*`, Name, nil}, + {`[~^*!%&\[\](){}<>|+=:;,./?-]`, Operator, nil}, + {`[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?`, LiteralNumberFloat, nil}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`[0-9]+L?`, LiteralNumberInteger, nil}, + {`\n`, Text, nil}, + }, + "class": { + {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + }, + "import": { + {`[\w.]+\*?`, NameNamespace, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/handlebars.go b/vendor/github.com/alecthomas/chroma/lexers/handlebars.go new file mode 100644 index 0000000..4c1e06a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/handlebars.go @@ -0,0 +1,55 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Handlebars lexer. +var Handlebars = Register(MustNewLexer( + &Config{ + Name: "Handlebars", + Aliases: []string{"handlebars"}, + Filenames: []string{"*.handlebars"}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`[^{]+`, Other, nil}, + {`\{\{!.*\}\}`, Comment, nil}, + {`(\{\{\{)(\s*)`, ByGroups(CommentSpecial, Text), Push("tag")}, + {`(\{\{)(\s*)`, ByGroups(CommentPreproc, Text), Push("tag")}, + }, + "tag": { + {`\s+`, Text, nil}, + {`\}\}\}`, CommentSpecial, Pop(1)}, + {`\}\}`, CommentPreproc, Pop(1)}, + {`([#/]*)(each|if|unless|else|with|log|in(?:line)?)`, ByGroups(Keyword, Keyword), nil}, + {`#\*inline`, Keyword, nil}, + {`([#/])([\w-]+)`, ByGroups(NameFunction, NameFunction), nil}, + {`([\w-]+)(=)`, ByGroups(NameAttribute, Operator), nil}, + {`(>)(\s*)(@partial-block)`, ByGroups(Keyword, Text, Keyword), nil}, + {`(#?>)(\s*)([\w-]+)`, ByGroups(Keyword, Text, NameVariable), nil}, + {`(>)(\s*)(\()`, ByGroups(Keyword, Text, Punctuation), Push("dynamic-partial")}, + Include("generic"), + }, + "dynamic-partial": { + {`\s+`, Text, nil}, + {`\)`, Punctuation, Pop(1)}, + {`(lookup)(\s+)(\.|this)(\s+)`, ByGroups(Keyword, Text, NameVariable, Text), nil}, + {`(lookup)(\s+)(\S+)`, ByGroups(Keyword, Text, UsingSelf("variable")), nil}, + {`[\w-]+`, NameFunction, nil}, + Include("generic"), + }, + "variable": { + {`[a-zA-Z][\w-]*`, NameVariable, nil}, + {`\.[\w-]+`, NameVariable, nil}, + {`(this\/|\.\/|(\.\.\/)+)[\w-]+`, NameVariable, nil}, + }, + "generic": { + Include("variable"), + {`:?"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`:?'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/haskell.go b/vendor/github.com/alecthomas/chroma/lexers/haskell.go new file mode 100644 index 0000000..18203d8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/haskell.go @@ -0,0 +1,98 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Haskell lexer. +var Haskell = Register(MustNewLexer( + &Config{ + Name: "Haskell", + Aliases: []string{"haskell", "hs"}, + Filenames: []string{"*.hs"}, + MimeTypes: []string{"text/x-haskell"}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`--(?![!#$%&*+./<=>?@^|_~:\\]).*?$`, CommentSingle, nil}, + {`\{-`, CommentMultiline, Push("comment")}, + {`\bimport\b`, KeywordReserved, Push("import")}, + {`\bmodule\b`, KeywordReserved, Push("module")}, + {`\berror\b`, NameException, nil}, + {`\b(case|class|data|default|deriving|do|else|family|if|in|infix[lr]?|instance|let|newtype|of|then|type|where|_)(?!\')\b`, KeywordReserved, nil}, + {`'[^\\]'`, LiteralStringChar, nil}, + {`^[_a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧա-ևᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓꞡꞣꞥꞧꞩꟺff-stﬓ-ﬗa-z𐐨-𐑏𝐚-𝐳𝑎-𝑔𝑖-𝑧𝒂-𝒛𝒶-𝒹𝒻𝒽-𝓃𝓅-𝓏𝓪-𝔃𝔞-𝔷𝕒-𝕫𝖆-𝖟𝖺-𝗓𝗮-𝘇𝘢-𝘻𝙖-𝙯𝚊-𝚥𝛂-𝛚𝛜-𝛡𝛼-𝜔𝜖-𝜛𝜶-𝝎𝝐-𝝕𝝰-𝞈𝞊-𝞏𝞪-𝟂𝟄-𝟉𝟋][\w\']*`, NameFunction, nil}, + {`'?[_a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧա-ևᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓꞡꞣꞥꞧꞩꟺff-stﬓ-ﬗa-z𐐨-𐑏𝐚-𝐳𝑎-𝑔𝑖-𝑧𝒂-𝒛𝒶-𝒹𝒻𝒽-𝓃𝓅-𝓏𝓪-𝔃𝔞-𝔷𝕒-𝕫𝖆-𝖟𝖺-𝗓𝗮-𝘇𝘢-𝘻𝙖-𝙯𝚊-𝚥𝛂-𝛚𝛜-𝛡𝛼-𝜔𝜖-𝜛𝜶-𝝎𝝐-𝝕𝝰-𝞈𝞊-𝞏𝞪-𝟂𝟄-𝟉𝟋][\w']*`, Name, nil}, + {`('')?[A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊][\w\']*`, KeywordType, nil}, + {`(')[A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊][\w\']*`, KeywordType, nil}, + {`(')\[[^\]]*\]`, KeywordType, nil}, + {`(')\([^)]*\)`, KeywordType, nil}, + {`\\(?![:!#$%&*+.\\/<=>?@^|~-]+)`, NameFunction, nil}, + {`(<-|::|->|=>|=)(?![:!#$%&*+.\\/<=>?@^|~-]+)`, OperatorWord, nil}, + {`:[:!#$%&*+.\\/<=>?@^|~-]*`, KeywordType, nil}, + {`[:!#$%&*+.\\/<=>?@^|~-]+`, Operator, nil}, + {`\d+[eE][+-]?\d+`, LiteralNumberFloat, nil}, + {`\d+\.\d+([eE][+-]?\d+)?`, LiteralNumberFloat, nil}, + {`0[oO][0-7]+`, LiteralNumberOct, nil}, + {`0[xX][\da-fA-F]+`, LiteralNumberHex, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`'`, LiteralStringChar, Push("character")}, + {`"`, LiteralString, Push("string")}, + {`\[\]`, KeywordType, nil}, + {`\(\)`, NameBuiltin, nil}, + {"[][(),;`{}]", Punctuation, nil}, + }, + "import": { + {`\s+`, Text, nil}, + {`"`, LiteralString, Push("string")}, + {`\)`, Punctuation, Pop(1)}, + {`qualified\b`, Keyword, nil}, + {`([A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊][\w.]*)(\s+)(as)(\s+)([A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊][\w.]*)`, ByGroups(NameNamespace, Text, Keyword, Text, Name), Pop(1)}, + {`([A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊][\w.]*)(\s+)(hiding)(\s+)(\()`, ByGroups(NameNamespace, Text, Keyword, Text, Punctuation), Push("funclist")}, + {`([A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊][\w.]*)(\s+)(\()`, ByGroups(NameNamespace, Text, Punctuation), Push("funclist")}, + {`[\w.]+`, NameNamespace, Pop(1)}, + }, + "module": { + {`\s+`, Text, nil}, + {`([A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊][\w.]*)(\s+)(\()`, ByGroups(NameNamespace, Text, Punctuation), Push("funclist")}, + {`[A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊][\w.]*`, NameNamespace, Pop(1)}, + }, + "funclist": { + {`\s+`, Text, nil}, + {`[A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊]\w*`, KeywordType, nil}, + {`(_[\w\']+|[a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķ-ĸĺļľŀłńņň-ʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌ-ƍƒƕƙ-ƛƞơƣƥƨƪ-ƫƭưƴƶƹ-ƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜ-ǝǟǡǣǥǧǩǫǭǯ-ǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿ-ɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐ-ϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻ-ϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎ-ӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧա-ևᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶ-ᾷιῂ-ῄῆ-ῇῐ-ΐῖ-ῗῠ-ῧῲ-ῴῶ-ῷℊℎ-ℏℓℯℴℹℼ-ℽⅆ-ⅉⅎↄⰰ-ⱞⱡⱥ-ⱦⱨⱪⱬⱱⱳ-ⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ-ⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓꞡꞣꞥꞧꞩꟺff-stﬓ-ﬗa-z𐐨-𐑏𝐚-𝐳𝑎-𝑔𝑖-𝑧𝒂-𝒛𝒶-𝒹𝒻𝒽-𝓃𝓅-𝓏𝓪-𝔃𝔞-𝔷𝕒-𝕫𝖆-𝖟𝖺-𝗓𝗮-𝘇𝘢-𝘻𝙖-𝙯𝚊-𝚥𝛂-𝛚𝛜-𝛡𝛼-𝜔𝜖-𝜛𝜶-𝝎𝝐-𝝕𝝰-𝞈𝞊-𝞏𝞪-𝟂𝟄-𝟉𝟋][\w\']*)`, NameFunction, nil}, + {`--(?![!#$%&*+./<=>?@^|_~:\\]).*?$`, CommentSingle, nil}, + {`\{-`, CommentMultiline, Push("comment")}, + {`,`, Punctuation, nil}, + {`[:!#$%&*+.\\/<=>?@^|~-]+`, Operator, nil}, + {`\(`, Punctuation, Push("funclist", "funclist")}, + {`\)`, Punctuation, Pop(2)}, + }, + "comment": { + {`[^-{}]+`, CommentMultiline, nil}, + {`\{-`, CommentMultiline, Push()}, + {`-\}`, CommentMultiline, Pop(1)}, + {`[-{}]`, CommentMultiline, nil}, + }, + "character": { + {`[^\\']'`, LiteralStringChar, Pop(1)}, + {`\\`, LiteralStringEscape, Push("escape")}, + {`'`, LiteralStringChar, Pop(1)}, + }, + "string": { + {`[^\\"]+`, LiteralString, nil}, + {`\\`, LiteralStringEscape, Push("escape")}, + {`"`, LiteralString, Pop(1)}, + }, + "escape": { + {`[abfnrtv"\'&\\]`, LiteralStringEscape, Pop(1)}, + {`\^[][A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΊΌΎ-ΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԱ-ՖႠ-ჅჇჍḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋꞍꞐꞒꞠꞢꞤꞦꞨꞪA-Z𐐀-𐐧𝐀-𝐙𝐴-𝑍𝑨-𝒁𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒵𝓐-𝓩𝔄-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔸-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕬-𝖅𝖠-𝖹𝗔-𝗭𝘈-𝘡𝘼-𝙕𝙰-𝚉𝚨-𝛀𝛢-𝛺𝜜-𝜴𝝖-𝝮𝞐-𝞨𝟊@^_]`, LiteralStringEscape, Pop(1)}, + {`NUL|SOH|[SE]TX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|S[OI]|DLE|DC[1-4]|NAK|SYN|ETB|CAN|EM|SUB|ESC|[FGRU]S|SP|DEL`, LiteralStringEscape, Pop(1)}, + {`o[0-7]+`, LiteralStringEscape, Pop(1)}, + {`x[\da-fA-F]+`, LiteralStringEscape, Pop(1)}, + {`\d+`, LiteralStringEscape, Pop(1)}, + {`\s+\\`, LiteralStringEscape, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/haxe.go b/vendor/github.com/alecthomas/chroma/lexers/haxe.go new file mode 100644 index 0000000..fd0b672 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/haxe.go @@ -0,0 +1,640 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Haxe lexer. +var Haxe = Register(MustNewLexer( + &Config{ + Name: "Haxe", + Aliases: []string{"hx", "haxe", "hxsl"}, + Filenames: []string{"*.hx", "*.hxsl"}, + MimeTypes: []string{"text/haxe", "text/x-haxe", "text/x-hx"}, + DotAll: true, + }, + Rules{ + "root": { + Include("spaces"), + Include("meta"), + {`(?:package)\b`, KeywordNamespace, Push("semicolon", "package")}, + {`(?:import)\b`, KeywordNamespace, Push("semicolon", "import")}, + {`(?:using)\b`, KeywordNamespace, Push("semicolon", "using")}, + {`(?:extern|private)\b`, KeywordDeclaration, nil}, + {`(?:abstract)\b`, KeywordDeclaration, Push("abstract")}, + {`(?:class|interface)\b`, KeywordDeclaration, Push("class")}, + {`(?:enum)\b`, KeywordDeclaration, Push("enum")}, + {`(?:typedef)\b`, KeywordDeclaration, Push("typedef")}, + {`(?=.)`, Text, Push("expr-statement")}, + }, + "spaces": { + {`\s+`, Text, nil}, + {`//[^\n\r]*`, CommentSingle, nil}, + {`/\*.*?\*/`, CommentMultiline, nil}, + {`(#)(if|elseif|else|end|error)\b`, CommentPreproc, MutatorFunc(haxePreProcMutator)}, + }, + "string-single-interpol": { + {`\$\{`, LiteralStringInterpol, Push("string-interpol-close", "expr")}, + {`\$\$`, LiteralStringEscape, nil}, + {`\$(?=(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+))`, LiteralStringInterpol, Push("ident")}, + Include("string-single"), + }, + "string-single": { + {`'`, LiteralStringSingle, Pop(1)}, + {`\\.`, LiteralStringEscape, nil}, + {`.`, LiteralStringSingle, nil}, + }, + "string-double": { + {`"`, LiteralStringDouble, Pop(1)}, + {`\\.`, LiteralStringEscape, nil}, + {`.`, LiteralStringDouble, nil}, + }, + "string-interpol-close": { + {`\$(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, LiteralStringInterpol, nil}, + {`\}`, LiteralStringInterpol, Pop(1)}, + }, + "package": { + Include("spaces"), + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, NameNamespace, nil}, + {`\.`, Punctuation, Push("import-ident")}, + Default(Pop(1)), + }, + "import": { + Include("spaces"), + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, NameNamespace, nil}, + {`\*`, Keyword, nil}, + {`\.`, Punctuation, Push("import-ident")}, + {`in`, KeywordNamespace, Push("ident")}, + Default(Pop(1)), + }, + "import-ident": { + Include("spaces"), + {`\*`, Keyword, Pop(1)}, + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, NameNamespace, Pop(1)}, + }, + "using": { + Include("spaces"), + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, NameNamespace, nil}, + {`\.`, Punctuation, Push("import-ident")}, + Default(Pop(1)), + }, + "preproc-error": { + {`\s+`, CommentPreproc, nil}, + {`'`, LiteralStringSingle, Push("#pop", "string-single")}, + {`"`, LiteralStringDouble, Push("#pop", "string-double")}, + Default(Pop(1)), + }, + "preproc-expr": { + {`\s+`, CommentPreproc, nil}, + {`\!`, CommentPreproc, nil}, + {`\(`, CommentPreproc, Push("#pop", "preproc-parenthesis")}, + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, CommentPreproc, Pop(1)}, + {`\.[0-9]+`, LiteralNumberFloat, nil}, + {`[0-9]+[eE][+\-]?[0-9]+`, LiteralNumberFloat, nil}, + {`[0-9]+\.[0-9]*[eE][+\-]?[0-9]+`, LiteralNumberFloat, nil}, + {`[0-9]+\.[0-9]+`, LiteralNumberFloat, nil}, + {`[0-9]+\.(?!(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)|\.\.)`, LiteralNumberFloat, nil}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`'`, LiteralStringSingle, Push("#pop", "string-single")}, + {`"`, LiteralStringDouble, Push("#pop", "string-double")}, + }, + "preproc-parenthesis": { + {`\s+`, CommentPreproc, nil}, + {`\)`, CommentPreproc, Pop(1)}, + Default(Push("preproc-expr-in-parenthesis")), + }, + "preproc-expr-chain": { + {`\s+`, CommentPreproc, nil}, + {`(?:%=|&=|\|=|\^=|\+=|\-=|\*=|/=|<<=|>\s*>\s*=|>\s*>\s*>\s*=|==|!=|<=|>\s*=|&&|\|\||<<|>>>|>\s*>|\.\.\.|<|>|%|&|\||\^|\+|\*|/|\-|=>|=)`, CommentPreproc, Push("#pop", "preproc-expr-in-parenthesis")}, + Default(Pop(1)), + }, + "preproc-expr-in-parenthesis": { + {`\s+`, CommentPreproc, nil}, + {`\!`, CommentPreproc, nil}, + {`\(`, CommentPreproc, Push("#pop", "preproc-expr-chain", "preproc-parenthesis")}, + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, CommentPreproc, Push("#pop", "preproc-expr-chain")}, + {`\.[0-9]+`, LiteralNumberFloat, Push("#pop", "preproc-expr-chain")}, + {`[0-9]+[eE][+\-]?[0-9]+`, LiteralNumberFloat, Push("#pop", "preproc-expr-chain")}, + {`[0-9]+\.[0-9]*[eE][+\-]?[0-9]+`, LiteralNumberFloat, Push("#pop", "preproc-expr-chain")}, + {`[0-9]+\.[0-9]+`, LiteralNumberFloat, Push("#pop", "preproc-expr-chain")}, + {`[0-9]+\.(?!(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)|\.\.)`, LiteralNumberFloat, Push("#pop", "preproc-expr-chain")}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, Push("#pop", "preproc-expr-chain")}, + {`[0-9]+`, LiteralNumberInteger, Push("#pop", "preproc-expr-chain")}, + {`'`, LiteralStringSingle, Push("#pop", "preproc-expr-chain", "string-single")}, + {`"`, LiteralStringDouble, Push("#pop", "preproc-expr-chain", "string-double")}, + }, + "abstract": { + Include("spaces"), + Default(Pop(1), Push("abstract-body"), Push("abstract-relation"), Push("abstract-opaque"), Push("type-param-constraint"), Push("type-name")), + }, + "abstract-body": { + Include("spaces"), + {`\{`, Punctuation, Push("#pop", "class-body")}, + }, + "abstract-opaque": { + Include("spaces"), + {`\(`, Punctuation, Push("#pop", "parenthesis-close", "type")}, + Default(Pop(1)), + }, + "abstract-relation": { + Include("spaces"), + {`(?:to|from)`, KeywordDeclaration, Push("type")}, + {`,`, Punctuation, nil}, + Default(Pop(1)), + }, + "meta": { + Include("spaces"), + {`@`, NameDecorator, Push("meta-body", "meta-ident", "meta-colon")}, + }, + "meta-colon": { + Include("spaces"), + {`:`, NameDecorator, Pop(1)}, + Default(Pop(1)), + }, + "meta-ident": { + Include("spaces"), + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, NameDecorator, Pop(1)}, + }, + "meta-body": { + Include("spaces"), + {`\(`, NameDecorator, Push("#pop", "meta-call")}, + Default(Pop(1)), + }, + "meta-call": { + Include("spaces"), + {`\)`, NameDecorator, Pop(1)}, + Default(Pop(1), Push("meta-call-sep"), Push("expr")), + }, + "meta-call-sep": { + Include("spaces"), + {`\)`, NameDecorator, Pop(1)}, + {`,`, Punctuation, Push("#pop", "meta-call")}, + }, + "typedef": { + Include("spaces"), + Default(Pop(1), Push("typedef-body"), Push("type-param-constraint"), Push("type-name")), + }, + "typedef-body": { + Include("spaces"), + {`=`, Operator, Push("#pop", "optional-semicolon", "type")}, + }, + "enum": { + Include("spaces"), + Default(Pop(1), Push("enum-body"), Push("bracket-open"), Push("type-param-constraint"), Push("type-name")), + }, + "enum-body": { + Include("spaces"), + Include("meta"), + {`\}`, Punctuation, Pop(1)}, + {`(?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Name, Push("enum-member", "type-param-constraint")}, + }, + "enum-member": { + Include("spaces"), + {`\(`, Punctuation, Push("#pop", "semicolon", "flag", "function-param")}, + Default(Pop(1), Push("semicolon"), Push("flag")), + }, + "class": { + Include("spaces"), + Default(Pop(1), Push("class-body"), Push("bracket-open"), Push("extends"), Push("type-param-constraint"), Push("type-name")), + }, + "extends": { + Include("spaces"), + {`(?:extends|implements)\b`, KeywordDeclaration, Push("type")}, + {`,`, Punctuation, nil}, + Default(Pop(1)), + }, + "bracket-open": { + Include("spaces"), + {`\{`, Punctuation, Pop(1)}, + }, + "bracket-close": { + Include("spaces"), + {`\}`, Punctuation, Pop(1)}, + }, + "class-body": { + Include("spaces"), + Include("meta"), + {`\}`, Punctuation, Pop(1)}, + {`(?:static|public|private|override|dynamic|inline|macro)\b`, KeywordDeclaration, nil}, + Default(Push("class-member")), + }, + "class-member": { + Include("spaces"), + {`(var)\b`, KeywordDeclaration, Push("#pop", "optional-semicolon", "var")}, + {`(function)\b`, KeywordDeclaration, Push("#pop", "optional-semicolon", "class-method")}, + }, + "function-local": { + Include("spaces"), + {`(?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, NameFunction, Push("#pop", "optional-expr", "flag", "function-param", "parenthesis-open", "type-param-constraint")}, + Default(Pop(1), Push("optional-expr"), Push("flag"), Push("function-param"), Push("parenthesis-open"), Push("type-param-constraint")), + }, + "optional-expr": { + Include("spaces"), + Include("expr"), + Default(Pop(1)), + }, + "class-method": { + Include("spaces"), + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, NameFunction, Push("#pop", "optional-expr", "flag", "function-param", "parenthesis-open", "type-param-constraint")}, + }, + "function-param": { + Include("spaces"), + {`\)`, Punctuation, Pop(1)}, + {`\?`, Punctuation, nil}, + {`(?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Name, Push("#pop", "function-param-sep", "assign", "flag")}, + }, + "function-param-sep": { + Include("spaces"), + {`\)`, Punctuation, Pop(1)}, + {`,`, Punctuation, Push("#pop", "function-param")}, + }, + "prop-get-set": { + Include("spaces"), + {`\(`, Punctuation, Push("#pop", "parenthesis-close", "prop-get-set-opt", "comma", "prop-get-set-opt")}, + Default(Pop(1)), + }, + "prop-get-set-opt": { + Include("spaces"), + {`(?:default|null|never|dynamic|get|set)\b`, Keyword, Pop(1)}, + {`(?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Text, Pop(1)}, + }, + "expr-statement": { + Include("spaces"), + Default(Pop(1), Push("optional-semicolon"), Push("expr")), + }, + "expr": { + Include("spaces"), + {`@`, NameDecorator, Push("#pop", "optional-expr", "meta-body", "meta-ident", "meta-colon")}, + {`(?:\+\+|\-\-|~(?!/)|!|\-)`, Operator, nil}, + {`\(`, Punctuation, Push("#pop", "expr-chain", "parenthesis")}, + {`(?:static|public|private|override|dynamic|inline)\b`, KeywordDeclaration, nil}, + {`(?:function)\b`, KeywordDeclaration, Push("#pop", "expr-chain", "function-local")}, + {`\{`, Punctuation, Push("#pop", "expr-chain", "bracket")}, + {`(?:true|false|null)\b`, KeywordConstant, Push("#pop", "expr-chain")}, + {`(?:this)\b`, Keyword, Push("#pop", "expr-chain")}, + {`(?:cast)\b`, Keyword, Push("#pop", "expr-chain", "cast")}, + {`(?:try)\b`, Keyword, Push("#pop", "catch", "expr")}, + {`(?:var)\b`, KeywordDeclaration, Push("#pop", "var")}, + {`(?:new)\b`, Keyword, Push("#pop", "expr-chain", "new")}, + {`(?:switch)\b`, Keyword, Push("#pop", "switch")}, + {`(?:if)\b`, Keyword, Push("#pop", "if")}, + {`(?:do)\b`, Keyword, Push("#pop", "do")}, + {`(?:while)\b`, Keyword, Push("#pop", "while")}, + {`(?:for)\b`, Keyword, Push("#pop", "for")}, + {`(?:untyped|throw)\b`, Keyword, nil}, + {`(?:return)\b`, Keyword, Push("#pop", "optional-expr")}, + {`(?:macro)\b`, Keyword, Push("#pop", "macro")}, + {`(?:continue|break)\b`, Keyword, Pop(1)}, + {`(?:\$\s*[a-z]\b|\$(?!(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)))`, Name, Push("#pop", "dollar")}, + {`(?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Name, Push("#pop", "expr-chain")}, + {`\.[0-9]+`, LiteralNumberFloat, Push("#pop", "expr-chain")}, + {`[0-9]+[eE][+\-]?[0-9]+`, LiteralNumberFloat, Push("#pop", "expr-chain")}, + {`[0-9]+\.[0-9]*[eE][+\-]?[0-9]+`, LiteralNumberFloat, Push("#pop", "expr-chain")}, + {`[0-9]+\.[0-9]+`, LiteralNumberFloat, Push("#pop", "expr-chain")}, + {`[0-9]+\.(?!(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)|\.\.)`, LiteralNumberFloat, Push("#pop", "expr-chain")}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, Push("#pop", "expr-chain")}, + {`[0-9]+`, LiteralNumberInteger, Push("#pop", "expr-chain")}, + {`'`, LiteralStringSingle, Push("#pop", "expr-chain", "string-single-interpol")}, + {`"`, LiteralStringDouble, Push("#pop", "expr-chain", "string-double")}, + {`~/(\\\\|\\/|[^/\n])*/[gimsu]*`, LiteralStringRegex, Push("#pop", "expr-chain")}, + {`\[`, Punctuation, Push("#pop", "expr-chain", "array-decl")}, + }, + "expr-chain": { + Include("spaces"), + {`(?:\+\+|\-\-)`, Operator, nil}, + {`(?:%=|&=|\|=|\^=|\+=|\-=|\*=|/=|<<=|>\s*>\s*=|>\s*>\s*>\s*=|==|!=|<=|>\s*=|&&|\|\||<<|>>>|>\s*>|\.\.\.|<|>|%|&|\||\^|\+|\*|/|\-|=>|=)`, Operator, Push("#pop", "expr")}, + {`(?:in)\b`, Keyword, Push("#pop", "expr")}, + {`\?`, Operator, Push("#pop", "expr", "ternary", "expr")}, + {`(\.)((?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+))`, ByGroups(Punctuation, Name), nil}, + {`\[`, Punctuation, Push("array-access")}, + {`\(`, Punctuation, Push("call")}, + Default(Pop(1)), + }, + "macro": { + Include("spaces"), + Include("meta"), + {`:`, Punctuation, Push("#pop", "type")}, + {`(?:extern|private)\b`, KeywordDeclaration, nil}, + {`(?:abstract)\b`, KeywordDeclaration, Push("#pop", "optional-semicolon", "abstract")}, + {`(?:class|interface)\b`, KeywordDeclaration, Push("#pop", "optional-semicolon", "macro-class")}, + {`(?:enum)\b`, KeywordDeclaration, Push("#pop", "optional-semicolon", "enum")}, + {`(?:typedef)\b`, KeywordDeclaration, Push("#pop", "optional-semicolon", "typedef")}, + Default(Pop(1), Push("expr")), + }, + "macro-class": { + {`\{`, Punctuation, Push("#pop", "class-body")}, + Include("class"), + }, + "cast": { + Include("spaces"), + {`\(`, Punctuation, Push("#pop", "parenthesis-close", "cast-type", "expr")}, + Default(Pop(1), Push("expr")), + }, + "cast-type": { + Include("spaces"), + {`,`, Punctuation, Push("#pop", "type")}, + Default(Pop(1)), + }, + "catch": { + Include("spaces"), + {`(?:catch)\b`, Keyword, Push("expr", "function-param", "parenthesis-open")}, + Default(Pop(1)), + }, + "do": { + Include("spaces"), + Default(Pop(1), Push("do-while"), Push("expr")), + }, + "do-while": { + Include("spaces"), + {`(?:while)\b`, Keyword, Push("#pop", "parenthesis", "parenthesis-open")}, + }, + "while": { + Include("spaces"), + {`\(`, Punctuation, Push("#pop", "expr", "parenthesis")}, + }, + "for": { + Include("spaces"), + {`\(`, Punctuation, Push("#pop", "expr", "parenthesis")}, + }, + "if": { + Include("spaces"), + {`\(`, Punctuation, Push("#pop", "else", "optional-semicolon", "expr", "parenthesis")}, + }, + "else": { + Include("spaces"), + {`(?:else)\b`, Keyword, Push("#pop", "expr")}, + Default(Pop(1)), + }, + "switch": { + Include("spaces"), + Default(Pop(1), Push("switch-body"), Push("bracket-open"), Push("expr")), + }, + "switch-body": { + Include("spaces"), + {`(?:case|default)\b`, Keyword, Push("case-block", "case")}, + {`\}`, Punctuation, Pop(1)}, + }, + "case": { + Include("spaces"), + {`:`, Punctuation, Pop(1)}, + Default(Pop(1), Push("case-sep"), Push("case-guard"), Push("expr")), + }, + "case-sep": { + Include("spaces"), + {`:`, Punctuation, Pop(1)}, + {`,`, Punctuation, Push("#pop", "case")}, + }, + "case-guard": { + Include("spaces"), + {`(?:if)\b`, Keyword, Push("#pop", "parenthesis", "parenthesis-open")}, + Default(Pop(1)), + }, + "case-block": { + Include("spaces"), + {`(?!(?:case|default)\b|\})`, Keyword, Push("expr-statement")}, + Default(Pop(1)), + }, + "new": { + Include("spaces"), + Default(Pop(1), Push("call"), Push("parenthesis-open"), Push("type")), + }, + "array-decl": { + Include("spaces"), + {`\]`, Punctuation, Pop(1)}, + Default(Pop(1), Push("array-decl-sep"), Push("expr")), + }, + "array-decl-sep": { + Include("spaces"), + {`\]`, Punctuation, Pop(1)}, + {`,`, Punctuation, Push("#pop", "array-decl")}, + }, + "array-access": { + Include("spaces"), + Default(Pop(1), Push("array-access-close"), Push("expr")), + }, + "array-access-close": { + Include("spaces"), + {`\]`, Punctuation, Pop(1)}, + }, + "comma": { + Include("spaces"), + {`,`, Punctuation, Pop(1)}, + }, + "colon": { + Include("spaces"), + {`:`, Punctuation, Pop(1)}, + }, + "semicolon": { + Include("spaces"), + {`;`, Punctuation, Pop(1)}, + }, + "optional-semicolon": { + Include("spaces"), + {`;`, Punctuation, Pop(1)}, + Default(Pop(1)), + }, + "ident": { + Include("spaces"), + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Name, Pop(1)}, + }, + "dollar": { + Include("spaces"), + {`\{`, Punctuation, Push("#pop", "expr-chain", "bracket-close", "expr")}, + Default(Pop(1), Push("expr-chain")), + }, + "type-name": { + Include("spaces"), + {`_*[A-Z]\w*`, Name, Pop(1)}, + }, + "type-full-name": { + Include("spaces"), + {`\.`, Punctuation, Push("ident")}, + Default(Pop(1)), + }, + "type": { + Include("spaces"), + {`\?`, Punctuation, nil}, + {`(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Name, Push("#pop", "type-check", "type-full-name")}, + {`\{`, Punctuation, Push("#pop", "type-check", "type-struct")}, + {`\(`, Punctuation, Push("#pop", "type-check", "type-parenthesis")}, + }, + "type-parenthesis": { + Include("spaces"), + Default(Pop(1), Push("parenthesis-close"), Push("type")), + }, + "type-check": { + Include("spaces"), + {`->`, Punctuation, Push("#pop", "type")}, + {`<(?!=)`, Punctuation, Push("type-param")}, + Default(Pop(1)), + }, + "type-struct": { + Include("spaces"), + {`\}`, Punctuation, Pop(1)}, + {`\?`, Punctuation, nil}, + {`>`, Punctuation, Push("comma", "type")}, + {`(?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Name, Push("#pop", "type-struct-sep", "type", "colon")}, + Include("class-body"), + }, + "type-struct-sep": { + Include("spaces"), + {`\}`, Punctuation, Pop(1)}, + {`,`, Punctuation, Push("#pop", "type-struct")}, + }, + "type-param-type": { + {`\.[0-9]+`, LiteralNumberFloat, Pop(1)}, + {`[0-9]+[eE][+\-]?[0-9]+`, LiteralNumberFloat, Pop(1)}, + {`[0-9]+\.[0-9]*[eE][+\-]?[0-9]+`, LiteralNumberFloat, Pop(1)}, + {`[0-9]+\.[0-9]+`, LiteralNumberFloat, Pop(1)}, + {`[0-9]+\.(?!(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)|\.\.)`, LiteralNumberFloat, Pop(1)}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, Pop(1)}, + {`[0-9]+`, LiteralNumberInteger, Pop(1)}, + {`'`, LiteralStringSingle, Push("#pop", "string-single")}, + {`"`, LiteralStringDouble, Push("#pop", "string-double")}, + {`~/(\\\\|\\/|[^/\n])*/[gim]*`, LiteralStringRegex, Pop(1)}, + {`\[`, Operator, Push("#pop", "array-decl")}, + Include("type"), + }, + "type-param": { + Include("spaces"), + Default(Pop(1), Push("type-param-sep"), Push("type-param-type")), + }, + "type-param-sep": { + Include("spaces"), + {`>`, Punctuation, Pop(1)}, + {`,`, Punctuation, Push("#pop", "type-param")}, + }, + "type-param-constraint": { + Include("spaces"), + {`<(?!=)`, Punctuation, Push("#pop", "type-param-constraint-sep", "type-param-constraint-flag", "type-name")}, + Default(Pop(1)), + }, + "type-param-constraint-sep": { + Include("spaces"), + {`>`, Punctuation, Pop(1)}, + {`,`, Punctuation, Push("#pop", "type-param-constraint-sep", "type-param-constraint-flag", "type-name")}, + }, + "type-param-constraint-flag": { + Include("spaces"), + {`:`, Punctuation, Push("#pop", "type-param-constraint-flag-type")}, + Default(Pop(1)), + }, + "type-param-constraint-flag-type": { + Include("spaces"), + {`\(`, Punctuation, Push("#pop", "type-param-constraint-flag-type-sep", "type")}, + Default(Pop(1), Push("type")), + }, + "type-param-constraint-flag-type-sep": { + Include("spaces"), + {`\)`, Punctuation, Pop(1)}, + {`,`, Punctuation, Push("type")}, + }, + "parenthesis": { + Include("spaces"), + Default(Pop(1), Push("parenthesis-close"), Push("flag"), Push("expr")), + }, + "parenthesis-open": { + Include("spaces"), + {`\(`, Punctuation, Pop(1)}, + }, + "parenthesis-close": { + Include("spaces"), + {`\)`, Punctuation, Pop(1)}, + }, + "var": { + Include("spaces"), + {`(?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Text, Push("#pop", "var-sep", "assign", "flag", "prop-get-set")}, + }, + "var-sep": { + Include("spaces"), + {`,`, Punctuation, Push("#pop", "var")}, + Default(Pop(1)), + }, + "assign": { + Include("spaces"), + {`=`, Operator, Push("#pop", "expr")}, + Default(Pop(1)), + }, + "flag": { + Include("spaces"), + {`:`, Punctuation, Push("#pop", "type")}, + Default(Pop(1)), + }, + "ternary": { + Include("spaces"), + {`:`, Operator, Pop(1)}, + }, + "call": { + Include("spaces"), + {`\)`, Punctuation, Pop(1)}, + Default(Pop(1), Push("call-sep"), Push("expr")), + }, + "call-sep": { + Include("spaces"), + {`\)`, Punctuation, Pop(1)}, + {`,`, Punctuation, Push("#pop", "call")}, + }, + "bracket": { + Include("spaces"), + {`(?!(?:\$\s*[a-z]\b|\$(?!(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+))))(?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Name, Push("#pop", "bracket-check")}, + {`'`, LiteralStringSingle, Push("#pop", "bracket-check", "string-single")}, + {`"`, LiteralStringDouble, Push("#pop", "bracket-check", "string-double")}, + Default(Pop(1), Push("block")), + }, + "bracket-check": { + Include("spaces"), + {`:`, Punctuation, Push("#pop", "object-sep", "expr")}, + Default(Pop(1), Push("block"), Push("optional-semicolon"), Push("expr-chain")), + }, + "block": { + Include("spaces"), + {`\}`, Punctuation, Pop(1)}, + Default(Push("expr-statement")), + }, + "object": { + Include("spaces"), + {`\}`, Punctuation, Pop(1)}, + Default(Pop(1), Push("object-sep"), Push("expr"), Push("colon"), Push("ident-or-string")), + }, + "ident-or-string": { + Include("spaces"), + {`(?!(?:function|class|static|var|if|else|while|do|for|break|return|continue|extends|implements|import|switch|case|default|public|private|try|untyped|catch|new|this|throw|extern|enum|in|interface|cast|override|dynamic|typedef|package|inline|using|null|true|false|abstract)\b)(?:_*[a-z]\w*|_+[0-9]\w*|_*[A-Z]\w*|_+|\$\w+)`, Name, Pop(1)}, + {`'`, LiteralStringSingle, Push("#pop", "string-single")}, + {`"`, LiteralStringDouble, Push("#pop", "string-double")}, + }, + "object-sep": { + Include("spaces"), + {`\}`, Punctuation, Pop(1)}, + {`,`, Punctuation, Push("#pop", "object")}, + }, + }, +)) + +func haxePreProcMutator(state *LexerState) error { + stack, ok := state.Get("haxe-pre-proc").([][]string) + if !ok { + stack = [][]string{} + } + + proc := state.Groups[2] + if proc == "if" { + stack = append(stack, state.Stack) + } else if proc == "else" || proc == "elseif" { + if len(stack) > 0 { + state.Stack = stack[len(stack)-1] + } + } else if proc == "end" { + stack = stack[:len(stack)-1] + } + + if proc == "if" || proc == "elseif" { + state.Stack = append(state.Stack, "preproc-expr") + } + + if proc == "error" { + state.Stack = append(state.Stack, "preproc-error") + } + state.Set("haxe-pre-proc", stack) + return nil +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/hexdump.go b/vendor/github.com/alecthomas/chroma/lexers/hexdump.go new file mode 100644 index 0000000..e6e427f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/hexdump.go @@ -0,0 +1,66 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Hexdump lexer. +var Hexdump = Register(MustNewLexer( + &Config{ + Name: "Hexdump", + Aliases: []string{"hexdump"}, + Filenames: []string{}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`\n`, Text, nil}, + Include("offset"), + {`([0-9A-Ha-h]{2})(\-)([0-9A-Ha-h]{2})`, ByGroups(LiteralNumberHex, Punctuation, LiteralNumberHex), nil}, + {`[0-9A-Ha-h]{2}`, LiteralNumberHex, nil}, + {`(\s{2,3})(\>)(.{16})(\<)$`, ByGroups(Text, Punctuation, LiteralString, Punctuation), Push("bracket-strings")}, + {`(\s{2,3})(\|)(.{16})(\|)$`, ByGroups(Text, Punctuation, LiteralString, Punctuation), Push("piped-strings")}, + {`(\s{2,3})(\>)(.{1,15})(\<)$`, ByGroups(Text, Punctuation, LiteralString, Punctuation), nil}, + {`(\s{2,3})(\|)(.{1,15})(\|)$`, ByGroups(Text, Punctuation, LiteralString, Punctuation), nil}, + {`(\s{2,3})(.{1,15})$`, ByGroups(Text, LiteralString), nil}, + {`(\s{2,3})(.{16}|.{20})$`, ByGroups(Text, LiteralString), Push("nonpiped-strings")}, + {`\s`, Text, nil}, + {`^\*`, Punctuation, nil}, + }, + "offset": { + {`^([0-9A-Ha-h]+)(:)`, ByGroups(NameLabel, Punctuation), Push("offset-mode")}, + {`^[0-9A-Ha-h]+`, NameLabel, nil}, + }, + "offset-mode": { + {`\s`, Text, Pop(1)}, + {`[0-9A-Ha-h]+`, NameLabel, nil}, + {`:`, Punctuation, nil}, + }, + "piped-strings": { + {`\n`, Text, nil}, + Include("offset"), + {`[0-9A-Ha-h]{2}`, LiteralNumberHex, nil}, + {`(\s{2,3})(\|)(.{1,16})(\|)$`, ByGroups(Text, Punctuation, LiteralString, Punctuation), nil}, + {`\s`, Text, nil}, + {`^\*`, Punctuation, nil}, + }, + "bracket-strings": { + {`\n`, Text, nil}, + Include("offset"), + {`[0-9A-Ha-h]{2}`, LiteralNumberHex, nil}, + {`(\s{2,3})(\>)(.{1,16})(\<)$`, ByGroups(Text, Punctuation, LiteralString, Punctuation), nil}, + {`\s`, Text, nil}, + {`^\*`, Punctuation, nil}, + }, + "nonpiped-strings": { + {`\n`, Text, nil}, + Include("offset"), + {`([0-9A-Ha-h]{2})(\-)([0-9A-Ha-h]{2})`, ByGroups(LiteralNumberHex, Punctuation, LiteralNumberHex), nil}, + {`[0-9A-Ha-h]{2}`, LiteralNumberHex, nil}, + {`(\s{19,})(.{1,20}?)$`, ByGroups(Text, LiteralString), nil}, + {`(\s{2,3})(.{1,20})$`, ByGroups(Text, LiteralString), nil}, + {`\s`, Text, nil}, + {`^\*`, Punctuation, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/html.go b/vendor/github.com/alecthomas/chroma/lexers/html.go new file mode 100644 index 0000000..b48e8d2 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/html.go @@ -0,0 +1,56 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// HTML lexer. +var HTML = Register(MustNewLexer( + &Config{ + Name: "HTML", + Aliases: []string{"html"}, + Filenames: []string{"*.html", "*.htm", "*.xhtml", "*.xslt"}, + MimeTypes: []string{"text/html", "application/xhtml+xml"}, + NotMultiline: true, + DotAll: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`[^<&]+`, Text, nil}, + {`&\S*?;`, NameEntity, nil}, + {`\<\!\[CDATA\[.*?\]\]\>`, CommentPreproc, nil}, + {``, Comment, Pop(1)}, + {`-`, Comment, nil}, + }, + "tag": { + {`\s+`, Text, nil}, + {`([\w:-]+\s*)(=)(\s*)`, ByGroups(NameAttribute, Operator, Text), Push("attr")}, + {`[\w:-]+`, NameAttribute, nil}, + {`(/?)(\s*)(>)`, ByGroups(Punctuation, Text, Punctuation), Pop(1)}, + }, + "script-content": { + {`(<)(\s*)(/)(\s*)(script)(\s*)(>)`, ByGroups(Punctuation, Text, Punctuation, Text, NameTag, Text, Punctuation), Pop(1)}, + {`.+?(?=<\s*/\s*script\s*>)`, Using(Javascript, nil), nil}, + }, + "style-content": { + {`(<)(\s*)(/)(\s*)(style)(\s*)(>)`, ByGroups(Punctuation, Text, Punctuation, Text, NameTag, Text, Punctuation), Pop(1)}, + {`.+?(?=<\s*/\s*style\s*>)`, Using(CSS, nil), nil}, + }, + "attr": { + {`".*?"`, LiteralString, Pop(1)}, + {`'.*?'`, LiteralString, Pop(1)}, + {`[^\s>]+`, LiteralString, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/hy.go b/vendor/github.com/alecthomas/chroma/lexers/hy.go new file mode 100644 index 0000000..ff1be32 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/hy.go @@ -0,0 +1,50 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Hy lexer. +var Hy = Register(MustNewLexer( + &Config{ + Name: "Hy", + Aliases: []string{"hylang"}, + Filenames: []string{"*.hy"}, + MimeTypes: []string{"text/x-hy", "application/x-hy"}, + }, + Rules{ + "root": { + {`;.*$`, CommentSingle, nil}, + {`[,\s]+`, Text, nil}, + {`-?\d+\.\d+`, LiteralNumberFloat, nil}, + {`-?\d+`, LiteralNumberInteger, nil}, + {`0[0-7]+j?`, LiteralNumberOct, nil}, + {`0[xX][a-fA-F0-9]+`, LiteralNumberHex, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`'(?!#)[\w!$%*+<=>?/.#-]+`, LiteralStringSymbol, nil}, + {`\\(.|[a-z]+)`, LiteralStringChar, nil}, + {`^(\s*)([rRuU]{,2}"""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringDoc), nil}, + {`^(\s*)([rRuU]{,2}'''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringDoc), nil}, + {`::?(?!#)[\w!$%*+<=>?/.#-]+`, LiteralStringSymbol, nil}, + {"~@|[`\\'#^~&@]", Operator, nil}, + Include("py-keywords"), + Include("py-builtins"), + {Words(``, ` `, `cond`, `for`, `->`, `->>`, `car`, `cdr`, `first`, `rest`, `let`, `when`, `unless`, `import`, `do`, `progn`, `get`, `slice`, `assoc`, `with-decorator`, `,`, `list_comp`, `kwapply`, `~`, `is`, `in`, `is-not`, `not-in`, `quasiquote`, `unquote`, `unquote-splice`, `quote`, `|`, `<<=`, `>>=`, `foreach`, `while`, `eval-and-compile`, `eval-when-compile`), Keyword, nil}, + {Words(``, ` `, `def`, `defn`, `defun`, `defmacro`, `defclass`, `lambda`, `fn`, `setv`), KeywordDeclaration, nil}, + {Words(``, ` `, `cycle`, `dec`, `distinct`, `drop`, `even?`, `filter`, `inc`, `instance?`, `iterable?`, `iterate`, `iterator?`, `neg?`, `none?`, `nth`, `numeric?`, `odd?`, `pos?`, `remove`, `repeat`, `repeatedly`, `take`, `take_nth`, `take_while`, `zero?`), NameBuiltin, nil}, + {`(?<=\()(?!#)[\w!$%*+<=>?/.#-]+`, NameFunction, nil}, + {`(?!#)[\w!$%*+<=>?/.#-]+`, NameVariable, nil}, + {`(\[|\])`, Punctuation, nil}, + {`(\{|\})`, Punctuation, nil}, + {`(\(|\))`, Punctuation, nil}, + }, + "py-keywords": { + {Words(``, `\b`, `assert`, `break`, `continue`, `del`, `elif`, `else`, `except`, `exec`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `print`, `raise`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, + }, + "py-builtins": { + {Words(`(??@^|_~:\\]).*?)$`, ByGroups(Text, CommentSingle), nil}, + {`(\s*)(\|{3}.*?)$`, ByGroups(Text, CommentSingle), nil}, + {`(\s*)(\{-)`, ByGroups(Text, CommentMultiline), Push("comment")}, + {`^(\s*)([^\s(){}]+)(\s*)(:)(\s*)`, ByGroups(Text, NameFunction, Text, OperatorWord, Text), nil}, + {`\b(case|class|data|default|using|do|else|if|in|infix[lr]?|instance|rewrite|auto|namespace|codata|mutual|private|public|abstract|total|partial|let|proof|of|then|static|where|_|with|pattern|term|syntax|prefix|postulate|parameters|record|dsl|impossible|implicit|tactics|intros|intro|compute|refine|exact|trivial)(?!\')\b`, KeywordReserved, nil}, + {`(import|module)(\s+)`, ByGroups(KeywordReserved, Text), Push("module")}, + {`('')?[A-Z][\w\']*`, KeywordType, nil}, + {`[a-z][\w\']*`, Text, nil}, + {`(<-|::|->|=>|=)`, OperatorWord, nil}, + {`([(){}\[\]:!#$%&*+.\\/<=>?@^|~-]+)`, OperatorWord, nil}, + {`\d+[eE][+-]?\d+`, LiteralNumberFloat, nil}, + {`\d+\.\d+([eE][+-]?\d+)?`, LiteralNumberFloat, nil}, + {`0[xX][\da-fA-F]+`, LiteralNumberHex, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`'`, LiteralStringChar, Push("character")}, + {`"`, LiteralString, Push("string")}, + {`[^\s(){}]+`, Text, nil}, + {`\s+?`, Text, nil}, + }, + "module": { + {`\s+`, Text, nil}, + {`([A-Z][\w.]*)(\s+)(\()`, ByGroups(NameNamespace, Text, Punctuation), Push("funclist")}, + {`[A-Z][\w.]*`, NameNamespace, Pop(1)}, + }, + "funclist": { + {`\s+`, Text, nil}, + {`[A-Z]\w*`, KeywordType, nil}, + {`(_[\w\']+|[a-z][\w\']*)`, NameFunction, nil}, + {`--.*$`, CommentSingle, nil}, + {`\{-`, CommentMultiline, Push("comment")}, + {`,`, Punctuation, nil}, + {`[:!#$%&*+.\\/<=>?@^|~-]+`, Operator, nil}, + {`\(`, Punctuation, Push("funclist", "funclist")}, + {`\)`, Punctuation, Pop(2)}, + }, + "comment": { + {`[^-{}]+`, CommentMultiline, nil}, + {`\{-`, CommentMultiline, Push()}, + {`-\}`, CommentMultiline, Pop(1)}, + {`[-{}]`, CommentMultiline, nil}, + }, + "character": { + {`[^\\']`, LiteralStringChar, nil}, + {`\\`, LiteralStringEscape, Push("escape")}, + {`'`, LiteralStringChar, Pop(1)}, + }, + "string": { + {`[^\\"]+`, LiteralString, nil}, + {`\\`, LiteralStringEscape, Push("escape")}, + {`"`, LiteralString, Pop(1)}, + }, + "escape": { + {`[abfnrtv"\'&\\]`, LiteralStringEscape, Pop(1)}, + {`\^[][A-Z@^_]`, LiteralStringEscape, Pop(1)}, + {`NUL|SOH|[SE]TX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|S[OI]|DLE|DC[1-4]|NAK|SYN|ETB|CAN|EM|SUB|ESC|[FGRU]S|SP|DEL`, LiteralStringEscape, Pop(1)}, + {`o[0-7]+`, LiteralStringEscape, Pop(1)}, + {`x[\da-fA-F]+`, LiteralStringEscape, Pop(1)}, + {`\d+`, LiteralStringEscape, Pop(1)}, + {`\s+\\`, LiteralStringEscape, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/ini.go b/vendor/github.com/alecthomas/chroma/lexers/ini.go new file mode 100644 index 0000000..5a02936 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/ini.go @@ -0,0 +1,24 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Ini lexer. +var Ini = Register(MustNewLexer( + &Config{ + Name: "INI", + Aliases: []string{"ini", "cfg", "dosini"}, + Filenames: []string{"*.ini", "*.cfg", "*.inf"}, + MimeTypes: []string{"text/x-ini", "text/inf"}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`[;#].*`, CommentSingle, nil}, + {`\[.*?\]$`, Keyword, nil}, + {`(.*?)([ \t]*)(=)([ \t]*)(.*(?:\n[ \t].+)*)`, ByGroups(NameAttribute, Text, Operator, Text, LiteralString), nil}, + {`(.+?)$`, NameAttribute, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/io.go b/vendor/github.com/alecthomas/chroma/lexers/io.go new file mode 100644 index 0000000..83bd3e1 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/io.go @@ -0,0 +1,39 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Io lexer. +var Io = Register(MustNewLexer( + &Config{ + Name: "Io", + Aliases: []string{"io"}, + Filenames: []string{"*.io"}, + MimeTypes: []string{"text/x-iosrc"}, + }, + Rules{ + "root": { + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`//(.*?)\n`, CommentSingle, nil}, + {`#(.*?)\n`, CommentSingle, nil}, + {`/(\\\n)?[*](.|\n)*?[*](\\\n)?/`, CommentMultiline, nil}, + {`/\+`, CommentMultiline, Push("nestedcomment")}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`::=|:=|=|\(|\)|;|,|\*|-|\+|>|<|@|!|/|\||\^|\.|%|&|\[|\]|\{|\}`, Operator, nil}, + {`(clone|do|doFile|doString|method|for|if|else|elseif|then)\b`, Keyword, nil}, + {`(nil|false|true)\b`, NameConstant, nil}, + {`(Object|list|List|Map|args|Sequence|Coroutine|File)\b`, NameBuiltin, nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + {`(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`\d+`, LiteralNumberInteger, nil}, + }, + "nestedcomment": { + {`[^+/]+`, CommentMultiline, nil}, + {`/\+`, CommentMultiline, Push()}, + {`\+/`, CommentMultiline, Pop(1)}, + {`[+/]`, CommentMultiline, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/java.go b/vendor/github.com/alecthomas/chroma/lexers/java.go new file mode 100644 index 0000000..6ee3d2a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/java.go @@ -0,0 +1,50 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Java lexer. +var Java = Register(MustNewLexer( + &Config{ + Name: "Java", + Aliases: []string{"java"}, + Filenames: []string{"*.java"}, + MimeTypes: []string{"text/x-java"}, + DotAll: true, + }, + Rules{ + "root": { + {`[^\S\n]+`, Text, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*.*?\*/`, CommentMultiline, nil}, + {`(assert|break|case|catch|continue|default|do|else|finally|for|if|goto|instanceof|new|return|switch|this|throw|try|while)\b`, Keyword, nil}, + {`((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)((?:[^\W\d]|\$)[\w$]*)(\s*)(\()`, ByGroups(UsingSelf("root"), NameFunction, Text, Operator), nil}, + {`@[^\W\d][\w.]*`, NameDecorator, nil}, + {`(abstract|const|enum|extends|final|implements|native|private|protected|public|static|strictfp|super|synchronized|throws|transient|volatile)\b`, KeywordDeclaration, nil}, + {`(boolean|byte|char|double|float|int|long|short|void)\b`, KeywordType, nil}, + {`(package)(\s+)`, ByGroups(KeywordNamespace, Text), Push("import")}, + {`(true|false|null)\b`, KeywordConstant, nil}, + {`(class|interface)(\s+)`, ByGroups(KeywordDeclaration, Text), Push("class")}, + {`(import(?:\s+static)?)(\s+)`, ByGroups(KeywordNamespace, Text), Push("import")}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'`, LiteralStringChar, nil}, + {`(\.)((?:[^\W\d]|\$)[\w$]*)`, ByGroups(Operator, NameAttribute), nil}, + {`^\s*([^\W\d]|\$)[\w$]*:`, NameLabel, nil}, + {`([^\W\d]|\$)[\w$]*`, Name, nil}, + {`([0-9][0-9_]*\.([0-9][0-9_]*)?|\.[0-9][0-9_]*)([eE][+\-]?[0-9][0-9_]*)?[fFdD]?|[0-9][eE][+\-]?[0-9][0-9_]*[fFdD]?|[0-9]([eE][+\-]?[0-9][0-9_]*)?[fFdD]|0[xX]([0-9a-fA-F][0-9a-fA-F_]*\.?|([0-9a-fA-F][0-9a-fA-F_]*)?\.[0-9a-fA-F][0-9a-fA-F_]*)[pP][+\-]?[0-9][0-9_]*[fFdD]?`, LiteralNumberFloat, nil}, + {`0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?`, LiteralNumberHex, nil}, + {`0[bB][01][01_]*[lL]?`, LiteralNumberBin, nil}, + {`0[0-7_]+[lL]?`, LiteralNumberOct, nil}, + {`0|[1-9][0-9_]*[lL]?`, LiteralNumberInteger, nil}, + {`[~^*!%&\[\](){}<>|+=:;,./?-]`, Operator, nil}, + {`\n`, Text, nil}, + }, + "class": { + {`([^\W\d]|\$)[\w$]*`, NameClass, Pop(1)}, + }, + "import": { + {`[\w.]+\*?`, NameNamespace, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/javascript.go b/vendor/github.com/alecthomas/chroma/lexers/javascript.go new file mode 100644 index 0000000..eb76c86 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/javascript.go @@ -0,0 +1,68 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Javascript lexer. +var Javascript = Register(MustNewLexer( + &Config{ + Name: "JavaScript", + Aliases: []string{"js", "javascript"}, + Filenames: []string{"*.js", "*.jsm"}, + MimeTypes: []string{"application/javascript", "application/x-javascript", "text/x-javascript", "text/javascript"}, + DotAll: true, + }, + Rules{ + "commentsandwhitespace": { + {`\s+`, Text, nil}, + {``, `||`, `&&`, `>`, `<`, `>=`, `≥`, `<=`, `≤`, `==`, `===`, `≡`, `!=`, `≠`, `!==`, `≢`, `.>`, `.<`, `.>=`, `.≥`, `.<=`, `.≤`, `.==`, `.!=`, `.≠`, `.=`, `.!`, `<:`, `>:`, `∈`, `∉`, `∋`, `∌`, `⊆`, `⊈`, `⊂`, `⊄`, `⊊`, `|>`, `<|`, `:`, `+`, `-`, `.+`, `.-`, `|`, `∪`, `$`, `<<`, `>>`, `>>>`, `.<<`, `.>>`, `.>>>`, `*`, `/`, `./`, `÷`, `.÷`, `%`, `⋅`, `.%`, `.*`, `\`, `.\`, `&`, `∩`, `//`, `.//`, `^`, `.^`, `::`, `.`, `+`, `-`, `!`, `~`, `√`, `∛`, `∜`), Operator, nil}, + {`'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,3}|\\u[a-fA-F0-9]{1,4}|\\U[a-fA-F0-9]{1,6}|[^\\\'\n])'`, LiteralStringChar, nil}, + {`(?<=[.\w)\]])\'+`, Operator, nil}, + {`"""`, LiteralString, Push("tqstring")}, + {`"`, LiteralString, Push("string")}, + {`r"""`, LiteralStringRegex, Push("tqregex")}, + {`r"`, LiteralStringRegex, Push("regex")}, + {"`", LiteralStringBacktick, Push("command")}, + {`(?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*`, Name, nil}, + {`@(?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*`, NameDecorator, nil}, + {`(\d+(_\d+)+\.\d*|\d*\.\d+(_\d+)+)([eEf][+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`\d+(_\d+)+[eEf][+-]?[0-9]+`, LiteralNumberFloat, nil}, + {`\d+[eEf][+-]?[0-9]+`, LiteralNumberFloat, nil}, + {`0b[01]+(_[01]+)+`, LiteralNumberBin, nil}, + {`0b[01]+`, LiteralNumberBin, nil}, + {`0o[0-7]+(_[0-7]+)+`, LiteralNumberOct, nil}, + {`0o[0-7]+`, LiteralNumberOct, nil}, + {`0x[a-fA-F0-9]+(_[a-fA-F0-9]+)+`, LiteralNumberHex, nil}, + {`0x[a-fA-F0-9]+`, LiteralNumberHex, nil}, + {`\d+(_\d+)+`, LiteralNumberInteger, nil}, + {`\d+`, LiteralNumberInteger, nil}, + }, + "blockcomment": { + {`[^=#]`, CommentMultiline, nil}, + {`#=`, CommentMultiline, Push()}, + {`=#`, CommentMultiline, Pop(1)}, + {`[=#]`, CommentMultiline, nil}, + }, + "string": { + {`"`, LiteralString, Pop(1)}, + {`\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)`, LiteralStringEscape, nil}, + {`\$(?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*`, LiteralStringInterpol, nil}, + {`(\$)(\()`, ByGroups(LiteralStringInterpol, Punctuation), Push("in-intp")}, + {`%[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, + {`.|\s`, LiteralString, nil}, + }, + "tqstring": { + {`"""`, LiteralString, Pop(1)}, + {`\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)`, LiteralStringEscape, nil}, + {`\$(?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*`, LiteralStringInterpol, nil}, + {`(\$)(\()`, ByGroups(LiteralStringInterpol, Punctuation), Push("in-intp")}, + {`.|\s`, LiteralString, nil}, + }, + "regex": { + {`"`, LiteralStringRegex, Pop(1)}, + {`\\"`, LiteralStringRegex, nil}, + {`.|\s`, LiteralStringRegex, nil}, + }, + "tqregex": { + {`"""`, LiteralStringRegex, Pop(1)}, + {`.|\s`, LiteralStringRegex, nil}, + }, + "command": { + {"`", LiteralStringBacktick, Pop(1)}, + {`\$(?:[a-zA-Z_¡-￿]|[𐀀-􏿿])(?:[a-zA-Z_0-9¡-￿]|[𐀀-􏿿])*!*`, LiteralStringInterpol, nil}, + {`(\$)(\()`, ByGroups(LiteralStringInterpol, Punctuation), Push("in-intp")}, + {`.|\s`, LiteralStringBacktick, nil}, + }, + "in-intp": { + {`\(`, Punctuation, Push()}, + {`\)`, Punctuation, Pop(1)}, + Include("root"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/kotlin.go b/vendor/github.com/alecthomas/chroma/lexers/kotlin.go new file mode 100644 index 0000000..99f53a5 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/kotlin.go @@ -0,0 +1,52 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Kotlin lexer. +var Kotlin = Register(MustNewLexer( + &Config{ + Name: "Kotlin", + Aliases: []string{"kotlin"}, + Filenames: []string{"*.kt"}, + MimeTypes: []string{"text/x-kotlin"}, + DotAll: true, + }, + Rules{ + "root": { + {`^\s*\[.*?\]`, NameAttribute, nil}, + {`[^\S\n]+`, Text, nil}, + {`\\\n`, Text, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/[*].*?[*]/`, CommentMultiline, nil}, + {`\n`, Text, nil}, + {`::|!!|\?[:.]`, Operator, nil}, + {`[~!%^&*()+=|\[\]:;,.<>/?-]`, Punctuation, nil}, + {`[{}]`, Punctuation, nil}, + {`@"(""|[^"])*"`, LiteralString, nil}, + {`"(\\\\|\\"|[^"\n])*["\n]`, LiteralString, nil}, + {`'\\.'|'[^\\]'`, LiteralStringChar, nil}, + {`[0-9](\.[0-9]*)?([eE][+-][0-9]+)?[flFL]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, + {`(class)(\s+)(object)`, ByGroups(Keyword, Text, Keyword), nil}, + {`(class|interface|object)(\s+)`, ByGroups(Keyword, Text), Push("class")}, + {`(package|import)(\s+)`, ByGroups(Keyword, Text), Push("package")}, + {`(val|var)(\s+)`, ByGroups(Keyword, Text), Push("property")}, + {`(fun)(\s+)`, ByGroups(Keyword, Text), Push("function")}, + {`(abstract|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|external|false|final|finally|for|fun|get|if|import|in|infix|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|tailrec|this|throw|true|try|val|var|vararg|when|where|while)\b`, Keyword, nil}, + {"(@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*|`@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*`)", Name, nil}, + }, + "package": { + {`\S+`, NameNamespace, Pop(1)}, + }, + "class": { + {"(@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*|`@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*`)", NameClass, Pop(1)}, + }, + "property": { + {"(@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*|`@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*`)", NameProperty, Pop(1)}, + }, + "function": { + {"(@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*|`@?[_A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef][A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178-\u0179\u017b\u017d\u0181-\u0182\u0184\u0186-\u0187\u0189-\u018b\u018e-\u0191\u0193-\u0194\u0196-\u0198\u019c-\u019d\u019f-\u01a0\u01a2\u01a4\u01a6-\u01a7\u01a9\u01ac\u01ae-\u01af\u01b1-\u01b3\u01b5\u01b7-\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a-\u023b\u023d-\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e-\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9-\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0-\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u10c7\u10cd\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e-\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\u2cf2\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d-\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua792\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\ua7aa\uff21-\uff3aa-z\u00b5\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137-\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148-\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c-\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa-\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9-\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc-\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef-\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f-\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0-\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb-\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce-\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d6b-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6-\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fc7\u1fd0-\u1fd3\u1fd6-\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6-\u1ff7\u210a\u210e-\u210f\u2113\u212f\u2134\u2139\u213c-\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65-\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73-\u2c74\u2c76-\u2c7b\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3-\u2ce4\u2cec\u2cee\u2cf3\u2d00-\u2d25\u2d27\u2d2d\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua793\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5-\u06e6\u07f4-\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d6a\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7c-\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d-\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua7f8-\ua7f9\ua9cf\uaa70\uaadd\uaaf3-\uaaf4\uff70\uff9e-\uff9f\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19_\u203f-\u2040\u2054\ufe33-\ufe34\ufe4d-\ufe4f\uff3f\u00ad\u0600-\u0604\u061c\u06dd\u070f\u180e\u200b-\u200f\u202a-\u202e\u2060-\u2064\u2066-\u206f\ufeff\ufff9-\ufffb\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62-\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0cbc\u0cbf\u0cc6\u0ccc-\u0ccd\u0ce2-\u0ce3\u0d41-\u0d44\u0d4d\u0d62-\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u3099-\u309a\ua66f\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\u0903\u093b\u093e-\u0940\u0949-\u094c\u094e-\u094f\u0982-\u0983\u09be-\u09c0\u09c7-\u09c8\u09cb-\u09cc\u09d7\u0a03\u0a3e-\u0a40\u0a83\u0abe-\u0ac0\u0ac9\u0acb-\u0acc\u0b02-\u0b03\u0b3e\u0b40\u0b47-\u0b48\u0b4b-\u0b4c\u0b57\u0bbe-\u0bbf\u0bc1-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcc\u0bd7\u0c01-\u0c03\u0c41-\u0c44\u0c82-\u0c83\u0cbe\u0cc0-\u0cc4\u0cc7-\u0cc8\u0cca-\u0ccb\u0cd5-\u0cd6\u0d02-\u0d03\u0d3e-\u0d40\u0d46-\u0d48\u0d4a-\u0d4c\u0d57\u0d82-\u0d83\u0dcf-\u0dd1\u0dd8-\u0ddf\u0df2-\u0df3\u0f3e-\u0f3f\u0f7f\u102b-\u102c\u1031\u1038\u103b-\u103c\u1056-\u1057\u1062-\u1064\u1067-\u106d\u1083-\u1084\u1087-\u108c\u108f\u109a-\u109c\u17b6\u17be-\u17c5\u17c7-\u17c8\u1923-\u1926\u1929-\u192b\u1930-\u1931\u1933-\u1938\u19b0-\u19c0\u19c8-\u19c9\u1a19-\u1a1a\u1a55\u1a57\u1a61\u1a63-\u1a64\u1a6d-\u1a72\u1b04\u1b35\u1b3b\u1b3d-\u1b41\u1b43-\u1b44\u1b82\u1ba1\u1ba6-\u1ba7\u1baa\u1bac-\u1bad\u1be7\u1bea-\u1bec\u1bee\u1bf2-\u1bf3\u1c24-\u1c2b\u1c34-\u1c35\u1ce1\u1cf2-\u1cf3\u302e-\u302f\ua823-\ua824\ua827\ua880-\ua881\ua8b4-\ua8c3\ua952-\ua953\ua983\ua9b4-\ua9b5\ua9ba-\ua9bb\ua9bd-\ua9c0\uaa2f-\uaa30\uaa33-\uaa34\uaa4d\uaa7b\uaaeb\uaaee-\uaaef\uaaf5\uabe3-\uabe4\uabe6-\uabe7\uabe9-\uabea\uabec]*`)", NameFunction, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/lexer_benchmark_test.go b/vendor/github.com/alecthomas/chroma/lexers/lexer_benchmark_test.go new file mode 100644 index 0000000..0a85ec3 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/lexer_benchmark_test.go @@ -0,0 +1,37 @@ +package lexers + +import ( + "testing" + + "github.com/alecthomas/assert" +) + +const lexerBenchSource = `package chroma + +import ( + "io" +) + +// A Formatter for Chroma lexers. +type Formatter interface { + // Format returns a formatting function for tokens. + Format(w io.Writer, style *Style) (func(*Token), error) +} + +// A FormatterFunc is a Formatter implemented as a function. +type FormatterFunc func(io.Writer, *Style) (func(*Token), error) + +func (f FormatterFunc) Format(w io.Writer, s *Style) (func(*Token), error) { + return f(w, s) +} +` + +func Benchmark(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + it, err := Go.Tokenise(nil, lexerBenchSource) + assert.NoError(b, err) + for t := it(); t != nil; t = it() { + } + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/lighttpd.go b/vendor/github.com/alecthomas/chroma/lexers/lighttpd.go new file mode 100644 index 0000000..9e247fa --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/lighttpd.go @@ -0,0 +1,29 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Lighttpd Configuration File lexer. +var Lighttpd = Register(MustNewLexer( + &Config{ + Name: "Lighttpd configuration file", + Aliases: []string{"lighty", "lighttpd"}, + Filenames: []string{}, + MimeTypes: []string{"text/x-lighttpd-conf"}, + }, + Rules{ + "root": { + {`#.*\n`, CommentSingle, nil}, + {`/\S*`, Name, nil}, + {`[a-zA-Z._-]+`, Keyword, nil}, + {`\d+\.\d+\.\d+\.\d+(?:/\d+)?`, LiteralNumber, nil}, + {`[0-9]+`, LiteralNumber, nil}, + {`=>|=~|\+=|==|=|\+`, Operator, nil}, + {`\$[A-Z]+`, NameBuiltin, nil}, + {`[(){}\[\],]`, Punctuation, nil}, + {`"([^"\\]*(?:\\.[^"\\]*)*)"`, LiteralStringDouble, nil}, + {`\s+`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/llvm.go b/vendor/github.com/alecthomas/chroma/lexers/llvm.go new file mode 100644 index 0000000..e6ea06d --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/llvm.go @@ -0,0 +1,42 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Llvm lexer. +var Llvm = Register(MustNewLexer( + &Config{ + Name: "LLVM", + Aliases: []string{"llvm"}, + Filenames: []string{"*.ll"}, + MimeTypes: []string{"text/x-llvm"}, + }, + Rules{ + "root": { + Include("whitespace"), + {`([-a-zA-Z$._][\w\-$.]*|"[^"]*?")\s*:`, NameLabel, nil}, + Include("keyword"), + {`%([-a-zA-Z$._][\w\-$.]*|"[^"]*?")`, NameVariable, nil}, + {`@([-a-zA-Z$._][\w\-$.]*|"[^"]*?")`, NameVariableGlobal, nil}, + {`%\d+`, NameVariableAnonymous, nil}, + {`@\d+`, NameVariableGlobal, nil}, + {`#\d+`, NameVariableGlobal, nil}, + {`!([-a-zA-Z$._][\w\-$.]*|"[^"]*?")`, NameVariable, nil}, + {`!\d+`, NameVariableAnonymous, nil}, + {`c?"[^"]*?"`, LiteralString, nil}, + {`0[xX][a-fA-F0-9]+`, LiteralNumber, nil}, + {`-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?`, LiteralNumber, nil}, + {`[=<>{}\[\]()*.,!]|x\b`, Punctuation, nil}, + }, + "whitespace": { + {`(\n|\s)+`, Text, nil}, + {`;.*?\n`, Comment, nil}, + }, + "keyword": { + {Words(``, `\b`, `begin`, `end`, `true`, `false`, `declare`, `define`, `global`, `constant`, `private`, `linker_private`, `internal`, `available_externally`, `linkonce`, `linkonce_odr`, `weak`, `weak_odr`, `appending`, `dllimport`, `dllexport`, `common`, `default`, `hidden`, `protected`, `extern_weak`, `external`, `thread_local`, `zeroinitializer`, `undef`, `null`, `to`, `tail`, `target`, `triple`, `datalayout`, `volatile`, `nuw`, `nsw`, `nnan`, `ninf`, `nsz`, `arcp`, `fast`, `exact`, `inbounds`, `align`, `addrspace`, `section`, `alias`, `module`, `asm`, `sideeffect`, `gc`, `dbg`, `linker_private_weak`, `attributes`, `blockaddress`, `initialexec`, `localdynamic`, `localexec`, `prefix`, `unnamed_addr`, `ccc`, `fastcc`, `coldcc`, `x86_stdcallcc`, `x86_fastcallcc`, `arm_apcscc`, `arm_aapcscc`, `arm_aapcs_vfpcc`, `ptx_device`, `ptx_kernel`, `intel_ocl_bicc`, `msp430_intrcc`, `spir_func`, `spir_kernel`, `x86_64_sysvcc`, `x86_64_win64cc`, `x86_thiscallcc`, `cc`, `c`, `signext`, `zeroext`, `inreg`, `sret`, `nounwind`, `noreturn`, `noalias`, `nocapture`, `byval`, `nest`, `readnone`, `readonly`, `inlinehint`, `noinline`, `alwaysinline`, `optsize`, `ssp`, `sspreq`, `noredzone`, `noimplicitfloat`, `naked`, `builtin`, `cold`, `nobuiltin`, `noduplicate`, `nonlazybind`, `optnone`, `returns_twice`, `sanitize_address`, `sanitize_memory`, `sanitize_thread`, `sspstrong`, `uwtable`, `returned`, `type`, `opaque`, `eq`, `ne`, `slt`, `sgt`, `sle`, `sge`, `ult`, `ugt`, `ule`, `uge`, `oeq`, `one`, `olt`, `ogt`, `ole`, `oge`, `ord`, `uno`, `ueq`, `une`, `x`, `acq_rel`, `acquire`, `alignstack`, `atomic`, `catch`, `cleanup`, `filter`, `inteldialect`, `max`, `min`, `monotonic`, `nand`, `personality`, `release`, `seq_cst`, `singlethread`, `umax`, `umin`, `unordered`, `xchg`, `add`, `fadd`, `sub`, `fsub`, `mul`, `fmul`, `udiv`, `sdiv`, `fdiv`, `urem`, `srem`, `frem`, `shl`, `lshr`, `ashr`, `and`, `or`, `xor`, `icmp`, `fcmp`, `phi`, `call`, `trunc`, `zext`, `sext`, `fptrunc`, `fpext`, `uitofp`, `sitofp`, `fptoui`, `fptosi`, `inttoptr`, `ptrtoint`, `bitcast`, `addrspacecast`, `select`, `va_arg`, `ret`, `br`, `switch`, `invoke`, `unwind`, `unreachable`, `indirectbr`, `landingpad`, `resume`, `malloc`, `alloca`, `free`, `load`, `store`, `getelementptr`, `extractelement`, `insertelement`, `shufflevector`, `getresult`, `extractvalue`, `insertvalue`, `atomicrmw`, `cmpxchg`, `fence`, `allocsize`, `amdgpu_cs`, `amdgpu_gs`, `amdgpu_kernel`, `amdgpu_ps`, `amdgpu_vs`, `any`, `anyregcc`, `argmemonly`, `avr_intrcc`, `avr_signalcc`, `caller`, `catchpad`, `catchret`, `catchswitch`, `cleanuppad`, `cleanupret`, `comdat`, `convergent`, `cxx_fast_tlscc`, `deplibs`, `dereferenceable`, `dereferenceable_or_null`, `distinct`, `exactmatch`, `externally_initialized`, `from`, `ghccc`, `hhvm_ccc`, `hhvmcc`, `ifunc`, `inaccessiblemem_or_argmemonly`, `inaccessiblememonly`, `inalloca`, `jumptable`, `largest`, `local_unnamed_addr`, `minsize`, `musttail`, `noduplicates`, `none`, `nonnull`, `norecurse`, `notail`, `preserve_allcc`, `preserve_mostcc`, `prologue`, `safestack`, `samesize`, `source_filename`, `swiftcc`, `swifterror`, `swiftself`, `webkit_jscc`, `within`, `writeonly`, `x86_intrcc`, `x86_vectorcallcc`), Keyword, nil}, + {Words(``, ``, `void`, `half`, `float`, `double`, `x86_fp80`, `fp128`, `ppc_fp128`, `label`, `metadata`, `token`), KeywordType, nil}, + {`i[1-9]\d*`, Keyword, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/lua.go b/vendor/github.com/alecthomas/chroma/lexers/lua.go new file mode 100644 index 0000000..aa64ca3 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/lua.go @@ -0,0 +1,74 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Lua lexer. +var Lua = Register(MustNewLexer( + &Config{ + Name: "Lua", + Aliases: []string{"lua"}, + Filenames: []string{"*.lua", "*.wlua"}, + MimeTypes: []string{"text/x-lua", "application/x-lua"}, + }, + Rules{ + "root": { + {`#!.*`, CommentPreproc, nil}, + Default(Push("base")), + }, + "ws": { + {`(?:--\[(=*)\[[\w\W]*?\](\1)\])`, CommentMultiline, nil}, + {`(?:--.*$)`, CommentSingle, nil}, + {`(?:\s+)`, Text, nil}, + }, + "base": { + Include("ws"), + {`(?i)0x[\da-f]*(\.[\da-f]*)?(p[+-]?\d+)?`, LiteralNumberHex, nil}, + {`(?i)(\d*\.\d+|\d+\.\d*)(e[+-]?\d+)?`, LiteralNumberFloat, nil}, + {`(?i)\d+e[+-]?\d+`, LiteralNumberFloat, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`(?s)\[(=*)\[.*?\]\1\]`, LiteralString, nil}, + {`::`, Punctuation, Push("label")}, + {`\.{3}`, Punctuation, nil}, + {`[=<>|~&+\-*/%#^]+|\.\.`, Operator, nil}, + {`[\[\]{}().,:;]`, Punctuation, nil}, + {`(and|or|not)\b`, OperatorWord, nil}, + {`(break|do|else|elseif|end|for|if|in|repeat|return|then|until|while)\b`, KeywordReserved, nil}, + {`goto\b`, KeywordReserved, Push("goto")}, + {`(local)\b`, KeywordDeclaration, nil}, + {`(true|false|nil)\b`, KeywordConstant, nil}, + {`(function)\b`, KeywordReserved, Push("funcname")}, + {`[A-Za-z_]\w*(\.[A-Za-z_]\w*)?`, Name, nil}, + {`'`, LiteralStringSingle, Combined("stringescape", "sqs")}, + {`"`, LiteralStringDouble, Combined("stringescape", "dqs")}, + }, + "funcname": { + Include("ws"), + {`[.:]`, Punctuation, nil}, + {`(?:[^\W\d]\w*)(?=(?:(?:--\[(=*)\[[\w\W]*?\](\2)\])|(?:--.*$)|(?:\s+))*[.:])`, NameClass, nil}, + {`(?:[^\W\d]\w*)`, NameFunction, Pop(1)}, + {`\(`, Punctuation, Pop(1)}, + }, + "goto": { + Include("ws"), + {`(?:[^\W\d]\w*)`, NameLabel, Pop(1)}, + }, + "label": { + Include("ws"), + {`::`, Punctuation, Pop(1)}, + {`(?:[^\W\d]\w*)`, NameLabel, nil}, + }, + "stringescape": { + {`\\([abfnrtv\\"\']|[\r\n]{1,2}|z\s*|x[0-9a-fA-F]{2}|\d{1,3}|u\{[0-9a-fA-F]+\})`, LiteralStringEscape, nil}, + }, + "sqs": { + {`'`, LiteralStringSingle, Pop(1)}, + {`[^\\']+`, LiteralStringSingle, nil}, + }, + "dqs": { + {`"`, LiteralStringDouble, Pop(1)}, + {`[^\\"]+`, LiteralStringDouble, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/make.go b/vendor/github.com/alecthomas/chroma/lexers/make.go new file mode 100644 index 0000000..7d0bdb8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/make.go @@ -0,0 +1,52 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Makefile lexer. +var Makefile = Register(MustNewLexer( + &Config{ + Name: "Base Makefile", + Aliases: []string{"make", "makefile", "mf", "bsdmake"}, + Filenames: []string{"*.mak", "*.mk", "Makefile", "makefile", "Makefile.*", "GNUmakefile"}, + MimeTypes: []string{"text/x-makefile"}, + EnsureNL: true, + }, + Rules{ + "root": { + {`^(?:[\t ]+.*\n|\n)+`, Using(Bash, nil), nil}, + {`\$[<@$+%?|*]`, Keyword, nil}, + {`\s+`, Text, nil}, + {`#.*?\n`, Comment, nil}, + {`(export)(\s+)(?=[\w${}\t -]+\n)`, ByGroups(Keyword, Text), Push("export")}, + {`export\s+`, Keyword, nil}, + {`([\w${}().-]+)(\s*)([!?:+]?=)([ \t]*)((?:.*\\\n)+|.*\n)`, ByGroups(NameVariable, Text, Operator, Text, Using(Bash, nil)), nil}, + {`(?s)"(\\\\|\\.|[^"\\])*"`, LiteralStringDouble, nil}, + {`(?s)'(\\\\|\\.|[^'\\])*'`, LiteralStringSingle, nil}, + {`([^\n:]+)(:+)([ \t]*)`, ByGroups(NameFunction, Operator, Text), Push("block-header")}, + {`\$\(`, Keyword, Push("expansion")}, + }, + "expansion": { + {`[^$a-zA-Z_()]+`, Text, nil}, + {`[a-zA-Z_]+`, NameVariable, nil}, + {`\$`, Keyword, nil}, + {`\(`, Keyword, Push()}, + {`\)`, Keyword, Pop(1)}, + }, + "export": { + {`[\w${}-]+`, NameVariable, nil}, + {`\n`, Text, Pop(1)}, + {`\s+`, Text, nil}, + }, + "block-header": { + {`[,|]`, Punctuation, nil}, + {`#.*?\n`, Comment, Pop(1)}, + {`\\\n`, Text, nil}, + {`\$\(`, Keyword, Push("expansion")}, + {`[a-zA-Z_]+`, Name, nil}, + {`\n`, Text, Pop(1)}, + {`.`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/mako.go b/vendor/github.com/alecthomas/chroma/lexers/mako.go new file mode 100644 index 0000000..b7feac9 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/mako.go @@ -0,0 +1,58 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Mako lexer. +var Mako = Register(MustNewLexer( + &Config{ + Name: "Mako", + Aliases: []string{"mako"}, + Filenames: []string{"*.mao"}, + MimeTypes: []string{"application/x-mako"}, + }, + Rules{ + "root": { + {`(\s*)(%)(\s*end(?:\w+))(\n|\Z)`, ByGroups(Text, CommentPreproc, Keyword, Other), nil}, + {`(\s*)(%)([^\n]*)(\n|\Z)`, ByGroups(Text, CommentPreproc, Using(Python, nil), Other), nil}, + {`(\s*)(##[^\n]*)(\n|\Z)`, ByGroups(Text, CommentPreproc, Other), nil}, + {`(?s)<%doc>.*?`, CommentPreproc, nil}, + {`(<%)([\w.:]+)`, ByGroups(CommentPreproc, NameBuiltin), Push("tag")}, + {`()`, ByGroups(CommentPreproc, NameBuiltin, CommentPreproc), nil}, + {`<%(?=([\w.:]+))`, CommentPreproc, Push("ondeftags")}, + {`(<%(?:!?))(.*?)(%>)(?s)`, ByGroups(CommentPreproc, Using(Python, nil), CommentPreproc), nil}, + {`(\$\{)(.*?)(\})`, ByGroups(CommentPreproc, Using(Python, nil), CommentPreproc), nil}, + {`(?sx) + (.+?) # anything, followed by: + (?: + (?<=\n)(?=%|\#\#) | # an eval or comment line + (?=\#\*) | # multiline comment + (?=`, CommentPreproc, Pop(1)}, + {`\s+`, Text, nil}, + }, + "attr": { + {`".*?"`, LiteralString, Pop(1)}, + {`'.*?'`, LiteralString, Pop(1)}, + {`[^\s>]+`, LiteralString, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/markdown.go b/vendor/github.com/alecthomas/chroma/lexers/markdown.go new file mode 100644 index 0000000..2321626 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/markdown.go @@ -0,0 +1,62 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Markdown lexer. +var Markdown = Register(MustNewLexer( + &Config{ + Name: "markdown", + Aliases: []string{"md"}, + Filenames: []string{"*.md"}, + MimeTypes: []string{"text/x-markdown"}, + }, + Rules{ + "root": { + {`^(#)([^#].+\n)`, ByGroups(GenericHeading, Text), nil}, + {`^(#{2,6})(.+\n)`, ByGroups(GenericSubheading, Text), nil}, + {`^(\s*)([*-] )(\[[ xX]\])( .+\n)`, ByGroups(Text, Keyword, Keyword, UsingSelf("inline")), nil}, + {`^(\s*)([*-])(\s)(.+\n)`, ByGroups(Text, Keyword, Text, UsingSelf("inline")), nil}, + {`^(\s*)([0-9]+\.)( .+\n)`, ByGroups(Text, Keyword, UsingSelf("inline")), nil}, + {`^(\s*>\s)(.+\n)`, ByGroups(Keyword, GenericEmph), nil}, + {"^(```\\n)([\\w\\W]*?)(^```$)", ByGroups(LiteralString, Text, LiteralString), nil}, + {"^(```)(\\w+)(\\n)([\\w\\W]*?)(^```$)", EmitterFunc(markdownCodeBlock), nil}, + Include("inline"), + }, + "inline": { + {`\\.`, Text, nil}, + {`(\s)([*_][^*_]+[*_])(\W|\n)`, ByGroups(Text, GenericEmph, Text), nil}, + {`(\s)((\*\*|__).*\3)((?=\W|\n))`, ByGroups(Text, GenericStrong, None, Text), nil}, + {`(\s)(~~[^~]+~~)((?=\W|\n))`, ByGroups(Text, GenericDeleted, Text), nil}, + {"`[^`]+`", LiteralStringBacktick, nil}, + {`[@#][\w/:]+`, NameEntity, nil}, + {`(!?\[)([^]]+)(\])(\()([^)]+)(\))`, ByGroups(Text, NameTag, Text, Text, NameAttribute, Text), nil}, + {`[^\\\s]+`, Text, nil}, + {`.`, Text, nil}, + }, + }, +)) + +func markdownCodeBlock(groups []string, lexer Lexer) Iterator { + iterators := []Iterator{} + tokens := []*Token{ + {String, groups[1]}, + {String, groups[2]}, + {Text, groups[3]}, + } + code := groups[4] + lexer = Get(groups[2]) + if lexer == nil { + tokens = append(tokens, &Token{String, code}) + iterators = append(iterators, Literator(tokens...)) + } else { + sub, err := lexer.Tokenise(nil, code) + if err != nil { + panic(err) + } + iterators = append(iterators, Literator(tokens...), sub) + } + iterators = append(iterators, Literator(&Token{String, groups[5]})) + return Concaterator(iterators...) +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/mason.go b/vendor/github.com/alecthomas/chroma/lexers/mason.go new file mode 100644 index 0000000..900e1c0 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/mason.go @@ -0,0 +1,39 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Mason lexer. +var Mason = Register(MustNewLexer( + &Config{ + Name: "Mason", + Aliases: []string{"mason"}, + Filenames: []string{"*.m", "*.mhtml", "*.mc", "*.mi", "autohandler", "dhandler"}, + MimeTypes: []string{"application/x-mason"}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`(<%doc>)(.*?)()(?s)`, ByGroups(NameTag, CommentMultiline, NameTag), nil}, + {`(<%(?:def|method))(\s*)(.*?)(>)(.*?)()(?s)`, ByGroups(NameTag, Text, NameFunction, NameTag, UsingSelf("root"), NameTag), nil}, + {`(<%\w+)(.*?)(>)(.*?)()(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using(Perl, nil), NameTag), nil}, + {`(<&[^|])(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using(Perl, nil), NameTag), nil}, + {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using(Perl, nil), NameTag), nil}, + {``, NameTag, nil}, + {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using(Perl, nil), NameTag), nil}, + {`(?<=^)#[^\n]*(\n|\Z)`, Comment, nil}, + {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using(Perl, nil), Other), nil}, + {`(?sx) + (.+?) # anything, followed by: + (?: + (?<=\n)(?=[%#]) | # an eval or comment line + (?=`, `:>`, `/.`, `+`, `-`, `*`, `/`, `^`, `&&`, `||`, `!`, `<>`, `|`, `/;`, `?`, `@`, `//`, `/@`, `@@`, `@@@`, `~~`, `===`, `&`, `<`, `>`, `<=`, `>=`), Operator, nil}, + {Words(``, ``, `,`, `;`, `(`, `)`, `[`, `]`, `{`, `}`), Punctuation, nil}, + {`".*?"`, LiteralString, nil}, + {`\s+`, TextWhitespace, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/minizinc.go b/vendor/github.com/alecthomas/chroma/lexers/minizinc.go new file mode 100644 index 0000000..03cbac5 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/minizinc.go @@ -0,0 +1,40 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// MiniZinc lexer. +var MZN = Register(MustNewLexer( + &Config{ + Name: "MiniZinc", + Aliases: []string{"minizinc", "MZN", "mzn"}, + Filenames: []string{"*.mzn", "*.dzn", "*.fzn"}, + MimeTypes: []string{"text/minizinc"}, + }, + Rules{ + "root": { + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`\\\n`, Text, nil}, + {`\%(.*?)\n`, CommentSingle, nil}, + {`/(\\\n)?[*](.|\n)*?[*](\\\n)?/`, CommentMultiline, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {Words(`\b`, `\b`, `ann`, `annotation`, `any`, `constraint`, `function`, `include`, `list`, `of`, `op`, `output`, `minimize`, `maximize`, `par`, `predicate`, `record`, `satisfy`, `solve`, `test`, `type`, `var`), Keyword, nil}, + {Words(`\b`, `\b`, `array`, `set`, `bool`, `enum`, `float`, `int`, `string`, `tuple`), KeywordType, nil}, + {Words(`\b`, `\b`, `for`, `forall`, `if`, `then`, `else`, `endif`, `where`), Keyword, nil}, + {Words(`\b`, `\b`, `abort`, `abs`, `acosh`, `array_intersect`, `array_union`, `array1d`, `array2d`, `array3d`, `array4d`, `array5d`, `array6d`, `asin`, `assert`, `atan`, `bool2int`, `card`, `ceil`, `concat`, `cos`, `cosh`, `dom`, `dom_array`, `dom_size`, `fix`, `exp`, `floor`, `index_set`, `index_set_1of2`, `index_set_2of2`, `index_set_1of3`, `index_set_2of3`, `index_set_3of3`, `int2float`, `is_fixed`, `join`, `lb`, `lb_array`, `length`, `ln`, `log`, `log2`, `log10`, `min`, `max`, `pow`, `product`, `round`, `set2array`, `show`, `show_int`, `show_float`, `sin`, `sinh`, `sqrt`, `sum`, `tan`, `tanh`, `trace`, `ub`, `ub_array`), NameBuiltin, nil}, + {`(not|<->|->|<-|\\/|xor|/\\)`, Operator, nil}, + {`(<|>|<=|>=|==|=|!=)`, Operator, nil}, + {`(\+|-|\*|/|div|mod)`, Operator, nil}, + {Words(`\b`, `\b`, `in`, `subset`, `superset`, `union`, `diff`, `symdiff`, `intersect`), Operator, nil}, + {`(\\|\.\.|\+\+)`, Operator, nil}, + {`[|()\[\]{},:;]`, Punctuation, nil}, + {`(true|false)\b`, KeywordConstant, nil}, + {`([+-]?)\d+(\.(?!\.)\d*)?([eE][-+]?\d+)?`, LiteralNumber, nil}, + {`::\s*([^\W\d]\w*)(\s*\([^\)]*\))?`, NameDecorator, nil}, + {`\b([^\W\d]\w*)\b(\()`, ByGroups(NameFunction, Punctuation), nil}, + {`[^\W\d]\w*`, NameOther, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/modula2.go b/vendor/github.com/alecthomas/chroma/lexers/modula2.go new file mode 100644 index 0000000..81776e8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/modula2.go @@ -0,0 +1,114 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Modula-2 lexer. +var Modula2 = Register(MustNewLexer( + &Config{ + Name: "Modula-2", + Aliases: []string{"modula2", "m2"}, + Filenames: []string{"*.def", "*.mod"}, + MimeTypes: []string{"text/x-modula2"}, + DotAll: true, + }, + Rules{ + "whitespace": { + {`\n+`, Text, nil}, + {`\s+`, Text, nil}, + }, + "dialecttags": { + {`\(\*!m2pim\*\)`, CommentSpecial, nil}, + {`\(\*!m2iso\*\)`, CommentSpecial, nil}, + {`\(\*!m2r10\*\)`, CommentSpecial, nil}, + {`\(\*!objm2\*\)`, CommentSpecial, nil}, + {`\(\*!m2iso\+aglet\*\)`, CommentSpecial, nil}, + {`\(\*!m2pim\+gm2\*\)`, CommentSpecial, nil}, + {`\(\*!m2iso\+p1\*\)`, CommentSpecial, nil}, + {`\(\*!m2iso\+xds\*\)`, CommentSpecial, nil}, + }, + "identifiers": { + {`([a-zA-Z_$][\w$]*)`, Name, nil}, + }, + "prefixed_number_literals": { + {`0b[01]+(\'[01]+)*`, LiteralNumberBin, nil}, + {`0[ux][0-9A-F]+(\'[0-9A-F]+)*`, LiteralNumberHex, nil}, + }, + "plain_number_literals": { + {`[0-9]+(\'[0-9]+)*\.[0-9]+(\'[0-9]+)*[eE][+-]?[0-9]+(\'[0-9]+)*`, LiteralNumberFloat, nil}, + {`[0-9]+(\'[0-9]+)*\.[0-9]+(\'[0-9]+)*`, LiteralNumberFloat, nil}, + {`[0-9]+(\'[0-9]+)*`, LiteralNumberInteger, nil}, + }, + "suffixed_number_literals": { + {`[0-7]+B`, LiteralNumberOct, nil}, + {`[0-7]+C`, LiteralNumberOct, nil}, + {`[0-9A-F]+H`, LiteralNumberHex, nil}, + }, + "string_literals": { + {`'(\\\\|\\'|[^'])*'`, LiteralString, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + }, + "digraph_operators": { + {`\*\.`, Operator, nil}, + {`\+>`, Operator, nil}, + {`<>`, Operator, nil}, + {`<=`, Operator, nil}, + {`>=`, Operator, nil}, + {`==`, Operator, nil}, + {`::`, Operator, nil}, + {`:=`, Operator, nil}, + {`\+\+`, Operator, nil}, + {`--`, Operator, nil}, + }, + "unigraph_operators": { + {`[+-]`, Operator, nil}, + {`[*/]`, Operator, nil}, + {`\\`, Operator, nil}, + {`[=#<>]`, Operator, nil}, + {`\^`, Operator, nil}, + {`@`, Operator, nil}, + {`&`, Operator, nil}, + {`~`, Operator, nil}, + {"`", Operator, nil}, + }, + "digraph_punctuation": { + {`\.\.`, Punctuation, nil}, + {`<<`, Punctuation, nil}, + {`>>`, Punctuation, nil}, + {`->`, Punctuation, nil}, + {`\|#`, Punctuation, nil}, + {`##`, Punctuation, nil}, + {`\|\*`, Punctuation, nil}, + }, + "unigraph_punctuation": { + {`[()\[\]{},.:;|]`, Punctuation, nil}, + {`!`, Punctuation, nil}, + {`\?`, Punctuation, nil}, + }, + "comments": { + {`^//.*?\n`, CommentSingle, nil}, + {`\(\*([^$].*?)\*\)`, CommentMultiline, nil}, + {`/\*(.*?)\*/`, CommentMultiline, nil}, + }, + "pragmas": { + {`<\*.*?\*>`, CommentPreproc, nil}, + {`\(\*\$.*?\*\)`, CommentPreproc, nil}, + }, + "root": { + Include("whitespace"), + Include("dialecttags"), + Include("pragmas"), + Include("comments"), + Include("identifiers"), + Include("suffixed_number_literals"), + Include("prefixed_number_literals"), + Include("plain_number_literals"), + Include("string_literals"), + Include("digraph_punctuation"), + Include("digraph_operators"), + Include("unigraph_punctuation"), + Include("unigraph_operators"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/mwscript.go b/vendor/github.com/alecthomas/chroma/lexers/mwscript.go new file mode 100644 index 0000000..4eef24d --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/mwscript.go @@ -0,0 +1,52 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// MorrowindScript lexer. +var MorrowindScript = Register(MustNewLexer( + &Config{ + Name: "MorrowindScript", + Aliases: []string{"morrowind", "mwscript"}, + Filenames: []string{}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`;.*$`, Comment, nil}, + {`(["'])(?:(?=(\\?))\2.)*?\1`, LiteralString, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`[0-9]+\.[0-9]*(?!\.)`, LiteralNumberFloat, nil}, + Include("keywords"), + Include("types"), + Include("builtins"), + Include("punct"), + Include("operators"), + {`\n`, Text, nil}, + {`\S+\s+`, Text, nil}, + {`[a-zA-Z0-9_]\w*`, Name, nil}, + }, + "keywords": { + {`(?i)(begin|if|else|elseif|endif|while|endwhile|return|to)\b`, Keyword, nil}, + {`(?i)(end)\b`, Keyword, nil}, + {`(?i)(end)\w+.*$`, Text, nil}, + {`[\w+]->[\w+]`, Operator, nil}, + }, + "builtins": { + {`(?i)(Activate|AddItem|AddSoulGem|AddSpell|AddToLevCreature|AddToLevItem|AddTopic|AIActivate|AIEscort|AIEscortCell|AIFollow|AiFollowCell|AITravel|AIWander|BecomeWerewolf|Cast|ChangeWeather|Choice|ClearForceJump|ClearForceMoveJump|ClearForceRun|ClearForceSneak|ClearInfoActor|Disable|DisableLevitation|DisablePlayerControls|DisablePlayerFighting|DisablePlayerJumping|DisablePlayerLooking|DisablePlayerMagic|DisablePlayerViewSwitch|DisableTeleporting|DisableVanityMode|DontSaveObject|Drop|Enable|EnableBirthMenu|EnableClassMenu|EnableInventoryMenu|EnableLevelUpMenu|EnableLevitation|EnableMagicMenu|EnableMapMenu|EnableNameMenu|EnablePlayerControls|EnablePlayerFighting|EnablePlayerJumping|EnablePlayerLooking|EnablePlayerMagic|EnablePlayerViewSwitch|EnableRaceMenu|EnableRest|EnableStatsMenu|EnableTeleporting|EnableVanityMode|Equip|ExplodeSpell|Face|FadeIn|FadeOut|FadeTo|Fall|ForceGreeting|ForceJump|ForceRun|ForceSneak|Flee|GotoJail|HurtCollidingActor|HurtStandingActor|Journal|Lock|LoopGroup|LowerRank|MenuTest|MessageBox|ModAcrobatics|ModAgility|ModAlarm|ModAlchemy|ModAlteration|ModArmorBonus|ModArmorer|ModAthletics|ModAttackBonus|ModAxe|ModBlock|ModBluntWeapon|ModCastPenalty|ModChameleon|ModConjuration|ModCurrentFatigue|ModCurrentHealth|ModCurrentMagicka|ModDefendBonus|ModDestruction|ModDisposition|ModEnchant|ModEndurance|ModFactionReaction|ModFatigue|ModFight|ModFlee|ModFlying|ModHandToHand|ModHealth|ModHeavyArmor|ModIllusion|ModIntelligence|ModInvisible|ModLightArmor|ModLongBlade|ModLuck|ModMagicka|ModMarksman|ModMediumArmor|ModMercantile|ModMysticism|ModParalysis|ModPCCrimeLevel|ModPCFacRep|ModPersonality|ModRegion|ModReputation|ModResistBlight|ModResistCorprus|ModResistDisease|ModResistFire|ModResistFrost|ModResistMagicka|ModResistNormalWeapons|ModResistParalysis|ModResistPoison|ModResistShock|ModRestoration|ModScale|ModSecurity|ModShortBlade|ModSilence|ModSneak|ModSpear|ModSpeechcraft|ModSpeed|ModStrength|ModSuperJump|ModSwimSpeed|ModUnarmored|ModWaterBreathing|ModWaterLevel|ModWaterWalking|ModWillpower|Move|MoveWorld|PayFine|PayFineThief|PCClearExpelled|PCExpell|PCForce1stPerson|PCForce3rdPerson|PCJoinFaction|PCLowerRank|PCRaiseRank|PlaceAtMe|PlaceAtPC|PlaceItem|PlaceItemCell|PlayBink|PlayGroup|PlayLoopSound3D|PlayLoopSound3DVP|PlaySound|PlaySound3D|PlaySound3DVP|PlaySoundVP|Position|PositionCell|RaiseRank|RemoveEffects|RemoveFromLevCreature|RemoveFromLevItem|RemoveItem|RemoveSoulgem|RemoveSpell|RemoveSpellEffects|ResetActors|Resurrect|Rotate|RotateWorld|Say|StartScript|[S|s]et|SetAcrobatics|SetAgility|SetAlarm|SetAlchemy|SetAlteration|SetAngle|SetArmorBonus|SetArmorer|SetAthletics|SetAtStart|SetAttackBonus|SetAxe|SetBlock|SetBluntWeapon|SetCastPenalty|SetChameleon|SetConjuration|SetDelete|SetDefendBonus|SetDestruction|SetDisposition|SetEnchant|SetEndurance|SetFactionReaction|SetFatigue|SetFight|SetFlee|SetFlying|SetHandToHand|SetHealth|SetHeavyArmor|SetIllusion|SetIntelligence|SetInvisible|SetJournalIndex|SetLightArmor|SetLevel|SetLongBlade|SetLuck|SetMagicka|SetMarksman|SetMediumArmor|SetMercantile|SetMysticism|SetParalysis|SetPCCCrimeLevel|SetPCFacRep|SetPersonality|SetPos|SetReputation|SetResistBlight|SetResistCorprus|SetResistDisease|SetResistFire|SetResistFrost|SetResistMagicka|SetResistNormalWeapons|SetResistParalysis|SetResistPoison|SetResistShock|SetRestoration|SetScale|SetSecurity|SetShortBlade|SetSilence|SetSneak|SetSpear|SetSpeechcraft|SetSpeed|SetStrength|SetSuperJump|SetSwimSpeed|SetUnarmored|SetWaterBreathing|SetWaterlevel|SetWaterWalking|SetWerewolfAcrobatics|SetWillpower|ShowMap|ShowRestMenu|SkipAnim|StartCombat|StopCombat|StopScript|StopSound|StreamMusic|TurnMoonRed|TurnMoonWhite|UndoWerewolf|Unlock|WakeUpPC|CenterOnCell|CenterOnExterior|FillMap|FixMe|ToggleAI|ToggleCollision|ToggleFogOfWar|ToggleGodMode|ToggleMenus|ToggleSky|ToggleWorld|ToggleVanityMode|CellChanged|GetAcrobatics|GetAgility|GetAIPackageDone|GetAlarm|GetAlchemy|GetAlteration|GetAngle|GetArmorBonus|GetArmorer|GetAthletics|GetAttackBonus|GetAttacked|GetArmorType,|GetAxe|GetBlightDisease|GetBlock|GetBluntWeapon|GetButtonPressed|GetCastPenalty|GetChameleon|GetCollidingActor|GetCollidingPC|GetCommonDisease|GetConjuration|GetCurrentAIPackage|GetCurrentTime|GetCurrentWeather|GetDeadCount|GetDefendBonus|GetDestruction|GetDetected|GetDisabled|GetDisposition|GetDistance|GetEffect|GetEnchant|GetEndurance|GetFatigue|GetFight|GetFlee|GetFlying|GetForceJump|GetForceRun|GetForceSneak|GetHandToHand|GetHealth|GetHealthGetRatio|GetHeavyArmor|GetIllusion|GetIntelligence|GetInterior|GetInvisible|GetItemCount|GetJournalIndex|GetLightArmor|GetLineOfSight|GetLOS|GetLevel|GetLocked|GetLongBlade|GetLuck|GetMagicka|GetMarksman|GetMasserPhase|GetSecundaPhase|GetMediumArmor|GetMercantile|GetMysticism|GetParalysis|GetPCCell|GetPCCrimeLevel|GetPCinJail|GetPCJumping|GetPCRank|GetPCRunning|GetPCSleep|GetPCSneaking|GetPCTraveling|GetPersonality|GetPlayerControlsDisabled|GetPlayerFightingDisabled|GetPlayerJumpingDisabled|GetPlayerLookingDisabled|GetPlayerMagicDisabled|GetPos|GetRace|GetReputation|GetResistBlight|GetResistCorprus|GetResistDisease|GetResistFire|GetResistFrost|GetResistMagicka|GetResistNormalWeapons|GetResistParalysis|GetResistPoison|GetResistShock|GetRestoration|GetScale|GetSecondsPassed|GetSecurity|GetShortBlade|GetSilence|GetSneak|GetSoundPlaying|GetSpear|GetSpeechcraft|GetSpeed|GetSpell|GetSpellEffects|GetSpellReadied|GetSquareRoot|GetStandingActor|GetStandingPC|GetStrength|GetSuperJump|GetSwimSpeed|GetTarget|GetUnarmored|GetVanityModeDisabled|GetWaterBreathing|GetWaterLevel|GetWaterWalking|GetWeaponDrawn|GetWeaponType|GetWerewolfKills|GetWillpower|GetWindSpeed|HasItemEquipped|HasSoulgem|HitAttemptOnMe|HitOnMe|IsWerewolf|MenuMode|OnActivate|OnDeath|OnKnockout|OnMurder|PCExpelled|PCGet3rdPerson|PCKnownWerewolf|Random|RepairedOnMe|SameFaction|SayDone|ScriptRunning|AllowWereWolfForceGreeting|Companion|MinimumProfit|NoFlee|NoHello|NoIdle|NoLore|OnPCAdd|OnPCDrop|OnPCEquip|OnPCHitMe|OnPCRepair|PCSkipEquip|OnPCSoulGemUse|StayOutside|CrimeGoldDiscount|CrimeGoldTurnIn|Day|DaysPassed|GameHour|Month|NPCVoiceDistance|PCRace|PCWerewolf|PCVampire|TimeScale|VampClan|Year)\b`, NameBuiltin, nil}, + {`(?i)(sEffectWaterBreathing|sEffectSwiftSwim|sEffectWaterWalking|sEffectShield|sEffectFireShield|sEffectLightningShield|sEffectFrostShield|sEffectBurden|sEffectFeather|sEffectJump|sEffectLevitate|sEffectSlowFall|sEffectLock|sEffectOpen|sEffectFireDamage|sEffectShockDamage|sEffectFrostDamage|sEffectDrainAttribute|sEffectDrainHealth|sEffectDrainSpellpoints|sEffectDrainFatigue|sEffectDrainSkill|sEffectDamageAttribute|sEffectDamageHealth|sEffectDamageMagicka|sEffectDamageFatigue|sEffectDamageSkill|sEffectPoison|sEffectWeaknessToFire|sEffectWeaknessToFrost|sEffectWeaknessToShock|sEffectWeaknessToMagicka|sEffectWeaknessToCommonDisease|sEffectWeaknessToBlightDisease|sEffectWeaknessToCorprusDisease|sEffectWeaknessToPoison|sEffectWeaknessToNormalWeapons|sEffectDisintegrateWeapon|sEffectDisintegrateArmor|sEffectInvisibility|sEffectChameleon|sEffectLight|sEffectSanctuary|sEffectNightEye|sEffectCharm|sEffectParalyze|sEffectSilence|sEffectBlind|sEffectSound|sEffectCalmHumanoid|sEffectCalmCreature|sEffectFrenzyHumanoid|sEffectFrenzyCreature|sEffectDemoralizeHumanoid|sEffectDemoralizeCreature|sEffectRallyHumanoid|sEffectRallyCreature|sEffectDispel|sEffectSoultrap|sEffectTelekinesis|sEffectMark|sEffectRecall|sEffectDivineIntervention|sEffectAlmsiviIntervention|sEffectDetectAnimal|sEffectDetectEnchantment|sEffectDetectKey|sEffectSpellAbsorption|sEffectReflect|sEffectCureCommonDisease|sEffectCureBlightDisease|sEffectCureCorprusDisease|sEffectCurePoison|sEffectCureParalyzation|sEffectRestoreAttribute|sEffectRestoreHealth|sEffectRestoreSpellPoints|sEffectRestoreFatigue|sEffectRestoreSkill|sEffectFortifyAttribute|sEffectFortifyHealth|sEffectFortifySpellpoints|sEffectFortifyFatigue|sEffectFortifySkill|sEffectFortifyMagickaMultiplier|sEffectAbsorbAttribute|sEffectAbsorbHealth|sEffectAbsorbSpellPoints|sEffectAbsorbFatigue|sEffectAbsorbSkill|sEffectResistFire|sEffectResistFrost|sEffectResistShock|sEffectResistMagicka|sEffectResistCommonDisease|sEffectResistBlightDisease|sEffectResistCorprusDisease|sEffectResistPoison|sEffectResistNormalWeapons|sEffectResistParalysis|sEffectRemoveCurse|sEffectTurnUndead|sEffectSummonScamp|sEffectSummonClannfear|sEffectSummonDaedroth|sEffectSummonDremora|sEffectSummonAncestralGhost|sEffectSummonSkeletalMinion|sEffectSummonLeastBonewalker|sEffectSummonGreaterBonewalker|sEffectSummonBonelord|sEffectSummonWingedTwilight|sEffectSummonHunger|sEffectSummonGoldensaint|sEffectSummonFlameAtronach|sEffectSummonFrostAtronach|sEffectSummonStormAtronach|sEffectFortifyAttackBonus|sEffectCommandCreatures|sEffectCommandHumanoids|sEffectBoundDagger|sEffectBoundLongsword|sEffectBoundMace|sEffectBoundBattleAxe|sEffectBoundSpear|sEffectBoundLongbow|sEffectExtraSpell|sEffectBoundCuirass|sEffectBoundHelm|sEffectBoundBoots|sEffectBoundShield|sEffectBoundGloves|sEffectCorpus|sEffectVampirism|sEffectSummonCenturionSphere|sEffectSunDamage|sEffectStuntedMagicka)`, NameBuiltin, nil}, + }, + "types": { + {`(?i)(short|long|float)\b`, KeywordType, nil}, + }, + "punct": { + {`[()]`, Punctuation, nil}, + }, + "operators": { + {`[#=,./%+\-?]`, Operator, nil}, + {`(==|<=|<|>=|>|!=)`, Operator, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/myghty.go b/vendor/github.com/alecthomas/chroma/lexers/myghty.go new file mode 100644 index 0000000..d5c5141 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/myghty.go @@ -0,0 +1,38 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Myghty lexer. +var Myghty = Register(MustNewLexer( + &Config{ + Name: "Myghty", + Aliases: []string{"myghty"}, + Filenames: []string{"*.myt", "autodelegate"}, + MimeTypes: []string{"application/x-myghty"}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`(<%(?:def|method))(\s*)(.*?)(>)(.*?)()(?s)`, ByGroups(NameTag, Text, NameFunction, NameTag, UsingSelf("root"), NameTag), nil}, + {`(<%\w+)(.*?)(>)(.*?)()(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using(Python, nil), NameTag), nil}, + {`(<&[^|])(.*?)(,.*?)?(&>)`, ByGroups(NameTag, NameFunction, Using(Python, nil), NameTag), nil}, + {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using(Python, nil), NameTag), nil}, + {``, NameTag, nil}, + {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using(Python, nil), NameTag), nil}, + {`(?<=^)#[^\n]*(\n|\Z)`, Comment, nil}, + {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using(Python, nil), Other), nil}, + {`(?sx) + (.+?) # anything, followed by: + (?: + (?<=\n)(?=[%#]) | # an eval or comment line + (?==~!@#%^&|`?-]", Operator, nil}, + {`\b(tinyint|smallint|mediumint|int|integer|bigint|date|datetime|time|bit|bool|tinytext|mediumtext|longtext|text|tinyblob|mediumblob|longblob|blob|float|double|double\s+precision|real|numeric|dec|decimal|timestamp|year|char|varchar|varbinary|varcharacter|enum|set)(\b\s*)(\()?`, ByGroups(KeywordType, Text, Punctuation), nil}, + {`\b(add|all|alter|analyze|and|as|asc|asensitive|before|between|bigint|binary|blob|both|by|call|cascade|case|change|char|character|check|collate|column|condition|constraint|continue|convert|create|cross|current_date|current_time|current_timestamp|current_user|cursor|database|databases|day_hour|day_microsecond|day_minute|day_second|dec|decimal|declare|default|delayed|delete|desc|describe|deterministic|distinct|distinctrow|div|double|drop|dual|each|else|elseif|enclosed|escaped|exists|exit|explain|fetch|flush|float|float4|float8|for|force|foreign|from|fulltext|grant|group|having|high_priority|hour_microsecond|hour_minute|hour_second|if|ignore|in|index|infile|inner|inout|insensitive|insert|int|int1|int2|int3|int4|int8|integer|interval|into|is|iterate|join|key|keys|kill|leading|leave|left|like|limit|lines|load|localtime|localtimestamp|lock|long|loop|low_priority|match|minute_microsecond|minute_second|mod|modifies|natural|no_write_to_binlog|not|numeric|on|optimize|option|optionally|or|order|out|outer|outfile|precision|primary|procedure|purge|raid0|read|reads|real|references|regexp|release|rename|repeat|replace|require|restrict|return|revoke|right|rlike|schema|schemas|second_microsecond|select|sensitive|separator|set|show|smallint|soname|spatial|specific|sql|sql_big_result|sql_calc_found_rows|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|starting|straight_join|table|terminated|then|to|trailing|trigger|undo|union|unique|unlock|unsigned|update|usage|use|using|utc_date|utc_time|utc_timestamp|values|varying|when|where|while|with|write|x509|xor|year_month|zerofill)\b`, Keyword, nil}, + {`\b(auto_increment|engine|charset|tables)\b`, KeywordPseudo, nil}, + {`(true|false|null)`, NameConstant, nil}, + {`([a-z_]\w*)(\s*)(\()`, ByGroups(NameFunction, Text, Punctuation), nil}, + {`[a-z_]\w*`, Name, nil}, + {`@[a-z0-9]*[._]*[a-z0-9]*`, NameVariable, nil}, + {`[;:()\[\],.]`, Punctuation, nil}, + }, + "multiline-comments": { + {`/\*`, CommentMultiline, Push("multiline-comments")}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[^/*]+`, CommentMultiline, nil}, + {`[/*]`, CommentMultiline, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/nasm.go b/vendor/github.com/alecthomas/chroma/lexers/nasm.go new file mode 100644 index 0000000..2ba2b04 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/nasm.go @@ -0,0 +1,58 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Nasm lexer. +var Nasm = Register(MustNewLexer( + &Config{ + Name: "NASM", + Aliases: []string{"nasm"}, + Filenames: []string{"*.asm", "*.ASM"}, + MimeTypes: []string{"text/x-nasm"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`^\s*%`, CommentPreproc, Push("preproc")}, + Include("whitespace"), + {`[a-z$._?][\w$.?#@~]*:`, NameLabel, nil}, + {`([a-z$._?][\w$.?#@~]*)(\s+)(equ)`, ByGroups(NameConstant, KeywordDeclaration, KeywordDeclaration), Push("instruction-args")}, + {`BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|ORG|ALIGN|STRUC|ENDSTRUC|COMMON|CPU|GROUP|UPPERCASE|IMPORT|EXPORT|LIBRARY|MODULE`, Keyword, Push("instruction-args")}, + {`(?:res|d)[bwdqt]|times`, KeywordDeclaration, Push("instruction-args")}, + {`[a-z$._?][\w$.?#@~]*`, NameFunction, Push("instruction-args")}, + {`[\r\n]+`, Text, nil}, + }, + "instruction-args": { + {"\"(\\\\\"|[^\"\\n])*\"|'(\\\\'|[^'\\n])*'|`(\\\\`|[^`\\n])*`", LiteralString, nil}, + {`(?:0x[0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)`, LiteralNumberHex, nil}, + {`[0-7]+q`, LiteralNumberOct, nil}, + {`[01]+b`, LiteralNumberBin, nil}, + {`[0-9]+\.e?[0-9]+`, LiteralNumberFloat, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + Include("punctuation"), + {`r[0-9][0-5]?[bwd]|[a-d][lh]|[er]?[a-d]x|[er]?[sb]p|[er]?[sd]i|[c-gs]s|st[0-7]|mm[0-7]|cr[0-4]|dr[0-367]|tr[3-7]`, NameBuiltin, nil}, + {`[a-z$._?][\w$.?#@~]*`, NameVariable, nil}, + {`[\r\n]+`, Text, Pop(1)}, + Include("whitespace"), + }, + "preproc": { + {`[^;\n]+`, CommentPreproc, nil}, + {`;.*?\n`, CommentSingle, Pop(1)}, + {`\n`, CommentPreproc, Pop(1)}, + }, + "whitespace": { + {`\n`, Text, nil}, + {`[ \t]+`, Text, nil}, + {`;.*`, CommentSingle, nil}, + }, + "punctuation": { + {`[,():\[\]]+`, Punctuation, nil}, + {`[&|^<>+*/%~-]+`, Operator, nil}, + {`[$]+`, KeywordConstant, nil}, + {`seg|wrt|strict`, OperatorWord, nil}, + {`byte|[dq]?word`, KeywordType, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/newspeak.go b/vendor/github.com/alecthomas/chroma/lexers/newspeak.go new file mode 100644 index 0000000..0ec00c1 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/newspeak.go @@ -0,0 +1,54 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Newspeak lexer. +var Newspeak = Register(MustNewLexer( + &Config{ + Name: "Newspeak", + Aliases: []string{"newspeak"}, + Filenames: []string{"*.ns2"}, + MimeTypes: []string{"text/x-newspeak"}, + }, + Rules{ + "root": { + {`\b(Newsqueak2)\b`, KeywordDeclaration, nil}, + {`'[^']*'`, LiteralString, nil}, + {`\b(class)(\s+)(\w+)(\s*)`, ByGroups(KeywordDeclaration, Text, NameClass, Text), nil}, + {`\b(mixin|self|super|private|public|protected|nil|true|false)\b`, Keyword, nil}, + {`(\w+\:)(\s*)([a-zA-Z_]\w+)`, ByGroups(NameFunction, Text, NameVariable), nil}, + {`(\w+)(\s*)(=)`, ByGroups(NameAttribute, Text, Operator), nil}, + {`<\w+>`, CommentSpecial, nil}, + Include("expressionstat"), + Include("whitespace"), + }, + "expressionstat": { + {`(\d+\.\d*|\.\d+|\d+[fF])[fF]?`, LiteralNumberFloat, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`:\w+`, NameVariable, nil}, + {`(\w+)(::)`, ByGroups(NameVariable, Operator), nil}, + {`\w+:`, NameFunction, nil}, + {`\w+`, NameVariable, nil}, + {`\(|\)`, Punctuation, nil}, + {`\[|\]`, Punctuation, nil}, + {`\{|\}`, Punctuation, nil}, + {`(\^|\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-|:)`, Operator, nil}, + {`\.|;`, Punctuation, nil}, + Include("whitespace"), + Include("literals"), + }, + "literals": { + {`\$.`, LiteralString, nil}, + {`'[^']*'`, LiteralString, nil}, + {`#'[^']*'`, LiteralStringSymbol, nil}, + {`#\w+:?`, LiteralStringSymbol, nil}, + {`#(\+|\/|~|\*|<|>|=|@|%|\||&|\?|!|,|-)+`, LiteralStringSymbol, nil}, + }, + "whitespace": { + {`\s+`, Text, nil}, + {`"[^"]*"`, Comment, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/nginx.go b/vendor/github.com/alecthomas/chroma/lexers/nginx.go new file mode 100644 index 0000000..47126af --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/nginx.go @@ -0,0 +1,46 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Nginx Configuration File lexer. +var Nginx = Register(MustNewLexer( + &Config{ + Name: "Nginx configuration file", + Aliases: []string{"nginx"}, + Filenames: []string{"nginx.conf"}, + MimeTypes: []string{"text/x-nginx-conf"}, + }, + Rules{ + "root": { + {`(include)(\s+)([^\s;]+)`, ByGroups(Keyword, Text, Name), nil}, + {`[^\s;#]+`, Keyword, Push("stmt")}, + Include("base"), + }, + "block": { + {`\}`, Punctuation, Pop(2)}, + {`[^\s;#]+`, KeywordNamespace, Push("stmt")}, + Include("base"), + }, + "stmt": { + {`\{`, Punctuation, Push("block")}, + {`;`, Punctuation, Pop(1)}, + Include("base"), + }, + "base": { + {`#.*\n`, CommentSingle, nil}, + {`on|off`, NameConstant, nil}, + {`\$[^\s;#()]+`, NameVariable, nil}, + {`([a-z0-9.-]+)(:)([0-9]+)`, ByGroups(Name, Punctuation, LiteralNumberInteger), nil}, + {`[a-z-]+/[a-z-+]+`, LiteralString, nil}, + {`[0-9]+[km]?\b`, LiteralNumberInteger, nil}, + {`(~)(\s*)([^\s{]+)`, ByGroups(Punctuation, Text, LiteralStringRegex), nil}, + {`[:=~]`, Punctuation, nil}, + {`[^\s;#{}$]+`, LiteralString, nil}, + {`/[^\s;#]*`, Name, nil}, + {`\s+`, Text, nil}, + {`[$;]`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/nim.go b/vendor/github.com/alecthomas/chroma/lexers/nim.go new file mode 100644 index 0000000..0197737 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/nim.go @@ -0,0 +1,90 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Nim lexer. +var Nim = Register(MustNewLexer( + &Config{ + Name: "Nim", + Aliases: []string{"nim", "nimrod"}, + Filenames: []string{"*.nim", "*.nimrod"}, + MimeTypes: []string{"text/x-nim"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`##.*$`, LiteralStringDoc, nil}, + {`#.*$`, Comment, nil}, + {`[*=><+\-/@$~&%!?|\\\[\]]`, Operator, nil}, + {"\\.\\.|\\.|,|\\[\\.|\\.\\]|\\{\\.|\\.\\}|\\(\\.|\\.\\)|\\{|\\}|\\(|\\)|:|\\^|`|;", Punctuation, nil}, + {`(?:[\w]+)"`, LiteralString, Push("rdqs")}, + {`"""`, LiteralString, Push("tdqs")}, + {`"`, LiteralString, Push("dqs")}, + {`'`, LiteralStringChar, Push("chars")}, + {`(a_?n_?d_?|o_?r_?|n_?o_?t_?|x_?o_?r_?|s_?h_?l_?|s_?h_?r_?|d_?i_?v_?|m_?o_?d_?|i_?n_?|n_?o_?t_?i_?n_?|i_?s_?|i_?s_?n_?o_?t_?)\b`, OperatorWord, nil}, + {`(p_?r_?o_?c_?\s)(?![(\[\]])`, Keyword, Push("funcname")}, + {`(a_?d_?d_?r_?|a_?n_?d_?|a_?s_?|a_?s_?m_?|a_?t_?o_?m_?i_?c_?|b_?i_?n_?d_?|b_?l_?o_?c_?k_?|b_?r_?e_?a_?k_?|c_?a_?s_?e_?|c_?a_?s_?t_?|c_?o_?n_?c_?e_?p_?t_?|c_?o_?n_?s_?t_?|c_?o_?n_?t_?i_?n_?u_?e_?|c_?o_?n_?v_?e_?r_?t_?e_?r_?|d_?e_?f_?e_?r_?|d_?i_?s_?c_?a_?r_?d_?|d_?i_?s_?t_?i_?n_?c_?t_?|d_?i_?v_?|d_?o_?|e_?l_?i_?f_?|e_?l_?s_?e_?|e_?n_?d_?|e_?n_?u_?m_?|e_?x_?c_?e_?p_?t_?|e_?x_?p_?o_?r_?t_?|f_?i_?n_?a_?l_?l_?y_?|f_?o_?r_?|f_?u_?n_?c_?|i_?f_?|i_?n_?|y_?i_?e_?l_?d_?|i_?n_?t_?e_?r_?f_?a_?c_?e_?|i_?s_?|i_?s_?n_?o_?t_?|i_?t_?e_?r_?a_?t_?o_?r_?|l_?e_?t_?|m_?a_?c_?r_?o_?|m_?e_?t_?h_?o_?d_?|m_?i_?x_?i_?n_?|m_?o_?d_?|n_?o_?t_?|n_?o_?t_?i_?n_?|o_?b_?j_?e_?c_?t_?|o_?f_?|o_?r_?|o_?u_?t_?|p_?r_?o_?c_?|p_?t_?r_?|r_?a_?i_?s_?e_?|r_?e_?f_?|r_?e_?t_?u_?r_?n_?|s_?h_?a_?r_?e_?d_?|s_?h_?l_?|s_?h_?r_?|s_?t_?a_?t_?i_?c_?|t_?e_?m_?p_?l_?a_?t_?e_?|t_?r_?y_?|t_?u_?p_?l_?e_?|t_?y_?p_?e_?|w_?h_?e_?n_?|w_?h_?i_?l_?e_?|w_?i_?t_?h_?|w_?i_?t_?h_?o_?u_?t_?|x_?o_?r_?)\b`, Keyword, nil}, + {`(f_?r_?o_?m_?|i_?m_?p_?o_?r_?t_?|i_?n_?c_?l_?u_?d_?e_?)\b`, KeywordNamespace, nil}, + {`(v_?a_?r)\b`, KeywordDeclaration, nil}, + {`(i_?n_?t_?|i_?n_?t_?8_?|i_?n_?t_?1_?6_?|i_?n_?t_?3_?2_?|i_?n_?t_?6_?4_?|f_?l_?o_?a_?t_?|f_?l_?o_?a_?t_?3_?2_?|f_?l_?o_?a_?t_?6_?4_?|b_?o_?o_?l_?|c_?h_?a_?r_?|r_?a_?n_?g_?e_?|a_?r_?r_?a_?y_?|s_?e_?q_?|s_?e_?t_?|s_?t_?r_?i_?n_?g_?)\b`, KeywordType, nil}, + {`(n_?i_?l_?|t_?r_?u_?e_?|f_?a_?l_?s_?e_?)\b`, KeywordPseudo, nil}, + {`\b((?![_\d])\w)(((?!_)\w)|(_(?!_)\w))*`, Name, nil}, + {`[0-9][0-9_]*(?=([e.]|\'f(32|64)))`, LiteralNumberFloat, Push("float-suffix", "float-number")}, + {`0x[a-f0-9][a-f0-9_]*`, LiteralNumberHex, Push("int-suffix")}, + {`0b[01][01_]*`, LiteralNumberBin, Push("int-suffix")}, + {`0o[0-7][0-7_]*`, LiteralNumberOct, Push("int-suffix")}, + {`[0-9][0-9_]*`, LiteralNumberInteger, Push("int-suffix")}, + {`\s+`, Text, nil}, + {`.+$`, Error, nil}, + }, + "chars": { + {`\\([\\abcefnrtvl"\']|x[a-f0-9]{2}|[0-9]{1,3})`, LiteralStringEscape, nil}, + {`'`, LiteralStringChar, Pop(1)}, + {`.`, LiteralStringChar, nil}, + }, + "strings": { + {`(? <= < >= > *")...), Operator, nil}, + {`[;:]`, Punctuation, nil}, + }, + "comment": { + {`\*/`, CommentMultiline, Pop(1)}, + {`.|\n`, CommentMultiline, nil}, + }, + "paren": { + {`\)`, Punctuation, Pop(1)}, + Include("root"), + }, + "list": { + {`\]`, Punctuation, Pop(1)}, + Include("root"), + }, + "qstring": { + {`"`, StringDouble, Pop(1)}, + {`\${`, StringInterpol, Push("interpol")}, + {`\\.`, StringEscape, nil}, + {`.|\n`, StringDouble, nil}, + }, + "istring": { + {`''\$`, StringEscape, nil}, // "$" + {`'''`, StringEscape, nil}, // "''" + {`''\\.`, StringEscape, nil}, // "\." + {`''`, StringSingle, Pop(1)}, + {`\${`, StringInterpol, Push("interpol")}, + // The next rule is important: "$" escapes any symbol except "{"! + {`\$.`, StringSingle, nil}, // "$." + {`.|\n`, StringSingle, nil}, + }, + "scope": { + {`}:`, Punctuation, Pop(1)}, + {`}`, Punctuation, Pop(1)}, + {`in` + nixb, Keyword, Pop(1)}, + {`\${`, StringInterpol, Push("interpol")}, + Include("root"), // "==" has to be above "=" + {Words(``, ``, strings.Fields("= ? ,")...), Operator, nil}, + }, + "interpol": { + {`}`, StringInterpol, Pop(1)}, + Include("root"), + }, + "id": { + {`[a-zA-Z_][a-zA-Z0-9_'-]*`, Name, nil}, + }, + "uri": { + {`[a-zA-Z][a-zA-Z0-9+.-]*:[a-zA-Z0-9%/?:@&=+$,_.!~*'-]+`, StringDoc, nil}, + }, + "path": { + {`[a-zA-Z0-9._+-]*(/[a-zA-Z0-9._+-]+)+`, StringRegex, nil}, + {`~(/[a-zA-Z0-9._+-]+)+/?`, StringRegex, nil}, + {`<[a-zA-Z0-9._+-]+(/[a-zA-Z0-9._+-]+)*>`, StringRegex, nil}, + }, + "int": { + {`-?[0-9]+` + nixb, NumberInteger, nil}, + }, + "float": { + {`-?(([1-9][0-9]*\.[0-9]*)|(0?\.[0-9]+))([Ee][+-]?[0-9]+)?` + nixb, NumberFloat, nil}, + }, + "space": { + {`[ \t\r\n]+`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/ocaml.go b/vendor/github.com/alecthomas/chroma/lexers/ocaml.go new file mode 100644 index 0000000..6b48432 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/ocaml.go @@ -0,0 +1,65 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Ocaml lexer. +var Ocaml = Register(MustNewLexer( + &Config{ + Name: "OCaml", + Aliases: []string{"ocaml"}, + Filenames: []string{"*.ml", "*.mli", "*.mll", "*.mly"}, + MimeTypes: []string{"text/x-ocaml"}, + }, + Rules{ + "escape-sequence": { + {`\\[\\"\'ntbr]`, LiteralStringEscape, nil}, + {`\\[0-9]{3}`, LiteralStringEscape, nil}, + {`\\x[0-9a-fA-F]{2}`, LiteralStringEscape, nil}, + }, + "root": { + {`\s+`, Text, nil}, + {`false|true|\(\)|\[\]`, NameBuiltinPseudo, nil}, + {`\b([A-Z][\w\']*)(?=\s*\.)`, NameNamespace, Push("dotted")}, + {`\b([A-Z][\w\']*)`, NameClass, nil}, + {`\(\*(?![)])`, Comment, Push("comment")}, + {`\b(as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|false|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|private|raise|rec|sig|struct|then|to|true|try|type|value|val|virtual|when|while|with)\b`, Keyword, nil}, + {"(~|\\}|\\|]|\\||\\{<|\\{|`|_|]|\\[\\||\\[>|\\[<|\\[|\\?\\?|\\?|>\\}|>]|>|=|<-|<|;;|;|:>|:=|::|:|\\.\\.|\\.|->|-\\.|-|,|\\+|\\*|\\)|\\(|&&|&|#|!=)", Operator, nil}, + {`([=<>@^|&+\*/$%-]|[!?~])?[!$%&*+\./:<=>?@^|~-]`, Operator, nil}, + {`\b(and|asr|land|lor|lsl|lxor|mod|or)\b`, OperatorWord, nil}, + {`\b(unit|int|float|bool|string|char|list|array)\b`, KeywordType, nil}, + {`[^\W\d][\w']*`, Name, nil}, + {`-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)`, LiteralNumberFloat, nil}, + {`0[xX][\da-fA-F][\da-fA-F_]*`, LiteralNumberHex, nil}, + {`0[oO][0-7][0-7_]*`, LiteralNumberOct, nil}, + {`0[bB][01][01_]*`, LiteralNumberBin, nil}, + {`\d[\d_]*`, LiteralNumberInteger, nil}, + {`'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'`, LiteralStringChar, nil}, + {`'.'`, LiteralStringChar, nil}, + {`'`, Keyword, nil}, + {`"`, LiteralStringDouble, Push("string")}, + {`[~?][a-z][\w\']*:`, NameVariable, nil}, + }, + "comment": { + {`[^(*)]+`, Comment, nil}, + {`\(\*`, Comment, Push()}, + {`\*\)`, Comment, Pop(1)}, + {`[(*)]`, Comment, nil}, + }, + "string": { + {`[^\\"]+`, LiteralStringDouble, nil}, + Include("escape-sequence"), + {`\\\n`, LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Pop(1)}, + }, + "dotted": { + {`\s+`, Text, nil}, + {`\.`, Punctuation, nil}, + {`[A-Z][\w\']*(?=\s*\.)`, NameNamespace, nil}, + {`[A-Z][\w\']*`, NameClass, Pop(1)}, + {`[a-z_][\w\']*`, Name, Pop(1)}, + Default(Pop(1)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/octave.go b/vendor/github.com/alecthomas/chroma/lexers/octave.go new file mode 100644 index 0000000..caeafc4 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/octave.go @@ -0,0 +1,45 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Octave lexer. +var Octave = Register(MustNewLexer( + &Config{ + Name: "Octave", + Aliases: []string{"octave"}, + Filenames: []string{"*.m"}, + MimeTypes: []string{"text/octave"}, + }, + Rules{ + "root": { + {`[%#].*$`, Comment, nil}, + {`^\s*function`, Keyword, Push("deffunc")}, + {Words(``, `\b`, `__FILE__`, `__LINE__`, `break`, `case`, `catch`, `classdef`, `continue`, `do`, `else`, `elseif`, `end`, `end_try_catch`, `end_unwind_protect`, `endclassdef`, `endevents`, `endfor`, `endfunction`, `endif`, `endmethods`, `endproperties`, `endswitch`, `endwhile`, `events`, `for`, `function`, `get`, `global`, `if`, `methods`, `otherwise`, `persistent`, `properties`, `return`, `set`, `static`, `switch`, `try`, `until`, `unwind_protect`, `unwind_protect_cleanup`, `while`), Keyword, nil}, + {Words(``, `\b`, `addlistener`, `addpath`, `addproperty`, `all`, `and`, `any`, `argnames`, `argv`, `assignin`, `atexit`, `autoload`, `available_graphics_toolkits`, `beep_on_error`, `bitand`, `bitmax`, `bitor`, `bitshift`, `bitxor`, `cat`, `cell`, `cellstr`, `char`, `class`, `clc`, `columns`, `command_line_path`, `completion_append_char`, `completion_matches`, `complex`, `confirm_recursive_rmdir`, `cputime`, `crash_dumps_octave_core`, `ctranspose`, `cumprod`, `cumsum`, `debug_on_error`, `debug_on_interrupt`, `debug_on_warning`, `default_save_options`, `dellistener`, `diag`, `diff`, `disp`, `doc_cache_file`, `do_string_escapes`, `double`, `drawnow`, `e`, `echo_executing_commands`, `eps`, `eq`, `errno`, `errno_list`, `error`, `eval`, `evalin`, `exec`, `exist`, `exit`, `eye`, `false`, `fclear`, `fclose`, `fcntl`, `fdisp`, `feof`, `ferror`, `feval`, `fflush`, `fgetl`, `fgets`, `fieldnames`, `file_in_loadpath`, `file_in_path`, `filemarker`, `filesep`, `find_dir_in_path`, `fixed_point_format`, `fnmatch`, `fopen`, `fork`, `formula`, `fprintf`, `fputs`, `fread`, `freport`, `frewind`, `fscanf`, `fseek`, `fskipl`, `ftell`, `functions`, `fwrite`, `ge`, `genpath`, `get`, `getegid`, `getenv`, `geteuid`, `getgid`, `getpgrp`, `getpid`, `getppid`, `getuid`, `glob`, `gt`, `gui_mode`, `history_control`, `history_file`, `history_size`, `history_timestamp_format_string`, `home`, `horzcat`, `hypot`, `ifelse`, `ignore_function_time_stamp`, `inferiorto`, `info_file`, `info_program`, `inline`, `input`, `intmax`, `intmin`, `ipermute`, `is_absolute_filename`, `isargout`, `isbool`, `iscell`, `iscellstr`, `ischar`, `iscomplex`, `isempty`, `isfield`, `isfloat`, `isglobal`, `ishandle`, `isieee`, `isindex`, `isinteger`, `islogical`, `ismatrix`, `ismethod`, `isnull`, `isnumeric`, `isobject`, `isreal`, `is_rooted_relative_filename`, `issorted`, `isstruct`, `isvarname`, `kbhit`, `keyboard`, `kill`, `lasterr`, `lasterror`, `lastwarn`, `ldivide`, `le`, `length`, `link`, `linspace`, `logical`, `lstat`, `lt`, `make_absolute_filename`, `makeinfo_program`, `max_recursion_depth`, `merge`, `methods`, `mfilename`, `minus`, `mislocked`, `mkdir`, `mkfifo`, `mkstemp`, `mldivide`, `mlock`, `mouse_wheel_zoom`, `mpower`, `mrdivide`, `mtimes`, `munlock`, `nargin`, `nargout`, `native_float_format`, `ndims`, `ne`, `nfields`, `nnz`, `norm`, `not`, `numel`, `nzmax`, `octave_config_info`, `octave_core_file_limit`, `octave_core_file_name`, `octave_core_file_options`, `ones`, `or`, `output_max_field_width`, `output_precision`, `page_output_immediately`, `page_screen_output`, `path`, `pathsep`, `pause`, `pclose`, `permute`, `pi`, `pipe`, `plus`, `popen`, `power`, `print_empty_dimensions`, `printf`, `print_struct_array_contents`, `prod`, `program_invocation_name`, `program_name`, `putenv`, `puts`, `pwd`, `quit`, `rats`, `rdivide`, `readdir`, `readlink`, `read_readline_init_file`, `realmax`, `realmin`, `rehash`, `rename`, `repelems`, `re_read_readline_init_file`, `reset`, `reshape`, `resize`, `restoredefaultpath`, `rethrow`, `rmdir`, `rmfield`, `rmpath`, `rows`, `save_header_format_string`, `save_precision`, `saving_history`, `scanf`, `set`, `setenv`, `shell_cmd`, `sighup_dumps_octave_core`, `sigterm_dumps_octave_core`, `silent_functions`, `single`, `size`, `size_equal`, `sizemax`, `sizeof`, `sleep`, `source`, `sparse_auto_mutate`, `split_long_rows`, `sprintf`, `squeeze`, `sscanf`, `stat`, `stderr`, `stdin`, `stdout`, `strcmp`, `strcmpi`, `string_fill_char`, `strncmp`, `strncmpi`, `struct`, `struct_levels_to_print`, `strvcat`, `subsasgn`, `subsref`, `sum`, `sumsq`, `superiorto`, `suppress_verbose_help_message`, `symlink`, `system`, `tic`, `tilde_expand`, `times`, `tmpfile`, `tmpnam`, `toc`, `toupper`, `transpose`, `true`, `typeinfo`, `umask`, `uminus`, `uname`, `undo_string_escapes`, `unlink`, `uplus`, `upper`, `usage`, `usleep`, `vec`, `vectorize`, `vertcat`, `waitpid`, `warning`, `warranty`, `whos_line_format`, `yes_or_no`, `zeros`, `inf`, `Inf`, `nan`, `NaN`, `close`, `load`, `who`, `whos`, `accumarray`, `accumdim`, `acosd`, `acotd`, `acscd`, `addtodate`, `allchild`, `ancestor`, `anova`, `arch_fit`, `arch_rnd`, `arch_test`, `area`, `arma_rnd`, `arrayfun`, `ascii`, `asctime`, `asecd`, `asind`, `assert`, `atand`, `autoreg_matrix`, `autumn`, `axes`, `axis`, `bar`, `barh`, `bartlett`, `bartlett_test`, `beep`, `betacdf`, `betainv`, `betapdf`, `betarnd`, `bicgstab`, `bicubic`, `binary`, `binocdf`, `binoinv`, `binopdf`, `binornd`, `bitcmp`, `bitget`, `bitset`, `blackman`, `blanks`, `blkdiag`, `bone`, `box`, `brighten`, `calendar`, `cast`, `cauchy_cdf`, `cauchy_inv`, `cauchy_pdf`, `cauchy_rnd`, `caxis`, `celldisp`, `center`, `cgs`, `chisquare_test_homogeneity`, `chisquare_test_independence`, `circshift`, `cla`, `clabel`, `clf`, `clock`, `cloglog`, `closereq`, `colon`, `colorbar`, `colormap`, `colperm`, `comet`, `common_size`, `commutation_matrix`, `compan`, `compare_versions`, `compass`, `computer`, `cond`, `condest`, `contour`, `contourc`, `contourf`, `contrast`, `conv`, `convhull`, `cool`, `copper`, `copyfile`, `cor`, `corrcoef`, `cor_test`, `cosd`, `cotd`, `cov`, `cplxpair`, `cross`, `cscd`, `cstrcat`, `csvread`, `csvwrite`, `ctime`, `cumtrapz`, `curl`, `cut`, `cylinder`, `date`, `datenum`, `datestr`, `datetick`, `datevec`, `dblquad`, `deal`, `deblank`, `deconv`, `delaunay`, `delaunayn`, `delete`, `demo`, `detrend`, `diffpara`, `diffuse`, `dir`, `discrete_cdf`, `discrete_inv`, `discrete_pdf`, `discrete_rnd`, `display`, `divergence`, `dlmwrite`, `dos`, `dsearch`, `dsearchn`, `duplication_matrix`, `durbinlevinson`, `ellipsoid`, `empirical_cdf`, `empirical_inv`, `empirical_pdf`, `empirical_rnd`, `eomday`, `errorbar`, `etime`, `etreeplot`, `example`, `expcdf`, `expinv`, `expm`, `exppdf`, `exprnd`, `ezcontour`, `ezcontourf`, `ezmesh`, `ezmeshc`, `ezplot`, `ezpolar`, `ezsurf`, `ezsurfc`, `factor`, `factorial`, `fail`, `fcdf`, `feather`, `fftconv`, `fftfilt`, `fftshift`, `figure`, `fileattrib`, `fileparts`, `fill`, `findall`, `findobj`, `findstr`, `finv`, `flag`, `flipdim`, `fliplr`, `flipud`, `fpdf`, `fplot`, `fractdiff`, `freqz`, `freqz_plot`, `frnd`, `fsolve`, `f_test_regression`, `ftp`, `fullfile`, `fzero`, `gamcdf`, `gaminv`, `gampdf`, `gamrnd`, `gca`, `gcbf`, `gcbo`, `gcf`, `genvarname`, `geocdf`, `geoinv`, `geopdf`, `geornd`, `getfield`, `ginput`, `glpk`, `gls`, `gplot`, `gradient`, `graphics_toolkit`, `gray`, `grid`, `griddata`, `griddatan`, `gtext`, `gunzip`, `gzip`, `hadamard`, `hamming`, `hankel`, `hanning`, `hggroup`, `hidden`, `hilb`, `hist`, `histc`, `hold`, `hot`, `hotelling_test`, `housh`, `hsv`, `hurst`, `hygecdf`, `hygeinv`, `hygepdf`, `hygernd`, `idivide`, `ifftshift`, `image`, `imagesc`, `imfinfo`, `imread`, `imshow`, `imwrite`, `index`, `info`, `inpolygon`, `inputname`, `interpft`, `interpn`, `intersect`, `invhilb`, `iqr`, `isa`, `isdefinite`, `isdir`, `is_duplicate_entry`, `isequal`, `isequalwithequalnans`, `isfigure`, `ishermitian`, `ishghandle`, `is_leap_year`, `isletter`, `ismac`, `ismember`, `ispc`, `isprime`, `isprop`, `isscalar`, `issquare`, `isstrprop`, `issymmetric`, `isunix`, `is_valid_file_id`, `isvector`, `jet`, `kendall`, `kolmogorov_smirnov_cdf`, `kolmogorov_smirnov_test`, `kruskal_wallis_test`, `krylov`, `kurtosis`, `laplace_cdf`, `laplace_inv`, `laplace_pdf`, `laplace_rnd`, `legend`, `legendre`, `license`, `line`, `linkprop`, `list_primes`, `loadaudio`, `loadobj`, `logistic_cdf`, `logistic_inv`, `logistic_pdf`, `logistic_rnd`, `logit`, `loglog`, `loglogerr`, `logm`, `logncdf`, `logninv`, `lognpdf`, `lognrnd`, `logspace`, `lookfor`, `ls_command`, `lsqnonneg`, `magic`, `mahalanobis`, `manova`, `matlabroot`, `mcnemar_test`, `mean`, `meansq`, `median`, `menu`, `mesh`, `meshc`, `meshgrid`, `meshz`, `mexext`, `mget`, `mkpp`, `mode`, `moment`, `movefile`, `mpoles`, `mput`, `namelengthmax`, `nargchk`, `nargoutchk`, `nbincdf`, `nbininv`, `nbinpdf`, `nbinrnd`, `nchoosek`, `ndgrid`, `newplot`, `news`, `nonzeros`, `normcdf`, `normest`, `norminv`, `normpdf`, `normrnd`, `now`, `nthroot`, `null`, `ocean`, `ols`, `onenormest`, `optimget`, `optimset`, `orderfields`, `orient`, `orth`, `pack`, `pareto`, `parseparams`, `pascal`, `patch`, `pathdef`, `pcg`, `pchip`, `pcolor`, `pcr`, `peaks`, `periodogram`, `perl`, `perms`, `pie`, `pink`, `planerot`, `playaudio`, `plot`, `plotmatrix`, `plotyy`, `poisscdf`, `poissinv`, `poisspdf`, `poissrnd`, `polar`, `poly`, `polyaffine`, `polyarea`, `polyderiv`, `polyfit`, `polygcd`, `polyint`, `polyout`, `polyreduce`, `polyval`, `polyvalm`, `postpad`, `powerset`, `ppder`, `ppint`, `ppjumps`, `ppplot`, `ppval`, `pqpnonneg`, `prepad`, `primes`, `print`, `print_usage`, `prism`, `probit`, `qp`, `qqplot`, `quadcc`, `quadgk`, `quadl`, `quadv`, `quiver`, `qzhess`, `rainbow`, `randi`, `range`, `rank`, `ranks`, `rat`, `reallog`, `realpow`, `realsqrt`, `record`, `rectangle_lw`, `rectangle_sw`, `rectint`, `refresh`, `refreshdata`, `regexptranslate`, `repmat`, `residue`, `ribbon`, `rindex`, `roots`, `rose`, `rosser`, `rotdim`, `rref`, `run`, `run_count`, `rundemos`, `run_test`, `runtests`, `saveas`, `saveaudio`, `saveobj`, `savepath`, `scatter`, `secd`, `semilogx`, `semilogxerr`, `semilogy`, `semilogyerr`, `setaudio`, `setdiff`, `setfield`, `setxor`, `shading`, `shift`, `shiftdim`, `sign_test`, `sinc`, `sind`, `sinetone`, `sinewave`, `skewness`, `slice`, `sombrero`, `sortrows`, `spaugment`, `spconvert`, `spdiags`, `spearman`, `spectral_adf`, `spectral_xdf`, `specular`, `speed`, `spencer`, `speye`, `spfun`, `sphere`, `spinmap`, `spline`, `spones`, `sprand`, `sprandn`, `sprandsym`, `spring`, `spstats`, `spy`, `sqp`, `stairs`, `statistics`, `std`, `stdnormal_cdf`, `stdnormal_inv`, `stdnormal_pdf`, `stdnormal_rnd`, `stem`, `stft`, `strcat`, `strchr`, `strjust`, `strmatch`, `strread`, `strsplit`, `strtok`, `strtrim`, `strtrunc`, `structfun`, `studentize`, `subplot`, `subsindex`, `subspace`, `substr`, `substruct`, `summer`, `surf`, `surface`, `surfc`, `surfl`, `surfnorm`, `svds`, `swapbytes`, `sylvester_matrix`, `symvar`, `synthesis`, `table`, `tand`, `tar`, `tcdf`, `tempdir`, `tempname`, `test`, `text`, `textread`, `textscan`, `tinv`, `title`, `toeplitz`, `tpdf`, `trace`, `trapz`, `treelayout`, `treeplot`, `triangle_lw`, `triangle_sw`, `tril`, `trimesh`, `triplequad`, `triplot`, `trisurf`, `triu`, `trnd`, `tsearchn`, `t_test`, `t_test_regression`, `type`, `unidcdf`, `unidinv`, `unidpdf`, `unidrnd`, `unifcdf`, `unifinv`, `unifpdf`, `unifrnd`, `union`, `unique`, `unix`, `unmkpp`, `unpack`, `untabify`, `untar`, `unwrap`, `unzip`, `u_test`, `validatestring`, `vander`, `var`, `var_test`, `vech`, `ver`, `version`, `view`, `voronoi`, `voronoin`, `waitforbuttonpress`, `wavread`, `wavwrite`, `wblcdf`, `wblinv`, `wblpdf`, `wblrnd`, `weekday`, `welch_test`, `what`, `white`, `whitebg`, `wienrnd`, `wilcoxon_test`, `wilkinson`, `winter`, `xlabel`, `xlim`, `ylabel`, `yulewalker`, `zip`, `zlabel`, `z_test`, `airy`, `amd`, `balance`, `besselh`, `besseli`, `besselj`, `besselk`, `bessely`, `bitpack`, `bsxfun`, `builtin`, `ccolamd`, `cellfun`, `cellslices`, `chol`, `choldelete`, `cholinsert`, `cholinv`, `cholshift`, `cholupdate`, `colamd`, `colloc`, `convhulln`, `convn`, `csymamd`, `cummax`, `cummin`, `daspk`, `daspk_options`, `dasrt`, `dasrt_options`, `dassl`, `dassl_options`, `dbclear`, `dbdown`, `dbstack`, `dbstatus`, `dbstop`, `dbtype`, `dbup`, `dbwhere`, `det`, `dlmread`, `dmperm`, `dot`, `eig`, `eigs`, `endgrent`, `endpwent`, `etree`, `fft`, `fftn`, `fftw`, `filter`, `find`, `full`, `gcd`, `getgrent`, `getgrgid`, `getgrnam`, `getpwent`, `getpwnam`, `getpwuid`, `getrusage`, `givens`, `gmtime`, `gnuplot_binary`, `hess`, `ifft`, `ifftn`, `inv`, `isdebugmode`, `issparse`, `kron`, `localtime`, `lookup`, `lsode`, `lsode_options`, `lu`, `luinc`, `luupdate`, `matrix_type`, `max`, `min`, `mktime`, `pinv`, `qr`, `qrdelete`, `qrinsert`, `qrshift`, `qrupdate`, `quad`, `quad_options`, `qz`, `rand`, `rande`, `randg`, `randn`, `randp`, `randperm`, `rcond`, `regexp`, `regexpi`, `regexprep`, `schur`, `setgrent`, `setpwent`, `sort`, `spalloc`, `sparse`, `spparms`, `sprank`, `sqrtm`, `strfind`, `strftime`, `strptime`, `strrep`, `svd`, `svd_driver`, `syl`, `symamd`, `symbfact`, `symrcm`, `time`, `tsearch`, `typecast`, `urlread`, `urlwrite`, `abs`, `acos`, `acosh`, `acot`, `acoth`, `acsc`, `acsch`, `angle`, `arg`, `asec`, `asech`, `asin`, `asinh`, `atan`, `atanh`, `beta`, `betainc`, `betaln`, `bincoeff`, `cbrt`, `ceil`, `conj`, `cos`, `cosh`, `cot`, `coth`, `csc`, `csch`, `erf`, `erfc`, `erfcx`, `erfinv`, `exp`, `finite`, `fix`, `floor`, `fmod`, `gamma`, `gammainc`, `gammaln`, `imag`, `isalnum`, `isalpha`, `isascii`, `iscntrl`, `isdigit`, `isfinite`, `isgraph`, `isinf`, `islower`, `isna`, `isnan`, `isprint`, `ispunct`, `isspace`, `isupper`, `isxdigit`, `lcm`, `lgamma`, `log`, `lower`, `mod`, `real`, `rem`, `round`, `roundb`, `sec`, `sech`, `sign`, `sin`, `sinh`, `sqrt`, `tan`, `tanh`, `toascii`, `tolower`, `xor`), NameBuiltin, nil}, + {Words(``, `\b`, `EDITOR`, `EXEC_PATH`, `I`, `IMAGE_PATH`, `NA`, `OCTAVE_HOME`, `OCTAVE_VERSION`, `PAGER`, `PAGER_FLAGS`, `SEEK_CUR`, `SEEK_END`, `SEEK_SET`, `SIG`, `S_ISBLK`, `S_ISCHR`, `S_ISDIR`, `S_ISFIFO`, `S_ISLNK`, `S_ISREG`, `S_ISSOCK`, `WCONTINUE`, `WCOREDUMP`, `WEXITSTATUS`, `WIFCONTINUED`, `WIFEXITED`, `WIFSIGNALED`, `WIFSTOPPED`, `WNOHANG`, `WSTOPSIG`, `WTERMSIG`, `WUNTRACED`), NameConstant, nil}, + {`-=|!=|!|/=|--`, Operator, nil}, + {`-|==|~=|<|>|<=|>=|&&|&|~|\|\|?`, Operator, nil}, + {`\*=|\+=|\^=|\/=|\\=|\*\*|\+\+|\.\*\*`, Operator, nil}, + {`\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\`, Operator, nil}, + {`[\[\](){}:@.,]`, Punctuation, nil}, + {`=|:|;`, Punctuation, nil}, + {`"[^"]*"`, LiteralString, nil}, + {`(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`\d+[eEf][+-]?[0-9]+`, LiteralNumberFloat, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`(?<=[\w)\].])\'+`, Operator, nil}, + {`(?])*>[egimosx]*`, LiteralStringRegex, Pop(1)}, + {`\[(\\\\|\\[^\\]|[^\\\]])*\][egimosx]*`, LiteralStringRegex, Pop(1)}, + {`\((\\\\|\\[^\\]|[^\\)])*\)[egimosx]*`, LiteralStringRegex, Pop(1)}, + {`@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*`, LiteralStringRegex, Pop(1)}, + {`%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*`, LiteralStringRegex, Pop(1)}, + {`\$(\\\\|\\[^\\]|[^\\$])*\$[egimosx]*`, LiteralStringRegex, Pop(1)}, + }, + "root": { + {`\A\#!.+?$`, CommentHashbang, nil}, + {`\#.*?$`, CommentSingle, nil}, + {`^=[a-zA-Z0-9]+\s+.*?\n=cut`, CommentMultiline, nil}, + {Words(``, `\b`, `case`, `continue`, `do`, `else`, `elsif`, `for`, `foreach`, `if`, `last`, `my`, `next`, `our`, `redo`, `reset`, `then`, `unless`, `until`, `while`, `print`, `new`, `BEGIN`, `CHECK`, `INIT`, `END`, `return`), Keyword, nil}, + {`(format)(\s+)(\w+)(\s*)(=)(\s*\n)`, ByGroups(Keyword, Text, Name, Text, Punctuation, Text), Push("format")}, + {`(eq|lt|gt|le|ge|ne|not|and|or|cmp)\b`, OperatorWord, nil}, + {`s/(\\\\|\\[^\\]|[^\\/])*/(\\\\|\\[^\\]|[^\\/])*/[egimosx]*`, LiteralStringRegex, nil}, + {`s!(\\\\|\\!|[^!])*!(\\\\|\\!|[^!])*![egimosx]*`, LiteralStringRegex, nil}, + {`s\\(\\\\|[^\\])*\\(\\\\|[^\\])*\\[egimosx]*`, LiteralStringRegex, nil}, + {`s@(\\\\|\\[^\\]|[^\\@])*@(\\\\|\\[^\\]|[^\\@])*@[egimosx]*`, LiteralStringRegex, nil}, + {`s%(\\\\|\\[^\\]|[^\\%])*%(\\\\|\\[^\\]|[^\\%])*%[egimosx]*`, LiteralStringRegex, nil}, + {`s\{(\\\\|\\[^\\]|[^\\}])*\}\s*`, LiteralStringRegex, Push("balanced-regex")}, + {`s<(\\\\|\\[^\\]|[^\\>])*>\s*`, LiteralStringRegex, Push("balanced-regex")}, + {`s\[(\\\\|\\[^\\]|[^\\\]])*\]\s*`, LiteralStringRegex, Push("balanced-regex")}, + {`s\((\\\\|\\[^\\]|[^\\)])*\)\s*`, LiteralStringRegex, Push("balanced-regex")}, + {`m?/(\\\\|\\[^\\]|[^\\/\n])*/[gcimosx]*`, LiteralStringRegex, nil}, + {`m(?=[/!\\{<\[(@%$])`, LiteralStringRegex, Push("balanced-regex")}, + {`((?<==~)|(?<=\())\s*/(\\\\|\\[^\\]|[^\\/])*/[gcimosx]*`, LiteralStringRegex, nil}, + {`\s+`, Text, nil}, + {Words(``, `\b`, `abs`, `accept`, `alarm`, `atan2`, `bind`, `binmode`, `bless`, `caller`, `chdir`, `chmod`, `chomp`, `chop`, `chown`, `chr`, `chroot`, `close`, `closedir`, `connect`, `continue`, `cos`, `crypt`, `dbmclose`, `dbmopen`, `defined`, `delete`, `die`, `dump`, `each`, `endgrent`, `endhostent`, `endnetent`, `endprotoent`, `endpwent`, `endservent`, `eof`, `eval`, `exec`, `exists`, `exit`, `exp`, `fcntl`, `fileno`, `flock`, `fork`, `format`, `formline`, `getc`, `getgrent`, `getgrgid`, `getgrnam`, `gethostbyaddr`, `gethostbyname`, `gethostent`, `getlogin`, `getnetbyaddr`, `getnetbyname`, `getnetent`, `getpeername`, `getpgrp`, `getppid`, `getpriority`, `getprotobyname`, `getprotobynumber`, `getprotoent`, `getpwent`, `getpwnam`, `getpwuid`, `getservbyname`, `getservbyport`, `getservent`, `getsockname`, `getsockopt`, `glob`, `gmtime`, `goto`, `grep`, `hex`, `import`, `index`, `int`, `ioctl`, `join`, `keys`, `kill`, `last`, `lc`, `lcfirst`, `length`, `link`, `listen`, `local`, `localtime`, `log`, `lstat`, `map`, `mkdir`, `msgctl`, `msgget`, `msgrcv`, `msgsnd`, `my`, `next`, `oct`, `open`, `opendir`, `ord`, `our`, `pack`, `pipe`, `pop`, `pos`, `printf`, `prototype`, `push`, `quotemeta`, `rand`, `read`, `readdir`, `readline`, `readlink`, `readpipe`, `recv`, `redo`, `ref`, `rename`, `reverse`, `rewinddir`, `rindex`, `rmdir`, `scalar`, `seek`, `seekdir`, `select`, `semctl`, `semget`, `semop`, `send`, `setgrent`, `sethostent`, `setnetent`, `setpgrp`, `setpriority`, `setprotoent`, `setpwent`, `setservent`, `setsockopt`, `shift`, `shmctl`, `shmget`, `shmread`, `shmwrite`, `shutdown`, `sin`, `sleep`, `socket`, `socketpair`, `sort`, `splice`, `split`, `sprintf`, `sqrt`, `srand`, `stat`, `study`, `substr`, `symlink`, `syscall`, `sysopen`, `sysread`, `sysseek`, `system`, `syswrite`, `tell`, `telldir`, `tie`, `tied`, `time`, `times`, `tr`, `truncate`, `uc`, `ucfirst`, `umask`, `undef`, `unlink`, `unpack`, `unshift`, `untie`, `utime`, `values`, `vec`, `wait`, `waitpid`, `wantarray`, `warn`, `write`), NameBuiltin, nil}, + {`((__(DATA|DIE|WARN)__)|(STD(IN|OUT|ERR)))\b`, NameBuiltinPseudo, nil}, + {`(<<)([\'"]?)([a-zA-Z_]\w*)(\2;?\n.*?\n)(\3)(\n)`, ByGroups(LiteralString, LiteralString, LiteralStringDelimiter, LiteralString, LiteralStringDelimiter, Text), nil}, + {`__END__`, CommentPreproc, Push("end-part")}, + {`\$\^[ADEFHILMOPSTWX]`, NameVariableGlobal, nil}, + {"\\$[\\\\\\\"\\[\\]'&`+*.,;=%~?@$!<>(^|/-](?!\\w)", NameVariableGlobal, nil}, + {`[$@%#]+`, NameVariable, Push("varname")}, + {`0_?[0-7]+(_[0-7]+)*`, LiteralNumberOct, nil}, + {`0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*`, LiteralNumberHex, nil}, + {`0b[01]+(_[01]+)*`, LiteralNumberBin, nil}, + {`(?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?`, LiteralNumberFloat, nil}, + {`(?i)\d+(_\d*)*e[+-]?\d+(_\d*)*`, LiteralNumberFloat, nil}, + {`\d+(_\d+)*`, LiteralNumberInteger, nil}, + {`'(\\\\|\\[^\\]|[^'\\])*'`, LiteralString, nil}, + {`"(\\\\|\\[^\\]|[^"\\])*"`, LiteralString, nil}, + {"`(\\\\\\\\|\\\\[^\\\\]|[^`\\\\])*`", LiteralStringBacktick, nil}, + {`<([^\s>]+)>`, LiteralStringRegex, nil}, + {`(q|qq|qw|qr|qx)\{`, LiteralStringOther, Push("cb-string")}, + {`(q|qq|qw|qr|qx)\(`, LiteralStringOther, Push("rb-string")}, + {`(q|qq|qw|qr|qx)\[`, LiteralStringOther, Push("sb-string")}, + {`(q|qq|qw|qr|qx)\<`, LiteralStringOther, Push("lt-string")}, + {`(q|qq|qw|qr|qx)([\W_])(.|\n)*?\2`, LiteralStringOther, nil}, + {`(package)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)`, ByGroups(Keyword, Text, NameNamespace), nil}, + {`(use|require|no)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)`, ByGroups(Keyword, Text, NameNamespace), nil}, + {`(sub)(\s+)`, ByGroups(Keyword, Text), Push("funcname")}, + {Words(``, `\b`, `no`, `package`, `require`, `use`), Keyword, nil}, + {`(\[\]|\*\*|::|<<|>>|>=|<=>|<=|={3}|!=|=~|!~|&&?|\|\||\.{1,3})`, Operator, nil}, + {`[-+/*%=<>&^|!\\~]=?`, Operator, nil}, + {`[()\[\]:;,<>/?{}]`, Punctuation, nil}, + {`(?=\w)`, Name, Push("name")}, + }, + "format": { + {`\.\n`, LiteralStringInterpol, Pop(1)}, + {`[^\n]*\n`, LiteralStringInterpol, nil}, + }, + "varname": { + {`\s+`, Text, nil}, + {`\{`, Punctuation, Pop(1)}, + {`\)|,`, Punctuation, Pop(1)}, + {`\w+::`, NameNamespace, nil}, + {`[\w:]+`, NameVariable, Pop(1)}, + }, + "name": { + {`[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*(::)?(?=\s*->)`, NameNamespace, Pop(1)}, + {`[a-zA-Z_]\w*(::[a-zA-Z_]\w*)*::`, NameNamespace, Pop(1)}, + {`[\w:]+`, Name, Pop(1)}, + {`[A-Z_]+(?=\W)`, NameConstant, Pop(1)}, + {`(?=\W)`, Text, Pop(1)}, + }, + "funcname": { + {`[a-zA-Z_]\w*[!?]?`, NameFunction, nil}, + {`\s+`, Text, nil}, + {`(\([$@%]*\))(\s*)`, ByGroups(Punctuation, Text), nil}, + {`;`, Punctuation, Pop(1)}, + {`.*?\{`, Punctuation, Pop(1)}, + }, + "cb-string": { + {`\\[{}\\]`, LiteralStringOther, nil}, + {`\\`, LiteralStringOther, nil}, + {`\{`, LiteralStringOther, Push("cb-string")}, + {`\}`, LiteralStringOther, Pop(1)}, + {`[^{}\\]+`, LiteralStringOther, nil}, + }, + "rb-string": { + {`\\[()\\]`, LiteralStringOther, nil}, + {`\\`, LiteralStringOther, nil}, + {`\(`, LiteralStringOther, Push("rb-string")}, + {`\)`, LiteralStringOther, Pop(1)}, + {`[^()]+`, LiteralStringOther, nil}, + }, + "sb-string": { + {`\\[\[\]\\]`, LiteralStringOther, nil}, + {`\\`, LiteralStringOther, nil}, + {`\[`, LiteralStringOther, Push("sb-string")}, + {`\]`, LiteralStringOther, Pop(1)}, + {`[^\[\]]+`, LiteralStringOther, nil}, + }, + "lt-string": { + {`\\[<>\\]`, LiteralStringOther, nil}, + {`\\`, LiteralStringOther, nil}, + {`\<`, LiteralStringOther, Push("lt-string")}, + {`\>`, LiteralStringOther, Pop(1)}, + {`[^<>]+`, LiteralStringOther, nil}, + }, + "end-part": { + {`.+`, CommentPreproc, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/php.go b/vendor/github.com/alecthomas/chroma/lexers/php.go new file mode 100644 index 0000000..6e2370e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/php.go @@ -0,0 +1,81 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// PHP lexer. +var PHP = Register(MustNewLexer( + &Config{ + Name: "PHP", + Aliases: []string{"php", "php3", "php4", "php5"}, + Filenames: []string{"*.php", "*.php[345]", "*.inc"}, + MimeTypes: []string{"text/x-php"}, + DotAll: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`<\?(php)?`, CommentPreproc, Push("php")}, + {`[^<]+`, Other, nil}, + {`<`, Other, nil}, + }, + "php": { + {`\?>`, CommentPreproc, Pop(1)}, + {`(<<<)([\'"]?)((?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*)(\2\n.*?\n\s*)(\3)(;?)(\n)`, ByGroups(LiteralString, LiteralString, LiteralStringDelimiter, LiteralString, LiteralStringDelimiter, Punctuation, Text), nil}, + {`\s+`, Text, nil}, + {`#.*?\n`, CommentSingle, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*\*/`, CommentMultiline, nil}, + {`/\*\*.*?\*/`, LiteralStringDoc, nil}, + {`/\*.*?\*/`, CommentMultiline, nil}, + {`(->|::)(\s*)((?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*)`, ByGroups(Operator, Text, NameAttribute), nil}, + {`[~!%^&*+=|:.<>/@-]+`, Operator, nil}, + {`\?`, Operator, nil}, + {`[\[\]{}();,]+`, Punctuation, nil}, + {`(class)(\s+)`, ByGroups(Keyword, Text), Push("classname")}, + {`(function)(\s*)(?=\()`, ByGroups(Keyword, Text), nil}, + {`(function)(\s+)(&?)(\s*)`, ByGroups(Keyword, Text, Operator, Text), Push("functionname")}, + {`(const)(\s+)((?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*)`, ByGroups(Keyword, Text, NameConstant), nil}, + {`(and|E_PARSE|old_function|E_ERROR|or|as|E_WARNING|parent|eval|PHP_OS|break|exit|case|extends|PHP_VERSION|cfunction|FALSE|print|for|require|continue|foreach|require_once|declare|return|default|static|do|switch|die|stdClass|echo|else|TRUE|elseif|var|empty|if|xor|enddeclare|include|virtual|endfor|include_once|while|endforeach|global|endif|list|endswitch|new|endwhile|not|array|E_ALL|NULL|final|php_user_filter|interface|implements|public|private|protected|abstract|clone|try|catch|throw|this|use|namespace|trait|yield|finally)\b`, Keyword, nil}, + {`(true|false|null)\b`, KeywordConstant, nil}, + Include("magicconstants"), + {`\$\{\$+(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*\}`, NameVariable, nil}, + {`\$+(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*`, NameVariable, nil}, + {`(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*`, NameOther, nil}, + {`(\d+\.\d*|\d*\.\d+)(e[+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`\d+e[+-]?[0-9]+`, LiteralNumberFloat, nil}, + {`0[0-7]+`, LiteralNumberOct, nil}, + {`0x[a-f0-9]+`, LiteralNumberHex, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`0b[01]+`, LiteralNumberBin, nil}, + {`'([^'\\]*(?:\\.[^'\\]*)*)'`, LiteralStringSingle, nil}, + {"`([^`\\\\]*(?:\\\\.[^`\\\\]*)*)`", LiteralStringBacktick, nil}, + {`"`, LiteralStringDouble, Push("string")}, + }, + "magicfuncs": { + {Words(``, `\b`, `__construct`, `__destruct`, `__call`, `__callStatic`, `__get`, `__set`, `__isset`, `__unset`, `__sleep`, `__wakeup`, `__toString`, `__invoke`, `__set_state`, `__clone`, `__debugInfo`), NameFunctionMagic, nil}, + }, + "magicconstants": { + {Words(``, `\b`, `__LINE__`, `__FILE__`, `__DIR__`, `__FUNCTION__`, `__CLASS__`, `__TRAIT__`, `__METHOD__`, `__NAMESPACE__`), NameConstant, nil}, + }, + "classname": { + {`(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*`, NameClass, Pop(1)}, + }, + "functionname": { + Include("magicfuncs"), + {`(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*`, NameFunction, Pop(1)}, + Default(Pop(1)), + }, + "string": { + {`"`, LiteralStringDouble, Pop(1)}, + {`[^{$"\\]+`, LiteralStringDouble, nil}, + {`\\([nrt"$\\]|[0-7]{1,3}|x[0-9a-f]{1,2})`, LiteralStringEscape, nil}, + {`\$(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*(\[\S+?\]|->(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w]|[^\x00-\x7f])*)?`, LiteralStringInterpol, nil}, + {`(\{\$\{)(.*?)(\}\})`, ByGroups(LiteralStringInterpol, UsingSelf("root"), LiteralStringInterpol), nil}, + {`(\{)(\$.*?)(\})`, ByGroups(LiteralStringInterpol, UsingSelf("root"), LiteralStringInterpol), nil}, + {`(\$\{)(\S+)(\})`, ByGroups(LiteralStringInterpol, NameVariable, LiteralStringInterpol), nil}, + {`[${\\]`, LiteralStringDouble, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/pig.go b/vendor/github.com/alecthomas/chroma/lexers/pig.go new file mode 100644 index 0000000..39420b3 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/pig.go @@ -0,0 +1,56 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Pig lexer. +var Pig = Register(MustNewLexer( + &Config{ + Name: "Pig", + Aliases: []string{"pig"}, + Filenames: []string{"*.pig"}, + MimeTypes: []string{"text/x-pig"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`--.*`, Comment, nil}, + {`/\*[\w\W]*?\*/`, CommentMultiline, nil}, + {`\\\n`, Text, nil}, + {`\\`, Text, nil}, + {`\'(?:\\[ntbrf\\\']|\\u[0-9a-f]{4}|[^\'\\\n\r])*\'`, LiteralString, nil}, + Include("keywords"), + Include("types"), + Include("builtins"), + Include("punct"), + Include("operators"), + {`[0-9]*\.[0-9]+(e[0-9]+)?[fd]?`, LiteralNumberFloat, nil}, + {`0x[0-9a-f]+`, LiteralNumberHex, nil}, + {`[0-9]+L?`, LiteralNumberInteger, nil}, + {`\n`, Text, nil}, + {`([a-z_]\w*)(\s*)(\()`, ByGroups(NameFunction, Text, Punctuation), nil}, + {`[()#:]`, Text, nil}, + {`[^(:#\'")\s]+`, Text, nil}, + {`\S+\s+`, Text, nil}, + }, + "keywords": { + {`(assert|and|any|all|arrange|as|asc|bag|by|cache|CASE|cat|cd|cp|%declare|%default|define|dense|desc|describe|distinct|du|dump|eval|exex|explain|filter|flatten|foreach|full|generate|group|help|if|illustrate|import|inner|input|into|is|join|kill|left|limit|load|ls|map|matches|mkdir|mv|not|null|onschema|or|order|outer|output|parallel|pig|pwd|quit|register|returns|right|rm|rmf|rollup|run|sample|set|ship|split|stderr|stdin|stdout|store|stream|through|union|using|void)\b`, Keyword, nil}, + }, + "builtins": { + {`(AVG|BinStorage|cogroup|CONCAT|copyFromLocal|copyToLocal|COUNT|cross|DIFF|MAX|MIN|PigDump|PigStorage|SIZE|SUM|TextLoader|TOKENIZE)\b`, NameBuiltin, nil}, + }, + "types": { + {`(bytearray|BIGINTEGER|BIGDECIMAL|chararray|datetime|double|float|int|long|tuple)\b`, KeywordType, nil}, + }, + "punct": { + {`[;(){}\[\]]`, Punctuation, nil}, + }, + "operators": { + {`[#=,./%+\-?]`, Operator, nil}, + {`(eq|gt|lt|gte|lte|neq|matches)\b`, Operator, nil}, + {`(==|<=|<|>=|>|!=)`, Operator, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/pkgconfig.go b/vendor/github.com/alecthomas/chroma/lexers/pkgconfig.go new file mode 100644 index 0000000..c91228c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/pkgconfig.go @@ -0,0 +1,40 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Pkgconfig lexer. +var Pkgconfig = Register(MustNewLexer( + &Config{ + Name: "PkgConfig", + Aliases: []string{"pkgconfig"}, + Filenames: []string{"*.pc"}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`#.*$`, CommentSingle, nil}, + {`^(\w+)(=)`, ByGroups(NameAttribute, Operator), nil}, + {`^([\w.]+)(:)`, ByGroups(NameTag, Punctuation), Push("spvalue")}, + Include("interp"), + {`[^${}#=:\n.]+`, Text, nil}, + {`.`, Text, nil}, + }, + "interp": { + {`\$\$`, Text, nil}, + {`\$\{`, LiteralStringInterpol, Push("curly")}, + }, + "curly": { + {`\}`, LiteralStringInterpol, Pop(1)}, + {`\w+`, NameAttribute, nil}, + }, + "spvalue": { + Include("interp"), + {`#.*$`, CommentSingle, Pop(1)}, + {`\n`, Text, Pop(1)}, + {`[^${}#\n]+`, Text, nil}, + {`.`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/plsql.go b/vendor/github.com/alecthomas/chroma/lexers/plsql.go new file mode 100644 index 0000000..e6ec72d --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/plsql.go @@ -0,0 +1,57 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Pl/Pgsql lexer. +var PLpgSQL = Register(MustNewLexer( + &Config{ + Name: "PL/pgSQL", + Aliases: []string{"plpgsql"}, + Filenames: []string{}, + MimeTypes: []string{"text/x-plpgsql"}, + NotMultiline: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\%[a-z]\w*\b`, NameBuiltin, nil}, + {`:=`, Operator, nil}, + {`\<\<[a-z]\w*\>\>`, NameLabel, nil}, + {`\#[a-z]\w*\b`, KeywordPseudo, nil}, + {`\s+`, Text, nil}, + {`--.*\n?`, CommentSingle, nil}, + {`/\*`, CommentMultiline, Push("multiline-comments")}, + {`(bigint|bigserial|bit|bit\s+varying|bool|boolean|box|bytea|char|character|character\s+varying|cidr|circle|date|decimal|double\s+precision|float4|float8|inet|int|int2|int4|int8|integer|interval|json|jsonb|line|lseg|macaddr|money|numeric|path|pg_lsn|point|polygon|real|serial|serial2|serial4|serial8|smallint|smallserial|text|time|timestamp|timestamptz|timetz|tsquery|tsvector|txid_snapshot|uuid|varbit|varchar|with\s+time\s+zone|without\s+time\s+zone|xml|anyarray|anyelement|anyenum|anynonarray|anyrange|cstring|fdw_handler|internal|language_handler|opaque|record|void)\b`, NameBuiltin, nil}, + {Words(``, `\b`, `ABORT`, `ABSOLUTE`, `ACCESS`, `ACTION`, `ADD`, `ADMIN`, `AFTER`, `AGGREGATE`, `ALL`, `ALSO`, `ALTER`, `ALWAYS`, `ANALYSE`, `ANALYZE`, `AND`, `ANY`, `ARRAY`, `AS`, `ASC`, `ASSERTION`, `ASSIGNMENT`, `ASYMMETRIC`, `AT`, `ATTRIBUTE`, `AUTHORIZATION`, `BACKWARD`, `BEFORE`, `BEGIN`, `BETWEEN`, `BIGINT`, `BINARY`, `BIT`, `BOOLEAN`, `BOTH`, `BY`, `CACHE`, `CALLED`, `CASCADE`, `CASCADED`, `CASE`, `CAST`, `CATALOG`, `CHAIN`, `CHAR`, `CHARACTER`, `CHARACTERISTICS`, `CHECK`, `CHECKPOINT`, `CLASS`, `CLOSE`, `CLUSTER`, `COALESCE`, `COLLATE`, `COLLATION`, `COLUMN`, `COMMENT`, `COMMENTS`, `COMMIT`, `COMMITTED`, `CONCURRENTLY`, `CONFIGURATION`, `CONNECTION`, `CONSTRAINT`, `CONSTRAINTS`, `CONTENT`, `CONTINUE`, `CONVERSION`, `COPY`, `COST`, `CREATE`, `CROSS`, `CSV`, `CURRENT`, `CURRENT_CATALOG`, `CURRENT_DATE`, `CURRENT_ROLE`, `CURRENT_SCHEMA`, `CURRENT_TIME`, `CURRENT_TIMESTAMP`, `CURRENT_USER`, `CURSOR`, `CYCLE`, `DATA`, `DATABASE`, `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`, `EVENT`, `EXCEPT`, `EXCLUDE`, `EXCLUDING`, `EXCLUSIVE`, `EXECUTE`, `EXISTS`, `EXPLAIN`, `EXTENSION`, `EXTERNAL`, `EXTRACT`, `FALSE`, `FAMILY`, `FETCH`, `FILTER`, `FIRST`, `FLOAT`, `FOLLOWING`, `FOR`, `FORCE`, `FOREIGN`, `FORWARD`, `FREEZE`, `FROM`, `FULL`, `FUNCTION`, `FUNCTIONS`, `GLOBAL`, `GRANT`, `GRANTED`, `GREATEST`, `GROUP`, `HANDLER`, `HAVING`, `HEADER`, `HOLD`, `HOUR`, `IDENTITY`, `IF`, `ILIKE`, `IMMEDIATE`, `IMMUTABLE`, `IMPLICIT`, `IN`, `INCLUDING`, `INCREMENT`, `INDEX`, `INDEXES`, `INHERIT`, `INHERITS`, `INITIALLY`, `INLINE`, `INNER`, `INOUT`, `INPUT`, `INSENSITIVE`, `INSERT`, `INSTEAD`, `INT`, `INTEGER`, `INTERSECT`, `INTERVAL`, `INTO`, `INVOKER`, `IS`, `ISNULL`, `ISOLATION`, `JOIN`, `KEY`, `LABEL`, `LANGUAGE`, `LARGE`, `LAST`, `LATERAL`, `LC_COLLATE`, `LC_CTYPE`, `LEADING`, `LEAKPROOF`, `LEAST`, `LEFT`, `LEVEL`, `LIKE`, `LIMIT`, `LISTEN`, `LOAD`, `LOCAL`, `LOCALTIME`, `LOCALTIMESTAMP`, `LOCATION`, `LOCK`, `MAPPING`, `MATCH`, `MATERIALIZED`, `MAXVALUE`, `MINUTE`, `MINVALUE`, `MODE`, `MONTH`, `MOVE`, `NAME`, `NAMES`, `NATIONAL`, `NATURAL`, `NCHAR`, `NEXT`, `NO`, `NONE`, `NOT`, `NOTHING`, `NOTIFY`, `NOTNULL`, `NOWAIT`, `NULL`, `NULLIF`, `NULLS`, `NUMERIC`, `OBJECT`, `OF`, `OFF`, `OFFSET`, `OIDS`, `ON`, `ONLY`, `OPERATOR`, `OPTION`, `OPTIONS`, `OR`, `ORDER`, `ORDINALITY`, `OUT`, `OUTER`, `OVER`, `OVERLAPS`, `OVERLAY`, `OWNED`, `OWNER`, `PARSER`, `PARTIAL`, `PARTITION`, `PASSING`, `PASSWORD`, `PLACING`, `PLANS`, `POLICY`, `POSITION`, `PRECEDING`, `PRECISION`, `PREPARE`, `PREPARED`, `PRESERVE`, `PRIMARY`, `PRIOR`, `PRIVILEGES`, `PROCEDURAL`, `PROCEDURE`, `PROGRAM`, `QUOTE`, `RANGE`, `READ`, `REAL`, `REASSIGN`, `RECHECK`, `RECURSIVE`, `REF`, `REFERENCES`, `REFRESH`, `REINDEX`, `RELATIVE`, `RELEASE`, `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`, `SNAPSHOT`, `SOME`, `STABLE`, `STANDALONE`, `START`, `STATEMENT`, `STATISTICS`, `STDIN`, `STDOUT`, `STORAGE`, `STRICT`, `STRIP`, `SUBSTRING`, `SYMMETRIC`, `SYSID`, `SYSTEM`, `TABLE`, `TABLES`, `TABLESPACE`, `TEMP`, `TEMPLATE`, `TEMPORARY`, `TEXT`, `THEN`, `TIME`, `TIMESTAMP`, `TO`, `TRAILING`, `TRANSACTION`, `TREAT`, `TRIGGER`, `TRIM`, `TRUE`, `TRUNCATE`, `TRUSTED`, `TYPE`, `TYPES`, `UNBOUNDED`, `UNCOMMITTED`, `UNENCRYPTED`, `UNION`, `UNIQUE`, `UNKNOWN`, `UNLISTEN`, `UNLOGGED`, `UNTIL`, `UPDATE`, `USER`, `USING`, `VACUUM`, `VALID`, `VALIDATE`, `VALIDATOR`, `VALUE`, `VALUES`, `VARCHAR`, `VARIADIC`, `VARYING`, `VERBOSE`, `VERSION`, `VIEW`, `VIEWS`, `VOLATILE`, `WHEN`, `WHERE`, `WHITESPACE`, `WINDOW`, `WITH`, `WITHIN`, `WITHOUT`, `WORK`, `WRAPPER`, `WRITE`, `XML`, `XMLATTRIBUTES`, `XMLCONCAT`, `XMLELEMENT`, `XMLEXISTS`, `XMLFOREST`, `XMLPARSE`, `XMLPI`, `XMLROOT`, `XMLSERIALIZE`, `YEAR`, `YES`, `ZONE`, `ALIAS`, `CONSTANT`, `DIAGNOSTICS`, `ELSIF`, `EXCEPTION`, `EXIT`, `FOREACH`, `GET`, `LOOP`, `NOTICE`, `OPEN`, `PERFORM`, `QUERY`, `RAISE`, `RETURN`, `REVERSE`, `SQLSTATE`, `WHILE`), Keyword, nil}, + {"[+*/<>=~!@#%^&|`?-]+", Operator, nil}, + {`::`, Operator, nil}, + {`\$\d+`, NameVariable, nil}, + {`([0-9]*\.[0-9]*|[0-9]+)(e[+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`((?:E|U&)?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("string")}, + {`((?:U&)?)(")`, ByGroups(LiteralStringAffix, LiteralStringName), Push("quoted-ident")}, + // { `(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)`, ?? ??, nil }, + {`[a-z_]\w*`, Name, nil}, + {`:(['"]?)[a-z]\w*\b\1`, NameVariable, nil}, + {`[;:()\[\]{},.]`, Punctuation, nil}, + }, + "multiline-comments": { + {`/\*`, CommentMultiline, Push("multiline-comments")}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[^/*]+`, CommentMultiline, nil}, + {`[/*]`, CommentMultiline, nil}, + }, + "string": { + {`[^']+`, LiteralStringSingle, nil}, + {`''`, LiteralStringSingle, nil}, + {`'`, LiteralStringSingle, Pop(1)}, + }, + "quoted-ident": { + {`[^"]+`, LiteralStringName, nil}, + {`""`, LiteralStringName, nil}, + {`"`, LiteralStringName, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/postgres.go b/vendor/github.com/alecthomas/chroma/lexers/postgres.go new file mode 100644 index 0000000..f5bfe0b --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/postgres.go @@ -0,0 +1,53 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Postgresql Sql Dialect lexer. +var PostgreSQL = Register(MustNewLexer( + &Config{ + Name: "PostgreSQL SQL dialect", + Aliases: []string{"postgresql", "postgres"}, + Filenames: []string{}, + MimeTypes: []string{"text/x-postgresql"}, + NotMultiline: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`--.*\n?`, CommentSingle, nil}, + {`/\*`, CommentMultiline, Push("multiline-comments")}, + {`(bigint|bigserial|bit|bit\s+varying|bool|boolean|box|bytea|char|character|character\s+varying|cidr|circle|date|decimal|double\s+precision|float4|float8|inet|int|int2|int4|int8|integer|interval|json|jsonb|line|lseg|macaddr|money|numeric|path|pg_lsn|point|polygon|real|serial|serial2|serial4|serial8|smallint|smallserial|text|time|timestamp|timestamptz|timetz|tsquery|tsvector|txid_snapshot|uuid|varbit|varchar|with\s+time\s+zone|without\s+time\s+zone|xml|anyarray|anyelement|anyenum|anynonarray|anyrange|cstring|fdw_handler|internal|language_handler|opaque|record|void)\b`, NameBuiltin, nil}, + {Words(``, `\b`, `ABORT`, `ABSOLUTE`, `ACCESS`, `ACTION`, `ADD`, `ADMIN`, `AFTER`, `AGGREGATE`, `ALL`, `ALSO`, `ALTER`, `ALWAYS`, `ANALYSE`, `ANALYZE`, `AND`, `ANY`, `ARRAY`, `AS`, `ASC`, `ASSERTION`, `ASSIGNMENT`, `ASYMMETRIC`, `AT`, `ATTRIBUTE`, `AUTHORIZATION`, `BACKWARD`, `BEFORE`, `BEGIN`, `BETWEEN`, `BIGINT`, `BINARY`, `BIT`, `BOOLEAN`, `BOTH`, `BY`, `CACHE`, `CALLED`, `CASCADE`, `CASCADED`, `CASE`, `CAST`, `CATALOG`, `CHAIN`, `CHAR`, `CHARACTER`, `CHARACTERISTICS`, `CHECK`, `CHECKPOINT`, `CLASS`, `CLOSE`, `CLUSTER`, `COALESCE`, `COLLATE`, `COLLATION`, `COLUMN`, `COMMENT`, `COMMENTS`, `COMMIT`, `COMMITTED`, `CONCURRENTLY`, `CONFIGURATION`, `CONNECTION`, `CONSTRAINT`, `CONSTRAINTS`, `CONTENT`, `CONTINUE`, `CONVERSION`, `COPY`, `COST`, `CREATE`, `CROSS`, `CSV`, `CURRENT`, `CURRENT_CATALOG`, `CURRENT_DATE`, `CURRENT_ROLE`, `CURRENT_SCHEMA`, `CURRENT_TIME`, `CURRENT_TIMESTAMP`, `CURRENT_USER`, `CURSOR`, `CYCLE`, `DATA`, `DATABASE`, `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`, `EVENT`, `EXCEPT`, `EXCLUDE`, `EXCLUDING`, `EXCLUSIVE`, `EXECUTE`, `EXISTS`, `EXPLAIN`, `EXTENSION`, `EXTERNAL`, `EXTRACT`, `FALSE`, `FAMILY`, `FETCH`, `FILTER`, `FIRST`, `FLOAT`, `FOLLOWING`, `FOR`, `FORCE`, `FOREIGN`, `FORWARD`, `FREEZE`, `FROM`, `FULL`, `FUNCTION`, `FUNCTIONS`, `GLOBAL`, `GRANT`, `GRANTED`, `GREATEST`, `GROUP`, `HANDLER`, `HAVING`, `HEADER`, `HOLD`, `HOUR`, `IDENTITY`, `IF`, `ILIKE`, `IMMEDIATE`, `IMMUTABLE`, `IMPLICIT`, `IN`, `INCLUDING`, `INCREMENT`, `INDEX`, `INDEXES`, `INHERIT`, `INHERITS`, `INITIALLY`, `INLINE`, `INNER`, `INOUT`, `INPUT`, `INSENSITIVE`, `INSERT`, `INSTEAD`, `INT`, `INTEGER`, `INTERSECT`, `INTERVAL`, `INTO`, `INVOKER`, `IS`, `ISNULL`, `ISOLATION`, `JOIN`, `KEY`, `LABEL`, `LANGUAGE`, `LARGE`, `LAST`, `LATERAL`, `LC_COLLATE`, `LC_CTYPE`, `LEADING`, `LEAKPROOF`, `LEAST`, `LEFT`, `LEVEL`, `LIKE`, `LIMIT`, `LISTEN`, `LOAD`, `LOCAL`, `LOCALTIME`, `LOCALTIMESTAMP`, `LOCATION`, `LOCK`, `MAPPING`, `MATCH`, `MATERIALIZED`, `MAXVALUE`, `MINUTE`, `MINVALUE`, `MODE`, `MONTH`, `MOVE`, `NAME`, `NAMES`, `NATIONAL`, `NATURAL`, `NCHAR`, `NEXT`, `NO`, `NONE`, `NOT`, `NOTHING`, `NOTIFY`, `NOTNULL`, `NOWAIT`, `NULL`, `NULLIF`, `NULLS`, `NUMERIC`, `OBJECT`, `OF`, `OFF`, `OFFSET`, `OIDS`, `ON`, `ONLY`, `OPERATOR`, `OPTION`, `OPTIONS`, `OR`, `ORDER`, `ORDINALITY`, `OUT`, `OUTER`, `OVER`, `OVERLAPS`, `OVERLAY`, `OWNED`, `OWNER`, `PARSER`, `PARTIAL`, `PARTITION`, `PASSING`, `PASSWORD`, `PLACING`, `PLANS`, `POLICY`, `POSITION`, `PRECEDING`, `PRECISION`, `PREPARE`, `PREPARED`, `PRESERVE`, `PRIMARY`, `PRIOR`, `PRIVILEGES`, `PROCEDURAL`, `PROCEDURE`, `PROGRAM`, `QUOTE`, `RANGE`, `READ`, `REAL`, `REASSIGN`, `RECHECK`, `RECURSIVE`, `REF`, `REFERENCES`, `REFRESH`, `REINDEX`, `RELATIVE`, `RELEASE`, `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`, `SNAPSHOT`, `SOME`, `STABLE`, `STANDALONE`, `START`, `STATEMENT`, `STATISTICS`, `STDIN`, `STDOUT`, `STORAGE`, `STRICT`, `STRIP`, `SUBSTRING`, `SYMMETRIC`, `SYSID`, `SYSTEM`, `TABLE`, `TABLES`, `TABLESPACE`, `TEMP`, `TEMPLATE`, `TEMPORARY`, `TEXT`, `THEN`, `TIME`, `TIMESTAMP`, `TO`, `TRAILING`, `TRANSACTION`, `TREAT`, `TRIGGER`, `TRIM`, `TRUE`, `TRUNCATE`, `TRUSTED`, `TYPE`, `TYPES`, `UNBOUNDED`, `UNCOMMITTED`, `UNENCRYPTED`, `UNION`, `UNIQUE`, `UNKNOWN`, `UNLISTEN`, `UNLOGGED`, `UNTIL`, `UPDATE`, `USER`, `USING`, `VACUUM`, `VALID`, `VALIDATE`, `VALIDATOR`, `VALUE`, `VALUES`, `VARCHAR`, `VARIADIC`, `VARYING`, `VERBOSE`, `VERSION`, `VIEW`, `VIEWS`, `VOLATILE`, `WHEN`, `WHERE`, `WHITESPACE`, `WINDOW`, `WITH`, `WITHIN`, `WITHOUT`, `WORK`, `WRAPPER`, `WRITE`, `XML`, `XMLATTRIBUTES`, `XMLCONCAT`, `XMLELEMENT`, `XMLEXISTS`, `XMLFOREST`, `XMLPARSE`, `XMLPI`, `XMLROOT`, `XMLSERIALIZE`, `YEAR`, `YES`, `ZONE`), Keyword, nil}, + {"[+*/<>=~!@#%^&|`?-]+", Operator, nil}, + {`::`, Operator, nil}, + {`\$\d+`, NameVariable, nil}, + {`([0-9]*\.[0-9]*|[0-9]+)(e[+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`((?:E|U&)?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("string")}, + {`((?:U&)?)(")`, ByGroups(LiteralStringAffix, LiteralStringName), Push("quoted-ident")}, + // { `(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)`, ?? ??, nil }, + {`[a-z_]\w*`, Name, nil}, + {`:(['"]?)[a-z]\w*\b\1`, NameVariable, nil}, + {`[;:()\[\]{},.]`, Punctuation, nil}, + }, + "multiline-comments": { + {`/\*`, CommentMultiline, Push("multiline-comments")}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[^/*]+`, CommentMultiline, nil}, + {`[/*]`, CommentMultiline, nil}, + }, + "string": { + {`[^']+`, LiteralStringSingle, nil}, + {`''`, LiteralStringSingle, nil}, + {`'`, LiteralStringSingle, Pop(1)}, + }, + "quoted-ident": { + {`[^"]+`, LiteralStringName, nil}, + {`""`, LiteralStringName, nil}, + {`"`, LiteralStringName, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/postscript.go b/vendor/github.com/alecthomas/chroma/lexers/postscript.go new file mode 100644 index 0000000..c8ebf3f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/postscript.go @@ -0,0 +1,45 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Postscript lexer. +var Postscript = Register(MustNewLexer( + &Config{ + Name: "PostScript", + Aliases: []string{"postscript", "postscr"}, + Filenames: []string{"*.ps", "*.eps"}, + MimeTypes: []string{"application/postscript"}, + }, + Rules{ + "root": { + {`^%!.+\n`, CommentPreproc, nil}, + {`%%.*\n`, CommentSpecial, nil}, + {`(^%.*\n){2,}`, CommentMultiline, nil}, + {`%.*\n`, CommentSingle, nil}, + {`\(`, LiteralString, Push("stringliteral")}, + {`[{}<>\[\]]`, Punctuation, nil}, + {`<[0-9A-Fa-f]+>(?=[()<>\[\]{}/%\s])`, LiteralNumberHex, nil}, + {`[0-9]+\#(\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)((e|E)[0-9]+)?(?=[()<>\[\]{}/%\s])`, LiteralNumberOct, nil}, + {`(\-|\+)?([0-9]+\.?|[0-9]*\.[0-9]+|[0-9]+\.[0-9]*)((e|E)[0-9]+)?(?=[()<>\[\]{}/%\s])`, LiteralNumberFloat, nil}, + {`(\-|\+)?[0-9]+(?=[()<>\[\]{}/%\s])`, LiteralNumberInteger, nil}, + {`\/[^()<>\[\]{}/%\s]+(?=[()<>\[\]{}/%\s])`, NameVariable, nil}, + {`[^()<>\[\]{}/%\s]+(?=[()<>\[\]{}/%\s])`, NameFunction, nil}, + {`(false|true)(?=[()<>\[\]{}/%\s])`, KeywordConstant, nil}, + {`(eq|ne|g[et]|l[et]|and|or|not|if(?:else)?|for(?:all)?)(?=[()<>\[\]{}/%\s])`, KeywordReserved, nil}, + {Words(``, `(?=[()<>\[\]{}/%\s])`, `abs`, `add`, `aload`, `arc`, `arcn`, `array`, `atan`, `begin`, `bind`, `ceiling`, `charpath`, `clip`, `closepath`, `concat`, `concatmatrix`, `copy`, `cos`, `currentlinewidth`, `currentmatrix`, `currentpoint`, `curveto`, `cvi`, `cvs`, `def`, `defaultmatrix`, `dict`, `dictstackoverflow`, `div`, `dtransform`, `dup`, `end`, `exch`, `exec`, `exit`, `exp`, `fill`, `findfont`, `floor`, `get`, `getinterval`, `grestore`, `gsave`, `gt`, `identmatrix`, `idiv`, `idtransform`, `index`, `invertmatrix`, `itransform`, `length`, `lineto`, `ln`, `load`, `log`, `loop`, `matrix`, `mod`, `moveto`, `mul`, `neg`, `newpath`, `pathforall`, `pathbbox`, `pop`, `print`, `pstack`, `put`, `quit`, `rand`, `rangecheck`, `rcurveto`, `repeat`, `restore`, `rlineto`, `rmoveto`, `roll`, `rotate`, `round`, `run`, `save`, `scale`, `scalefont`, `setdash`, `setfont`, `setgray`, `setlinecap`, `setlinejoin`, `setlinewidth`, `setmatrix`, `setrgbcolor`, `shfill`, `show`, `showpage`, `sin`, `sqrt`, `stack`, `stringwidth`, `stroke`, `strokepath`, `sub`, `syntaxerror`, `transform`, `translate`, `truncate`, `typecheck`, `undefined`, `undefinedfilename`, `undefinedresult`), NameBuiltin, nil}, + {`\s+`, Text, nil}, + }, + "stringliteral": { + {`[^()\\]+`, LiteralString, nil}, + {`\\`, LiteralStringEscape, Push("escape")}, + {`\(`, LiteralString, Push()}, + {`\)`, LiteralString, Pop(1)}, + }, + "escape": { + {`[0-8]{3}|n|r|t|b|f|\\|\(|\)`, LiteralStringEscape, Pop(1)}, + Default(Pop(1)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/povray.go b/vendor/github.com/alecthomas/chroma/lexers/povray.go new file mode 100644 index 0000000..2ca609c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/povray.go @@ -0,0 +1,34 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Povray lexer. +var Povray = Register(MustNewLexer( + &Config{ + Name: "POVRay", + Aliases: []string{"pov"}, + Filenames: []string{"*.pov", "*.inc"}, + MimeTypes: []string{"text/x-povray"}, + }, + Rules{ + "root": { + {`/\*[\w\W]*?\*/`, CommentMultiline, nil}, + {`//.*\n`, CommentSingle, nil}, + {`(?s)"(?:\\.|[^"\\])+"`, LiteralStringDouble, nil}, + {Words(`#`, `\b`, `break`, `case`, `debug`, `declare`, `default`, `define`, `else`, `elseif`, `end`, `error`, `fclose`, `fopen`, `for`, `if`, `ifdef`, `ifndef`, `include`, `local`, `macro`, `range`, `read`, `render`, `statistics`, `switch`, `undef`, `version`, `warning`, `while`, `write`), CommentPreproc, nil}, + {Words(`\b`, `\b`, `aa_level`, `aa_threshold`, `abs`, `acos`, `acosh`, `adaptive`, `adc_bailout`, `agate`, `agate_turb`, `all`, `alpha`, `ambient`, `ambient_light`, `angle`, `aperture`, `arc_angle`, `area_light`, `asc`, `asin`, `asinh`, `assumed_gamma`, `atan`, `atan2`, `atanh`, `atmosphere`, `atmospheric_attenuation`, `attenuating`, `average`, `background`, `black_hole`, `blue`, `blur_samples`, `bounded_by`, `box_mapping`, `bozo`, `break`, `brick`, `brick_size`, `brightness`, `brilliance`, `bumps`, `bumpy1`, `bumpy2`, `bumpy3`, `bump_map`, `bump_size`, `case`, `caustics`, `ceil`, `checker`, `chr`, `clipped_by`, `clock`, `color`, `color_map`, `colour`, `colour_map`, `component`, `composite`, `concat`, `confidence`, `conic_sweep`, `constant`, `control0`, `control1`, `cos`, `cosh`, `count`, `crackle`, `crand`, `cube`, `cubic_spline`, `cylindrical_mapping`, `debug`, `declare`, `default`, `degrees`, `dents`, `diffuse`, `direction`, `distance`, `distance_maximum`, `div`, `dust`, `dust_type`, `eccentricity`, `else`, `emitting`, `end`, `error`, `error_bound`, `exp`, `exponent`, `fade_distance`, `fade_power`, `falloff`, `falloff_angle`, `false`, `file_exists`, `filter`, `finish`, `fisheye`, `flatness`, `flip`, `floor`, `focal_point`, `fog`, `fog_alt`, `fog_offset`, `fog_type`, `frequency`, `gif`, `global_settings`, `glowing`, `gradient`, `granite`, `gray_threshold`, `green`, `halo`, `hexagon`, `hf_gray_16`, `hierarchy`, `hollow`, `hypercomplex`, `if`, `ifdef`, `iff`, `image_map`, `incidence`, `include`, `int`, `interpolate`, `inverse`, `ior`, `irid`, `irid_wavelength`, `jitter`, `lambda`, `leopard`, `linear`, `linear_spline`, `linear_sweep`, `location`, `log`, `looks_like`, `look_at`, `low_error_factor`, `mandel`, `map_type`, `marble`, `material_map`, `matrix`, `max`, `max_intersections`, `max_iteration`, `max_trace_level`, `max_value`, `metallic`, `min`, `minimum_reuse`, `mod`, `mortar`, `nearest_count`, `no`, `normal`, `normal_map`, `no_shadow`, `number_of_waves`, `octaves`, `off`, `offset`, `omega`, `omnimax`, `on`, `once`, `onion`, `open`, `orthographic`, `panoramic`, `pattern1`, `pattern2`, `pattern3`, `perspective`, `pgm`, `phase`, `phong`, `phong_size`, `pi`, `pigment`, `pigment_map`, `planar_mapping`, `png`, `point_at`, `pot`, `pow`, `ppm`, `precision`, `pwr`, `quadratic_spline`, `quaternion`, `quick_color`, `quick_colour`, `quilted`, `radial`, `radians`, `radiosity`, `radius`, `rainbow`, `ramp_wave`, `rand`, `range`, `reciprocal`, `recursion_limit`, `red`, `reflection`, `refraction`, `render`, `repeat`, `rgb`, `rgbf`, `rgbft`, `rgbt`, `right`, `ripples`, `rotate`, `roughness`, `samples`, `scale`, `scallop_wave`, `scattering`, `seed`, `shadowless`, `sin`, `sine_wave`, `sinh`, `sky`, `sky_sphere`, `slice`, `slope_map`, `smooth`, `specular`, `spherical_mapping`, `spiral`, `spiral1`, `spiral2`, `spotlight`, `spotted`, `sqr`, `sqrt`, `statistics`, `str`, `strcmp`, `strength`, `strlen`, `strlwr`, `strupr`, `sturm`, `substr`, `switch`, `sys`, `t`, `tan`, `tanh`, `test_camera_1`, `test_camera_2`, `test_camera_3`, `test_camera_4`, `texture`, `texture_map`, `tga`, `thickness`, `threshold`, `tightness`, `tile2`, `tiles`, `track`, `transform`, `translate`, `transmit`, `triangle_wave`, `true`, `ttf`, `turbulence`, `turb_depth`, `type`, `ultra_wide_angle`, `up`, `use_color`, `use_colour`, `use_index`, `u_steps`, `val`, `variance`, `vaxis_rotate`, `vcross`, `vdot`, `version`, `vlength`, `vnormalize`, `volume_object`, `volume_rendered`, `vol_with_light`, `vrotate`, `v_steps`, `warning`, `warp`, `water_level`, `waves`, `while`, `width`, `wood`, `wrinkles`, `yes`), Keyword, nil}, + {Words(``, `\b`, `bicubic_patch`, `blob`, `box`, `camera`, `cone`, `cubic`, `cylinder`, `difference`, `disc`, `height_field`, `intersection`, `julia_fractal`, `lathe`, `light_source`, `merge`, `mesh`, `object`, `plane`, `poly`, `polygon`, `prism`, `quadric`, `quartic`, `smooth_triangle`, `sor`, `sphere`, `superellipsoid`, `text`, `torus`, `triangle`, `union`), NameBuiltin, nil}, + {`[\[\](){}<>;,]`, Punctuation, nil}, + {`[-+*/=]`, Operator, nil}, + {`\b(x|y|z|u|v)\b`, NameBuiltinPseudo, nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + {`[0-9]+\.[0-9]*`, LiteralNumberFloat, nil}, + {`\.[0-9]+`, LiteralNumberFloat, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`\s+`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/powershell.go b/vendor/github.com/alecthomas/chroma/lexers/powershell.go new file mode 100644 index 0000000..c111cbd --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/powershell.go @@ -0,0 +1,63 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Powershell lexer. +var Powershell = Register(MustNewLexer( + &Config{ + Name: "PowerShell", + Aliases: []string{"powershell", "posh", "ps1", "psm1"}, + Filenames: []string{"*.ps1", "*.psm1"}, + MimeTypes: []string{"text/x-powershell"}, + DotAll: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\(`, Punctuation, Push("child")}, + {`\s+`, Text, nil}, + {`^(\s*#[#\s]*)(\.(?:component|description|example|externalhelp|forwardhelpcategory|forwardhelptargetname|functionality|inputs|link|notes|outputs|parameter|remotehelprunspace|role|synopsis))([^\n]*$)`, ByGroups(Comment, LiteralStringDoc, Comment), nil}, + {`#[^\n]*?$`, Comment, nil}, + {`(<|<)#`, CommentMultiline, Push("multline")}, + {`@"\n`, LiteralStringHeredoc, Push("heredoc-double")}, + {`@'\n.*?\n'@`, LiteralStringHeredoc, nil}, + {"`[\\'\"$@-]", Punctuation, nil}, + {`"`, LiteralStringDouble, Push("string")}, + {`'([^']|'')*'`, LiteralStringSingle, nil}, + {`(\$|@@|@)((global|script|private|env):)?\w+`, NameVariable, nil}, + {`(while|validateset|validaterange|validatepattern|validatelength|validatecount|until|trap|switch|return|ref|process|param|parameter|in|if|global:|function|foreach|for|finally|filter|end|elseif|else|dynamicparam|do|default|continue|cmdletbinding|break|begin|alias|\?|%|#script|#private|#local|#global|mandatory|parametersetname|position|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|helpmessage|try|catch|throw)\b`, Keyword, nil}, + {`-(and|as|band|bnot|bor|bxor|casesensitive|ccontains|ceq|cge|cgt|cle|clike|clt|cmatch|cne|cnotcontains|cnotlike|cnotmatch|contains|creplace|eq|exact|f|file|ge|gt|icontains|ieq|ige|igt|ile|ilike|ilt|imatch|ine|inotcontains|inotlike|inotmatch|ireplace|is|isnot|le|like|lt|match|ne|not|notcontains|notlike|notmatch|or|regex|replace|wildcard)\b`, Operator, nil}, + {`(write|where|wait|use|update|unregister|undo|trace|test|tee|take|suspend|stop|start|split|sort|skip|show|set|send|select|scroll|resume|restore|restart|resolve|resize|reset|rename|remove|register|receive|read|push|pop|ping|out|new|move|measure|limit|join|invoke|import|group|get|format|foreach|export|expand|exit|enter|enable|disconnect|disable|debug|cxnew|copy|convertto|convertfrom|convert|connect|complete|compare|clear|checkpoint|aggregate|add)-[a-z_]\w*\b`, NameBuiltin, nil}, + {"\\[[a-z_\\[][\\w. `,\\[\\]]*\\]", NameConstant, nil}, + {`-[a-z_]\w*`, Name, nil}, + {`\w+`, Name, nil}, + {"[.,;@{}\\[\\]$()=+*/\\\\&%!~?^`|<>-]|::", Punctuation, nil}, + }, + "child": { + {`\)`, Punctuation, Pop(1)}, + Include("root"), + }, + "multline": { + {`[^#&.]+`, CommentMultiline, nil}, + {`#(>|>)`, CommentMultiline, Pop(1)}, + {`\.(component|description|example|externalhelp|forwardhelpcategory|forwardhelptargetname|functionality|inputs|link|notes|outputs|parameter|remotehelprunspace|role|synopsis)`, LiteralStringDoc, nil}, + {`[#&.]`, CommentMultiline, nil}, + }, + "string": { + {"`[0abfnrtv'\\\"$`]", LiteralStringEscape, nil}, + {"[^$`\"]+", LiteralStringDouble, nil}, + {`\$\(`, Punctuation, Push("child")}, + {`""`, LiteralStringDouble, nil}, + {"[`$]", LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Pop(1)}, + }, + "heredoc-double": { + {`\n"@`, LiteralStringHeredoc, Pop(1)}, + {`\$\(`, Punctuation, Push("child")}, + {`[^@\n]+"]`, LiteralStringHeredoc, nil}, + {`.`, LiteralStringHeredoc, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/prolog.go b/vendor/github.com/alecthomas/chroma/lexers/prolog.go new file mode 100644 index 0000000..f4f8a35 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/prolog.go @@ -0,0 +1,50 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Prolog lexer. +var Prolog = Register(MustNewLexer( + &Config{ + Name: "Prolog", + Aliases: []string{"prolog"}, + Filenames: []string{"*.ecl", "*.prolog", "*.pro", "*.pl"}, + MimeTypes: []string{"text/x-prolog"}, + }, + Rules{ + "root": { + {`^#.*`, CommentSingle, nil}, + {`/\*`, CommentMultiline, Push("nested-comment")}, + {`%.*`, CommentSingle, nil}, + {`0\'.`, LiteralStringChar, nil}, + {`0b[01]+`, LiteralNumberBin, nil}, + {`0o[0-7]+`, LiteralNumberOct, nil}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`\d\d?\'[a-zA-Z0-9]+`, LiteralNumberInteger, nil}, + {`(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`[\[\](){}|.,;!]`, Punctuation, nil}, + {`:-|-->`, Punctuation, nil}, + {`"(?:\\x[0-9a-fA-F]+\\|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}|\\[0-7]+\\|\\["\nabcefnrstv]|[^\\"])*"`, LiteralStringDouble, nil}, + {`'(?:''|[^'])*'`, LiteralStringAtom, nil}, + {`is\b`, Operator, nil}, + {`(<|>|=<|>=|==|=:=|=|/|//|\*|\+|-)(?=\s|[a-zA-Z0-9\[])`, Operator, nil}, + {`(mod|div|not)\b`, Operator, nil}, + {`_`, Keyword, nil}, + {`([a-z]+)(:)`, ByGroups(NameNamespace, Punctuation), nil}, + {`([a-zÀ-῿぀-퟿-￯][\w$À-῿぀-퟿-￯]*)(\s*)(:-|-->)`, ByGroups(NameFunction, Text, Operator), nil}, + {`([a-zÀ-῿぀-퟿-￯][\w$À-῿぀-퟿-￯]*)(\s*)(\()`, ByGroups(NameFunction, Text, Punctuation), nil}, + {`[a-zÀ-῿぀-퟿-￯][\w$À-῿぀-퟿-￯]*`, LiteralStringAtom, nil}, + {`[#&*+\-./:<=>?@\\^~¡-¿‐-〿]+`, LiteralStringAtom, nil}, + {`[A-Z_]\w*`, NameVariable, nil}, + {`\s+|[ -‏￰-￾￯]`, Text, nil}, + }, + "nested-comment": { + {`\*/`, CommentMultiline, Pop(1)}, + {`/\*`, CommentMultiline, Push()}, + {`[^*/]+`, CommentMultiline, nil}, + {`[*/]`, CommentMultiline, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/protobuf.go b/vendor/github.com/alecthomas/chroma/lexers/protobuf.go new file mode 100644 index 0000000..a3dfded --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/protobuf.go @@ -0,0 +1,52 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// ProtocolBuffer lexer. +var ProtocolBuffer = Register(MustNewLexer( + &Config{ + Name: "Protocol Buffer", + Aliases: []string{"protobuf", "proto"}, + Filenames: []string{"*.proto"}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`[ \t]+`, Text, nil}, + {`[,;{}\[\]()<>]`, Punctuation, nil}, + {`/(\\\n)?/(\n|(.|\n)*?[^\\]\n)`, CommentSingle, nil}, + {`/(\\\n)?\*(.|\n)*?\*(\\\n)?/`, CommentMultiline, nil}, + {Words(`\b`, `\b`, `import`, `option`, `optional`, `required`, `repeated`, `default`, `packed`, `ctype`, `extensions`, `to`, `max`, `rpc`, `returns`, `oneof`), Keyword, nil}, + {Words(``, `\b`, `int32`, `int64`, `uint32`, `uint64`, `sint32`, `sint64`, `fixed32`, `fixed64`, `sfixed32`, `sfixed64`, `float`, `double`, `bool`, `string`, `bytes`), KeywordType, nil}, + {`(true|false)\b`, KeywordConstant, nil}, + {`(package)(\s+)`, ByGroups(KeywordNamespace, Text), Push("package")}, + {`(message|extend)(\s+)`, ByGroups(KeywordDeclaration, Text), Push("message")}, + {`(enum|group|service)(\s+)`, ByGroups(KeywordDeclaration, Text), Push("type")}, + {`\".*?\"`, LiteralString, nil}, + {`\'.*?\'`, LiteralString, nil}, + {`(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*`, LiteralNumberFloat, nil}, + {`(\d+\.\d*|\.\d+|\d+[fF])[fF]?`, LiteralNumberFloat, nil}, + {`(\-?(inf|nan))\b`, LiteralNumberFloat, nil}, + {`0x[0-9a-fA-F]+[LlUu]*`, LiteralNumberHex, nil}, + {`0[0-7]+[LlUu]*`, LiteralNumberOct, nil}, + {`\d+[LlUu]*`, LiteralNumberInteger, nil}, + {`[+-=]`, Operator, nil}, + {`([a-zA-Z_][\w.]*)([ \t]*)(=)`, ByGroups(NameAttribute, Text, Operator), nil}, + {`[a-zA-Z_][\w.]*`, Name, nil}, + }, + "package": { + {`[a-zA-Z_]\w*`, NameNamespace, Pop(1)}, + Default(Pop(1)), + }, + "message": { + {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + Default(Pop(1)), + }, + "type": { + {`[a-zA-Z_]\w*`, Name, Pop(1)}, + Default(Pop(1)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/puppet.go b/vendor/github.com/alecthomas/chroma/lexers/puppet.go new file mode 100644 index 0000000..bb1ac8a --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/puppet.go @@ -0,0 +1,55 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Puppet lexer. +var Puppet = Register(MustNewLexer( + &Config{ + Name: "Puppet", + Aliases: []string{"puppet"}, + Filenames: []string{"*.pp"}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + Include("comments"), + Include("keywords"), + Include("names"), + Include("numbers"), + Include("operators"), + Include("strings"), + {`[]{}:(),;[]`, Punctuation, nil}, + {`[^\S\n]+`, Text, nil}, + }, + "comments": { + {`\s*#.*$`, Comment, nil}, + {`/(\\\n)?[*](.|\n)*?[*](\\\n)?/`, CommentMultiline, nil}, + }, + "operators": { + {`(=>|\?|<|>|=|\+|-|/|\*|~|!|\|)`, Operator, nil}, + {`(in|and|or|not)\b`, OperatorWord, nil}, + }, + "names": { + {`[a-zA-Z_]\w*`, NameAttribute, nil}, + {`(\$\S+)(\[)(\S+)(\])`, ByGroups(NameVariable, Punctuation, LiteralString, Punctuation), nil}, + {`\$\S+`, NameVariable, nil}, + }, + "numbers": { + {`(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?`, LiteralNumberFloat, nil}, + {`\d+[eE][+-]?[0-9]+j?`, LiteralNumberFloat, nil}, + {`0[0-7]+j?`, LiteralNumberOct, nil}, + {`0[xX][a-fA-F0-9]+`, LiteralNumberHex, nil}, + {`\d+L`, LiteralNumberIntegerLong, nil}, + {`\d+j?`, LiteralNumberInteger, nil}, + }, + "keywords": { + {Words(`(?i)`, `\b`, `absent`, `alert`, `alias`, `audit`, `augeas`, `before`, `case`, `check`, `class`, `computer`, `configured`, `contained`, `create_resources`, `crit`, `cron`, `debug`, `default`, `define`, `defined`, `directory`, `else`, `elsif`, `emerg`, `err`, `exec`, `extlookup`, `fail`, `false`, `file`, `filebucket`, `fqdn_rand`, `generate`, `host`, `if`, `import`, `include`, `info`, `inherits`, `inline_template`, `installed`, `interface`, `k5login`, `latest`, `link`, `loglevel`, `macauthorization`, `mailalias`, `maillist`, `mcx`, `md5`, `mount`, `mounted`, `nagios_command`, `nagios_contact`, `nagios_contactgroup`, `nagios_host`, `nagios_hostdependency`, `nagios_hostescalation`, `nagios_hostextinfo`, `nagios_hostgroup`, `nagios_service`, `nagios_servicedependency`, `nagios_serviceescalation`, `nagios_serviceextinfo`, `nagios_servicegroup`, `nagios_timeperiod`, `node`, `noop`, `notice`, `notify`, `package`, `present`, `purged`, `realize`, `regsubst`, `resources`, `role`, `router`, `running`, `schedule`, `scheduled_task`, `search`, `selboolean`, `selmodule`, `service`, `sha1`, `shellquote`, `split`, `sprintf`, `ssh_authorized_key`, `sshkey`, `stage`, `stopped`, `subscribe`, `tag`, `tagged`, `template`, `tidy`, `true`, `undef`, `unmounted`, `user`, `versioncmp`, `vlan`, `warning`, `yumrepo`, `zfs`, `zone`, `zpool`), Keyword, nil}, + }, + "strings": { + {`"([^"])*"`, LiteralString, nil}, + {`'(\\'|[^'])*'`, LiteralString, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/python.go b/vendor/github.com/alecthomas/chroma/lexers/python.go new file mode 100644 index 0000000..950e6a2 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/python.go @@ -0,0 +1,136 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Python lexer. +var Python = Register(MustNewLexer( + &Config{ + Name: "Python", + Aliases: []string{"python", "py", "sage"}, + Filenames: []string{"*.py", "*.pyw", "*.sc", "SConstruct", "SConscript", "*.tac", "*.sage"}, + MimeTypes: []string{"text/x-python", "application/x-python"}, + }, + Rules{ + "root": { + {`\n`, Text, nil}, + {`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, + {`^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, + {`[^\S\n]+`, Text, nil}, + {`\A#!.+$`, CommentHashbang, nil}, + {`#.*$`, CommentSingle, nil}, + {`[]{}:(),;[]`, Punctuation, nil}, + {`\\\n`, Text, nil}, + {`\\`, Text, nil}, + {`(in|is|and|or|not)\b`, OperatorWord, nil}, + {`!=|==|<<|>>|[-~+/*%=<>&^|.]`, Operator, nil}, + Include("keywords"), + {`(def)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("funcname")}, + {`(class)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("classname")}, + {`(from)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("fromimport")}, + {`(import)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("import")}, + Include("builtins"), + Include("magicfuncs"), + Include("magicvars"), + Include("backtick"), + {`([rR]|[uUbB][rR]|[rR][uUbB])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, + {`([uUbB]?)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "tdqs")}, + {`([uUbB]?)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "tsqs")}, + {`([uUbB]?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "dqs")}, + {`([uUbB]?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "sqs")}, + Include("name"), + Include("numbers"), + }, + "keywords": { + {Words(``, `\b`, `assert`, `break`, `continue`, `del`, `elif`, `else`, `except`, `exec`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `print`, `raise`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, + }, + "builtins": { + {Words(`(?>|[-~+/*%=<>&^|.]`, Operator, nil}, + Include("keywords"), + {`(def)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("funcname")}, + {`(class)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("classname")}, + {`(from)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("fromimport")}, + {`(import)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("import")}, + Include("builtins"), + Include("magicfuncs"), + Include("magicvars"), + Include("backtick"), + {`([rR]|[uUbB][rR]|[rR][uUbB])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, + {`([uUbB]?)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "tdqs")}, + {`([uUbB]?)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "tsqs")}, + {`([uUbB]?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "dqs")}, + {`([uUbB]?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "sqs")}, + Include("name"), + Include("numbers"), + }, + "keywords": { + {Words(``, `\b`, `assert`, `async`, `await`, `break`, `continue`, `del`, `elif`, `else`, `except`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `raise`, `nonlocal`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, + {Words(``, `\b`, `True`, `False`, `None`), KeywordConstant, nil}, + }, + "builtins": { + {Words(`(?=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, + {`[^\\\'"%{\n]+`, LiteralStringSingle, nil}, + {`[\'"\\]`, LiteralStringSingle, nil}, + {`%|(\{{1,2})`, LiteralStringSingle, nil}, + }, + "strings-double": { + {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, + {`\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, + {`[^\\\'"%{\n]+`, LiteralStringDouble, nil}, + {`[\'"\\]`, LiteralStringDouble, nil}, + {`%|(\{{1,2})`, LiteralStringDouble, nil}, + }, + "dqs": { + {`"`, LiteralStringDouble, Pop(1)}, + {`\\\\|\\"|\\\n`, LiteralStringEscape, nil}, + Include("strings-double"), + }, + "sqs": { + {`'`, LiteralStringSingle, Pop(1)}, + {`\\\\|\\'|\\\n`, LiteralStringEscape, nil}, + Include("strings-single"), + }, + "tdqs": { + {`"""`, LiteralStringDouble, Pop(1)}, + Include("strings-double"), + {`\n`, LiteralStringDouble, nil}, + }, + "tsqs": { + {`'''`, LiteralStringSingle, Pop(1)}, + Include("strings-single"), + {`\n`, LiteralStringSingle, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/qbasic.go b/vendor/github.com/alecthomas/chroma/lexers/qbasic.go new file mode 100644 index 0000000..6ac3b7b --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/qbasic.go @@ -0,0 +1,66 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Qbasic lexer. +var Qbasic = Register(MustNewLexer( + &Config{ + Name: "QBasic", + Aliases: []string{"qbasic", "basic"}, + Filenames: []string{"*.BAS", "*.bas"}, + MimeTypes: []string{"text/basic"}, + }, + Rules{ + "root": { + {`\n+`, Text, nil}, + {`\s+`, TextWhitespace, nil}, + {`^(\s*)(\d*)(\s*)(REM .*)$`, ByGroups(TextWhitespace, NameLabel, TextWhitespace, CommentSingle), nil}, + {`^(\s*)(\d+)(\s*)`, ByGroups(TextWhitespace, NameLabel, TextWhitespace), nil}, + {`(?=[\s]*)(\w+)(?=[\s]*=)`, NameVariableGlobal, nil}, + {`(?=[^"]*)\'.*$`, CommentSingle, nil}, + {`"[^\n"]*"`, LiteralStringDouble, nil}, + {`(END)(\s+)(FUNCTION|IF|SELECT|SUB)`, ByGroups(KeywordReserved, TextWhitespace, KeywordReserved), nil}, + {`(DECLARE)(\s+)([A-Z]+)(\s+)(\S+)`, ByGroups(KeywordDeclaration, TextWhitespace, NameVariable, TextWhitespace, Name), nil}, + {`(DIM)(\s+)(SHARED)(\s+)([^\s(]+)`, ByGroups(KeywordDeclaration, TextWhitespace, NameVariable, TextWhitespace, NameVariableGlobal), nil}, + {`(DIM)(\s+)([^\s(]+)`, ByGroups(KeywordDeclaration, TextWhitespace, NameVariableGlobal), nil}, + {`^(\s*)([a-zA-Z_]+)(\s*)(\=)`, ByGroups(TextWhitespace, NameVariableGlobal, TextWhitespace, Operator), nil}, + {`(GOTO|GOSUB)(\s+)(\w+\:?)`, ByGroups(KeywordReserved, TextWhitespace, NameLabel), nil}, + {`(SUB)(\s+)(\w+\:?)`, ByGroups(KeywordReserved, TextWhitespace, NameLabel), nil}, + Include("declarations"), + Include("functions"), + Include("metacommands"), + Include("operators"), + Include("statements"), + Include("keywords"), + {`[a-zA-Z_]\w*[$@#&!]`, NameVariableGlobal, nil}, + {`[a-zA-Z_]\w*\:`, NameLabel, nil}, + {`\-?\d*\.\d+[@|#]?`, LiteralNumberFloat, nil}, + {`\-?\d+[@|#]`, LiteralNumberFloat, nil}, + {`\-?\d+#?`, LiteralNumberIntegerLong, nil}, + {`\-?\d+#?`, LiteralNumberInteger, nil}, + {`!=|==|:=|\.=|<<|>>|[-~+/\\*%=<>&^|?:!.]`, Operator, nil}, + {`[\[\]{}(),;]`, Punctuation, nil}, + {`[\w]+`, NameVariableGlobal, nil}, + }, + "declarations": { + {`\b(DATA|LET)(?=\(|\b)`, KeywordDeclaration, nil}, + }, + "functions": { + {`\b(ABS|ASC|ATN|CDBL|CHR\$|CINT|CLNG|COMMAND\$|COS|CSNG|CSRLIN|CVD|CVDMBF|CVI|CVL|CVS|CVSMBF|DATE\$|ENVIRON\$|EOF|ERDEV|ERDEV\$|ERL|ERR|EXP|FILEATTR|FIX|FRE|FREEFILE|HEX\$|INKEY\$|INP|INPUT\$|INSTR|INT|IOCTL\$|LBOUND|LCASE\$|LEFT\$|LEN|LOC|LOF|LOG|LPOS|LTRIM\$|MID\$|MKD\$|MKDMBF\$|MKI\$|MKL\$|MKS\$|MKSMBF\$|OCT\$|PEEK|PEN|PLAY|PMAP|POINT|POS|RIGHT\$|RND|RTRIM\$|SADD|SCREEN|SEEK|SETMEM|SGN|SIN|SPACE\$|SPC|SQR|STICK|STR\$|STRIG|STRING\$|TAB|TAN|TIME\$|TIMER|UBOUND|UCASE\$|VAL|VARPTR|VARPTR\$|VARSEG)(?=\(|\b)`, KeywordReserved, nil}, + }, + "metacommands": { + {`\b(\$DYNAMIC|\$INCLUDE|\$STATIC)(?=\(|\b)`, KeywordConstant, nil}, + }, + "operators": { + {`\b(AND|EQV|IMP|NOT|OR|XOR)(?=\(|\b)`, OperatorWord, nil}, + }, + "statements": { + {`\b(BEEP|BLOAD|BSAVE|CALL|CALL\ ABSOLUTE|CALL\ INTERRUPT|CALLS|CHAIN|CHDIR|CIRCLE|CLEAR|CLOSE|CLS|COLOR|COM|COMMON|CONST|DATA|DATE\$|DECLARE|DEF\ FN|DEF\ SEG|DEFDBL|DEFINT|DEFLNG|DEFSNG|DEFSTR|DEF|DIM|DO|LOOP|DRAW|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|NEXT|FUNCTION|GET|GOSUB|GOTO|IF|THEN|INPUT|INPUT\ \#|IOCTL|KEY|KEY|KILL|LET|LINE|LINE\ INPUT|LINE\ INPUT\ \#|LOCATE|LOCK|UNLOCK|LPRINT|LSET|MID\$|MKDIR|NAME|ON\ COM|ON\ ERROR|ON\ KEY|ON\ PEN|ON\ PLAY|ON\ STRIG|ON\ TIMER|ON\ UEVENT|ON|OPEN|OPEN\ COM|OPTION\ BASE|OUT|PAINT|PALETTE|PCOPY|PEN|PLAY|POKE|PRESET|PRINT|PRINT\ \#|PRINT\ USING|PSET|PUT|PUT|RANDOMIZE|READ|REDIM|REM|RESET|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SCREEN|SEEK|SELECT\ CASE|SHARED|SHELL|SLEEP|SOUND|STATIC|STOP|STRIG|SUB|SWAP|SYSTEM|TIME\$|TIMER|TROFF|TRON|TYPE|UEVENT|UNLOCK|VIEW|WAIT|WHILE|WEND|WIDTH|WINDOW|WRITE)\b`, KeywordReserved, nil}, + }, + "keywords": { + {`\b(ACCESS|ALIAS|ANY|APPEND|AS|BASE|BINARY|BYVAL|CASE|CDECL|DOUBLE|ELSE|ELSEIF|ENDIF|INTEGER|IS|LIST|LOCAL|LONG|LOOP|MOD|NEXT|OFF|ON|OUTPUT|RANDOM|SIGNAL|SINGLE|STEP|STRING|THEN|TO|UNTIL|USING|WEND)\b`, Keyword, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/r.go b/vendor/github.com/alecthomas/chroma/lexers/r.go new file mode 100644 index 0000000..84a6268 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/r.go @@ -0,0 +1,69 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// R/S lexer. +var R = Register(MustNewLexer( + &Config{ + Name: "R", + Aliases: []string{"splus", "s", "r"}, + Filenames: []string{"*.S", "*.R", "*.r", ".Rhistory", ".Rprofile", ".Renviron"}, + MimeTypes: []string{"text/S-plus", "text/S", "text/x-r-source", "text/x-r", "text/x-R", "text/x-r-history", "text/x-r-profile"}, + }, + Rules{ + "comments": { + {`#.*$`, CommentSingle, nil}, + }, + "valid_name": { + {`[a-zA-Z][\w.]*`, Text, nil}, + {`\.[a-zA-Z_][\w.]*`, Text, nil}, + }, + "punctuation": { + {`\[{1,2}|\]{1,2}|\(|\)|;|,`, Punctuation, nil}, + }, + "keywords": { + {Words(``, `(?![\w. =])`, `Arg`, `Conj`, `Cstack_info`, `Encoding`, `FALSE`, `Filter`, `Find`, `I`, `ISOdate`, `ISOdatetime`, `Im`, `Inf`, `La.svd`, `Map`, `Math.Date`, `Math.POSIXt`, `Math.data.frame`, `Math.difftime`, `Math.factor`, `Mod`, `NA_character_`, `NA_complex_`, `NA_real_`, `NCOL`, `NROW`, `NULLNA_integer_`, `NaN`, `Negate`, `NextMethod`, `Ops.Date`, `Ops.POSIXt`, `Ops.data.frame`, `Ops.difftime`, `Ops.factor`, `Ops.numeric_version`, `Ops.ordered`, `Position`, `R.Version`, `R.home`, `R.version`, `R.version.string`, `RNGkind`, `RNGversion`, `R_system_version`, `Re`, `Recall`, `Reduce`, `Summary.Date`, `Summary.POSIXct`, `Summary.POSIXlt`, `Summary.data.frame`, `Summary.difftime`, `Summary.factor`, `Summary.numeric_version`, `Summary.ordered`, `Sys.Date`, `Sys.chmod`, `Sys.getenv`, `Sys.getlocale`, `Sys.getpid`, `Sys.glob`, `Sys.info`, `Sys.localeconv`, `Sys.readlink`, `Sys.setFileTime`, `Sys.setenv`, `Sys.setlocale`, `Sys.sleep`, `Sys.time`, `Sys.timezone`, `Sys.umask`, `Sys.unsetenv`, `Sys.which`, `TRUE`, `UseMethod`, `Vectorize`, `abbreviate`, `abs`, `acos`, `acosh`, `addNA`, `addTaskCallback`, `agrep`, `alist`, `all`, `all.equal`, `all.equal.POSIXct`, `all.equal.character`, `all.equal.default`, `all.equal.factor`, `all.equal.formula`, `all.equal.language`, `all.equal.list`, `all.equal.numeric`, `all.equal.raw`, `all.names`, `all.vars`, `any`, `anyDuplicated`, `anyDuplicated.array`, `anyDuplicated.data.frame`, `anyDuplicated.default`, `anyDuplicated.matrix`, `aperm`, `aperm.default`, `aperm.table`, `append`, `apply`, `args`, `arrayInd`, `as.Date`, `as.Date.POSIXct`, `as.Date.POSIXlt`, `as.Date.character`, `as.Date.date`, `as.Date.dates`, `as.Date.default`, `as.Date.factor`, `as.Date.numeric`, `as.POSIXct`, `as.POSIXct.Date`, `as.POSIXct.POSIXlt`, `as.POSIXct.date`, `as.POSIXct.dates`, `as.POSIXct.default`, `as.POSIXct.numeric`, `as.POSIXlt`, `as.POSIXlt.Date`, `as.POSIXlt.POSIXct`, `as.POSIXlt.character`, `as.POSIXlt.date`, `as.POSIXlt.dates`, `as.POSIXlt.default`, `as.POSIXlt.factor`, `as.POSIXlt.numeric`, `as.array`, `as.array.default`, `as.call`, `as.character`, `as.character.Date`, `as.character.POSIXt`, `as.character.condition`, `as.character.default`, `as.character.error`, `as.character.factor`, `as.character.hexmode`, `as.character.numeric_version`, `as.character.octmode`, `as.character.srcref`, `as.complex`, `as.data.frame`, `as.data.frame.AsIs`, `as.data.frame.Date`, `as.data.frame.POSIXct`, `as.data.frame.POSIXlt`, `as.data.frame.array`, `as.data.frame.character`, `as.data.frame.complex`, `as.data.frame.data.frame`, `as.data.frame.default`, `as.data.frame.difftime`, `as.data.frame.factor`, `as.data.frame.integer`, `as.data.frame.list`, `as.data.frame.logical`, `as.data.frame.matrix`, `as.data.frame.model.matrix`, `as.data.frame.numeric`, `as.data.frame.numeric_version`, `as.data.frame.ordered`, `as.data.frame.raw`, `as.data.frame.table`, `as.data.frame.ts`, `as.data.frame.vector`, `as.difftime`, `as.double`, `as.double.POSIXlt`, `as.double.difftime`, `as.environment`, `as.expression`, `as.expression.default`, `as.factor`, `as.function`, `as.function.default`, `as.hexmode`, `as.integer`, `as.list`, `as.list.Date`, `as.list.POSIXct`, `as.list.data.frame`, `as.list.default`, `as.list.environment`, `as.list.factor`, `as.list.function`, `as.list.numeric_version`, `as.logical`, `as.logical.factor`, `as.matrix`, `as.matrix.POSIXlt`, `as.matrix.data.frame`, `as.matrix.default`, `as.matrix.noquote`, `as.name`, `as.null`, `as.null.default`, `as.numeric`, `as.numeric_version`, `as.octmode`, `as.ordered`, `as.package_version`, `as.pairlist`, `as.qr`, `as.raw`, `as.single`, `as.single.default`, `as.symbol`, `as.table`, `as.table.default`, `as.vector`, `as.vector.factor`, `asNamespace`, `asS3`, `asS4`, `asin`, `asinh`, `assign`, `atan`, `atan2`, `atanh`, `attachNamespace`, `attr`, `attr.all.equal`, `attributes`, `autoload`, `autoloader`, `backsolve`, `baseenv`, `basename`, `besselI`, `besselJ`, `besselK`, `besselY`, `beta`, `bindingIsActive`, `bindingIsLocked`, `bindtextdomain`, `bitwAnd`, `bitwNot`, `bitwOr`, `bitwShiftL`, `bitwShiftR`, `bitwXor`, `body`, `bquote`, `browser`, `browserCondition`, `browserSetDebug`, `browserText`, `builtins`, `by`, `by.data.frame`, `by.default`, `bzfile`, `c.Date`, `c.POSIXct`, `c.POSIXlt`, `c.noquote`, `c.numeric_version`, `call`, `callCC`, `capabilities`, `casefold`, `cat`, `category`, `cbind`, `cbind.data.frame`, `ceiling`, `char.expand`, `charToRaw`, `charmatch`, `chartr`, `check_tzones`, `chol`, `chol.default`, `chol2inv`, `choose`, `class`, `clearPushBack`, `close`, `close.connection`, `close.srcfile`, `close.srcfilealias`, `closeAllConnections`, `col`, `colMeans`, `colSums`, `colnames`, `commandArgs`, `comment`, `computeRestarts`, `conditionCall`, `conditionCall.condition`, `conditionMessage`, `conditionMessage.condition`, `conflicts`, `contributors`, `cos`, `cosh`, `crossprod`, `cummax`, `cummin`, `cumprod`, `cumsum`, `cut`, `cut.Date`, `cut.POSIXt`, `cut.default`, `dQuote`, `data.class`, `data.matrix`, `date`, `debug`, `debugonce`, `default.stringsAsFactors`, `delayedAssign`, `deparse`, `det`, `determinant`, `determinant.matrix`, `dget`, `diag`, `diff`, `diff.Date`, `diff.POSIXt`, `diff.default`, `difftime`, `digamma`, `dim`, `dim.data.frame`, `dimnames`, `dimnames.data.frame`, `dir`, `dir.create`, `dirname`, `do.call`, `dput`, `drop`, `droplevels`, `droplevels.data.frame`, `droplevels.factor`, `dump`, `duplicated`, `duplicated.POSIXlt`, `duplicated.array`, `duplicated.data.frame`, `duplicated.default`, `duplicated.matrix`, `duplicated.numeric_version`, `dyn.load`, `dyn.unload`, `eapply`, `eigen`, `else`, `emptyenv`, `enc2native`, `enc2utf8`, `encodeString`, `enquote`, `env.profile`, `environment`, `environmentIsLocked`, `environmentName`, `eval`, `eval.parent`, `evalq`, `exists`, `exp`, `expand.grid`, `expm1`, `expression`, `factor`, `factorial`, `fifo`, `file`, `file.access`, `file.append`, `file.choose`, `file.copy`, `file.create`, `file.exists`, `file.info`, `file.link`, `file.path`, `file.remove`, `file.rename`, `file.show`, `file.symlink`, `find.package`, `findInterval`, `findPackageEnv`, `findRestart`, `floor`, `flush`, `flush.connection`, `force`, `formals`, `format`, `format.AsIs`, `format.Date`, `format.POSIXct`, `format.POSIXlt`, `format.data.frame`, `format.default`, `format.difftime`, `format.factor`, `format.hexmode`, `format.info`, `format.libraryIQR`, `format.numeric_version`, `format.octmode`, `format.packageInfo`, `format.pval`, `format.summaryDefault`, `formatC`, `formatDL`, `forwardsolve`, `gamma`, `gc`, `gc.time`, `gcinfo`, `gctorture`, `gctorture2`, `get`, `getAllConnections`, `getCallingDLL`, `getCallingDLLe`, `getConnection`, `getDLLRegisteredRoutines`, `getDLLRegisteredRoutines.DLLInfo`, `getDLLRegisteredRoutines.character`, `getElement`, `getExportedValue`, `getHook`, `getLoadedDLLs`, `getNamespace`, `getNamespaceExports`, `getNamespaceImports`, `getNamespaceInfo`, `getNamespaceName`, `getNamespaceUsers`, `getNamespaceVersion`, `getNativeSymbolInfo`, `getOption`, `getRversion`, `getSrcLines`, `getTaskCallbackNames`, `geterrmessage`, `gettext`, `gettextf`, `getwd`, `gl`, `globalenv`, `gregexpr`, `grep`, `grepRaw`, `grepl`, `gsub`, `gzcon`, `gzfile`, `head`, `iconv`, `iconvlist`, `icuSetCollate`, `identical`, `identity`, `ifelse`, `importIntoEnv`, `in`, `inherits`, `intToBits`, `intToUtf8`, `interaction`, `interactive`, `intersect`, `inverse.rle`, `invisible`, `invokeRestart`, `invokeRestartInteractively`, `is.R`, `is.array`, `is.atomic`, `is.call`, `is.character`, `is.complex`, `is.data.frame`, `is.double`, `is.element`, `is.environment`, `is.expression`, `is.factor`, `is.finite`, `is.function`, `is.infinite`, `is.integer`, `is.language`, `is.list`, `is.loaded`, `is.logical`, `is.matrix`, `is.na`, `is.na.POSIXlt`, `is.na.data.frame`, `is.na.numeric_version`, `is.name`, `is.nan`, `is.null`, `is.numeric`, `is.numeric.Date`, `is.numeric.POSIXt`, `is.numeric.difftime`, `is.numeric_version`, `is.object`, `is.ordered`, `is.package_version`, `is.pairlist`, `is.primitive`, `is.qr`, `is.raw`, `is.recursive`, `is.single`, `is.symbol`, `is.table`, `is.unsorted`, `is.vector`, `isBaseNamespace`, `isIncomplete`, `isNamespace`, `isOpen`, `isRestart`, `isS4`, `isSeekable`, `isSymmetric`, `isSymmetric.matrix`, `isTRUE`, `isatty`, `isdebugged`, `jitter`, `julian`, `julian.Date`, `julian.POSIXt`, `kappa`, `kappa.default`, `kappa.lm`, `kappa.qr`, `kronecker`, `l10n_info`, `labels`, `labels.default`, `lapply`, `lazyLoad`, `lazyLoadDBexec`, `lazyLoadDBfetch`, `lbeta`, `lchoose`, `length`, `length.POSIXlt`, `letters`, `levels`, `levels.default`, `lfactorial`, `lgamma`, `library.dynam`, `library.dynam.unload`, `licence`, `license`, `list.dirs`, `list.files`, `list2env`, `load`, `loadNamespace`, `loadedNamespaces`, `loadingNamespaceInfo`, `local`, `lockBinding`, `lockEnvironment`, `log`, `log10`, `log1p`, `log2`, `logb`, `lower.tri`, `ls`, `make.names`, `make.unique`, `makeActiveBinding`, `mapply`, `margin.table`, `mat.or.vec`, `match`, `match.arg`, `match.call`, `match.fun`, `max`, `max.col`, `mean`, `mean.Date`, `mean.POSIXct`, `mean.POSIXlt`, `mean.default`, `mean.difftime`, `mem.limits`, `memCompress`, `memDecompress`, `memory.profile`, `merge`, `merge.data.frame`, `merge.default`, `message`, `mget`, `min`, `missing`, `mode`, `month.abb`, `month.name`, `months`, `months.Date`, `months.POSIXt`, `months.abb`, `months.nameletters`, `names`, `names.POSIXlt`, `namespaceExport`, `namespaceImport`, `namespaceImportClasses`, `namespaceImportFrom`, `namespaceImportMethods`, `nargs`, `nchar`, `ncol`, `new.env`, `ngettext`, `nlevels`, `noquote`, `norm`, `normalizePath`, `nrow`, `numeric_version`, `nzchar`, `objects`, `oldClass`, `on.exit`, `open`, `open.connection`, `open.srcfile`, `open.srcfilealias`, `open.srcfilecopy`, `options`, `order`, `ordered`, `outer`, `packBits`, `packageEvent`, `packageHasNamespace`, `packageStartupMessage`, `package_version`, `pairlist`, `parent.env`, `parent.frame`, `parse`, `parseNamespaceFile`, `paste`, `paste0`, `path.expand`, `path.package`, `pipe`, `pmatch`, `pmax`, `pmax.int`, `pmin`, `pmin.int`, `polyroot`, `pos.to.env`, `pretty`, `pretty.default`, `prettyNum`, `print`, `print.AsIs`, `print.DLLInfo`, `print.DLLInfoList`, `print.DLLRegisteredRoutines`, `print.Date`, `print.NativeRoutineList`, `print.POSIXct`, `print.POSIXlt`, `print.by`, `print.condition`, `print.connection`, `print.data.frame`, `print.default`, `print.difftime`, `print.factor`, `print.function`, `print.hexmode`, `print.libraryIQR`, `print.listof`, `print.noquote`, `print.numeric_version`, `print.octmode`, `print.packageInfo`, `print.proc_time`, `print.restart`, `print.rle`, `print.simple.list`, `print.srcfile`, `print.srcref`, `print.summary.table`, `print.summaryDefault`, `print.table`, `print.warnings`, `prmatrix`, `proc.time`, `prod`, `prop.table`, `provideDimnames`, `psigamma`, `pushBack`, `pushBackLength`, `q`, `qr`, `qr.Q`, `qr.R`, `qr.X`, `qr.coef`, `qr.default`, `qr.fitted`, `qr.qty`, `qr.qy`, `qr.resid`, `qr.solve`, `quarters`, `quarters.Date`, `quarters.POSIXt`, `quit`, `quote`, `range`, `range.default`, `rank`, `rapply`, `raw`, `rawConnection`, `rawConnectionValue`, `rawShift`, `rawToBits`, `rawToChar`, `rbind`, `rbind.data.frame`, `rcond`, `read.dcf`, `readBin`, `readChar`, `readLines`, `readRDS`, `readRenviron`, `readline`, `reg.finalizer`, `regexec`, `regexpr`, `registerS3method`, `registerS3methods`, `regmatches`, `remove`, `removeTaskCallback`, `rep`, `rep.Date`, `rep.POSIXct`, `rep.POSIXlt`, `rep.factor`, `rep.int`, `rep.numeric_version`, `rep_len`, `replace`, `replicate`, `requireNamespace`, `restartDescription`, `restartFormals`, `retracemem`, `rev`, `rev.default`, `rle`, `rm`, `round`, `round.Date`, `round.POSIXt`, `row`, `row.names`, `row.names.data.frame`, `row.names.default`, `rowMeans`, `rowSums`, `rownames`, `rowsum`, `rowsum.data.frame`, `rowsum.default`, `sQuote`, `sample`, `sample.int`, `sapply`, `save`, `save.image`, `saveRDS`, `scale`, `scale.default`, `scan`, `search`, `searchpaths`, `seek`, `seek.connection`, `seq`, `seq.Date`, `seq.POSIXt`, `seq.default`, `seq.int`, `seq_along`, `seq_len`, `sequence`, `serialize`, `set.seed`, `setHook`, `setNamespaceInfo`, `setSessionTimeLimit`, `setTimeLimit`, `setdiff`, `setequal`, `setwd`, `shQuote`, `showConnections`, `sign`, `signalCondition`, `signif`, `simpleCondition`, `simpleError`, `simpleMessage`, `simpleWarning`, `simplify2array`, `sin`, `single`, `sinh`, `sink`, `sink.number`, `slice.index`, `socketConnection`, `socketSelect`, `solve`, `solve.default`, `solve.qr`, `sort`, `sort.POSIXlt`, `sort.default`, `sort.int`, `sort.list`, `split`, `split.Date`, `split.POSIXct`, `split.data.frame`, `split.default`, `sprintf`, `sqrt`, `srcfile`, `srcfilealias`, `srcfilecopy`, `srcref`, `standardGeneric`, `stderr`, `stdin`, `stdout`, `stop`, `stopifnot`, `storage.mode`, `strftime`, `strptime`, `strsplit`, `strtoi`, `strtrim`, `structure`, `strwrap`, `sub`, `subset`, `subset.data.frame`, `subset.default`, `subset.matrix`, `substitute`, `substr`, `substring`, `sum`, `summary`, `summary.Date`, `summary.POSIXct`, `summary.POSIXlt`, `summary.connection`, `summary.data.frame`, `summary.default`, `summary.factor`, `summary.matrix`, `summary.proc_time`, `summary.srcfile`, `summary.srcref`, `summary.table`, `suppressMessages`, `suppressPackageStartupMessages`, `suppressWarnings`, `svd`, `sweep`, `sys.call`, `sys.calls`, `sys.frame`, `sys.frames`, `sys.function`, `sys.load.image`, `sys.nframe`, `sys.on.exit`, `sys.parent`, `sys.parents`, `sys.save.image`, `sys.source`, `sys.status`, `system`, `system.file`, `system.time`, `system2`, `t`, `t.data.frame`, `t.default`, `table`, `tabulate`, `tail`, `tan`, `tanh`, `tapply`, `taskCallbackManager`, `tcrossprod`, `tempdir`, `tempfile`, `testPlatformEquivalence`, `textConnection`, `textConnectionValue`, `toString`, `toString.default`, `tolower`, `topenv`, `toupper`, `trace`, `traceback`, `tracemem`, `tracingState`, `transform`, `transform.data.frame`, `transform.default`, `trigamma`, `trunc`, `trunc.Date`, `trunc.POSIXt`, `truncate`, `truncate.connection`, `try`, `tryCatch`, `typeof`, `unclass`, `undebug`, `union`, `unique`, `unique.POSIXlt`, `unique.array`, `unique.data.frame`, `unique.default`, `unique.matrix`, `unique.numeric_version`, `units`, `units.difftime`, `unix.time`, `unlink`, `unlist`, `unloadNamespace`, `unlockBinding`, `unname`, `unserialize`, `unsplit`, `untrace`, `untracemem`, `unz`, `upper.tri`, `url`, `utf8ToInt`, `vapply`, `version`, `warning`, `warnings`, `weekdays`, `weekdays.Date`, `weekdays.POSIXt`, `which`, `which.max`, `which.min`, `with`, `with.default`, `withCallingHandlers`, `withRestarts`, `withVisible`, `within`, `within.data.frame`, `within.list`, `write`, `write.dcf`, `writeBin`, `writeChar`, `writeLines`, `xor`, `xor.hexmode`, `xor.octmode`, `xpdrows.data.frame`, `xtfrm`, `xtfrm.AsIs`, `xtfrm.Date`, `xtfrm.POSIXct`, `xtfrm.POSIXlt`, `xtfrm.Surv`, `xtfrm.default`, `xtfrm.difftime`, `xtfrm.factor`, `xtfrm.numeric_version`, `xzfile`, `zapsmall`), KeywordPseudo, nil}, + {`(if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])`, KeywordReserved, nil}, + {`(array|category|character|complex|double|function|integer|list|logical|matrix|numeric|vector|data.frame|c)(?![\w.])`, KeywordType, nil}, + {`(library|require|attach|detach|source)(?![\w.])`, KeywordNamespace, nil}, + }, + "operators": { + {`<>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|\?`, Operator, nil}, + {`\*|\+|\^|/|!|%[^%]*%|=|~|\$|@|:{1,3}`, Operator, nil}, + }, + "builtin_symbols": { + {`(NULL|NA(_(integer|real|complex|character)_)?|letters|LETTERS|Inf|TRUE|FALSE|NaN|pi|\.\.(\.|[0-9]+))(?![\w.])`, KeywordConstant, nil}, + {`(T|F)\b`, NameBuiltinPseudo, nil}, + }, + "numbers": { + {`0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?`, LiteralNumberHex, nil}, + {`[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)([eE][+-]?[0-9]+)?[Li]?`, LiteralNumber, nil}, + }, + "statements": { + Include("comments"), + {`\s+`, Text, nil}, + {"`.*?`", LiteralStringBacktick, nil}, + {`\'`, LiteralString, Push("string_squote")}, + {`\"`, LiteralString, Push("string_dquote")}, + Include("builtin_symbols"), + Include("numbers"), + Include("keywords"), + Include("punctuation"), + Include("operators"), + Include("valid_name"), + }, + "root": { + Include("statements"), + {`\{|\}`, Punctuation, nil}, + {`.`, Text, nil}, + }, + "string_squote": { + {`([^\'\\]|\\.)*\'`, LiteralString, Pop(1)}, + }, + "string_dquote": { + {`([^"\\]|\\.)*"`, LiteralString, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/racket.go b/vendor/github.com/alecthomas/chroma/lexers/racket.go new file mode 100644 index 0000000..dc7e869 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/racket.go @@ -0,0 +1,101 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Racket lexer. +var Racket = Register(MustNewLexer( + &Config{ + Name: "Racket", + Aliases: []string{"racket", "rkt"}, + Filenames: []string{"*.rkt", "*.rktd", "*.rktl"}, + MimeTypes: []string{"text/x-racket", "application/x-racket"}, + }, + Rules{ + "root": { + {`[)\]}]`, Error, nil}, + {`(?!\Z)`, Text, Push("unquoted-datum")}, + }, + "datum": { + {`(?s)#;|#![ /]([^\\\n]|\\.)*`, Comment, nil}, + {`;[^\n\r…

]*`, CommentSingle, nil}, + {`#\|`, CommentMultiline, Push("block-comment")}, + {`\s+`, Text, nil}, + {"(?i)(?:#e)?(?:#d)?(?:#e)?[-+]?\\d+(?=[()[\\]{}\",\\'`;\\s])", LiteralNumberInteger, Pop(1)}, + {"(?i)(?:#e)?(?:#d)?(?:#e)?[-+]?(\\d+(\\.\\d*)?|\\.\\d+)([deflst][-+]?\\d+)?(?=[()[\\]{}\",\\'`;\\s])", LiteralNumberFloat, Pop(1)}, + {"(?i)(?:#e)?(?:#d)?(?:#e)?[-+]?((?:(?:\\d+(?:/\\d+|\\.\\d*)?|\\.\\d+)(?:[defls][-+]?\\d+)?)([-+](?:(?:\\d+(?:/\\d+|\\.\\d*)?|\\.\\d+)(?:[defls][-+]?\\d+)?)?i)?|[-+](?:(?:\\d+(?:/\\d+|\\.\\d*)?|\\.\\d+)(?:[defls][-+]?\\d+)?)?i)(?=[()[\\]{}\",\\'`;\\s])", LiteralNumber, Pop(1)}, + {"(?i)(#d)?((?:[-+]?(?:(?:(?:\\d+(?:/\\d+|\\.\\d*)?|\\.\\d+)|(?:\\d+#+(?:\\.#*|/\\d+#*)?|\\.\\d+#+|\\d+(?:\\.\\d*#+|/\\d+#+)))(?:[defls][-+]?\\d+)?)|[-+](?:(?:inf|nan)\\.[0f]))([-+](?:(?:(?:(?:\\d+(?:/\\d+|\\.\\d*)?|\\.\\d+)|(?:\\d+#+(?:\\.#*|/\\d+#*)?|\\.\\d+#+|\\d+(?:\\.\\d*#+|/\\d+#+)))(?:[defls][-+]?\\d+)?)|(?:(?:inf|nan)\\.[0f]))?i)?|[-+](?:(?:(?:(?:\\d+(?:/\\d+|\\.\\d*)?|\\.\\d+)|(?:\\d+#+(?:\\.#*|/\\d+#*)?|\\.\\d+#+|\\d+(?:\\.\\d*#+|/\\d+#+)))(?:[defls][-+]?\\d+)?)|(?:(?:inf|nan)\\.[0f]))?i|(?:[-+]?(?:(?:(?:\\d+(?:/\\d+|\\.\\d*)?|\\.\\d+)|(?:\\d+#+(?:\\.#*|/\\d+#*)?|\\.\\d+#+|\\d+(?:\\.\\d*#+|/\\d+#+)))(?:[defls][-+]?\\d+)?)|[-+](?:(?:inf|nan)\\.[0f]))@(?:[-+]?(?:(?:(?:\\d+(?:/\\d+|\\.\\d*)?|\\.\\d+)|(?:\\d+#+(?:\\.#*|/\\d+#*)?|\\.\\d+#+|\\d+(?:\\.\\d*#+|/\\d+#+)))(?:[defls][-+]?\\d+)?)|[-+](?:(?:inf|nan)\\.[0f])))(?=[()[\\]{}\",\\'`;\\s])", LiteralNumberFloat, Pop(1)}, + {"(?i)(([-+]?(?:(?:\\d+(?:/\\d+|\\.\\d*)?|\\.\\d+)|(?:\\d+#+(?:\\.#*|/\\d+#*)?|\\.\\d+#+|\\d+(?:\\.\\d*#+|/\\d+#+)))t[-+]?\\d+)|[-+](inf|nan)\\.t)(?=[()[\\]{}\",\\'`;\\s])", LiteralNumberFloat, Pop(1)}, + {"(?i)(#[ei])?#b(?:\\|[^|]*\\||\\\\[\\w\\W]|[^|\\\\()[\\]{}\",\\'`;\\s]+)+", LiteralNumberBin, Pop(1)}, + {"(?i)(#[ei])?#o(?:\\|[^|]*\\||\\\\[\\w\\W]|[^|\\\\()[\\]{}\",\\'`;\\s]+)+", LiteralNumberOct, Pop(1)}, + {"(?i)(#[ei])?#x(?:\\|[^|]*\\||\\\\[\\w\\W]|[^|\\\\()[\\]{}\",\\'`;\\s]+)+", LiteralNumberHex, Pop(1)}, + {"(?i)(#d)?#i(?:\\|[^|]*\\||\\\\[\\w\\W]|[^|\\\\()[\\]{}\",\\'`;\\s]+)+", LiteralNumberFloat, Pop(1)}, + {`#?"`, LiteralStringDouble, Push("#pop", "string")}, + {`#<<(.+)\n(^(?!\1$).*$\n)*^\1$`, LiteralStringHeredoc, Pop(1)}, + {`#\\(u[\da-fA-F]{1,4}|U[\da-fA-F]{1,8})`, LiteralStringChar, Pop(1)}, + {`(?is)#\\([0-7]{3}|[a-z]+|.)`, LiteralStringChar, Pop(1)}, + {`(?s)#[pr]x#?"(\\?.)*?"`, LiteralStringRegex, Pop(1)}, + {`#(true|false|[tTfF])`, NameConstant, Pop(1)}, + {"#:(?:\\|[^|]*\\||\\\\[\\w\\W]|[^|\\\\()[\\]{}\",\\'`;\\s]+)+", KeywordDeclaration, Pop(1)}, + {`(#lang |#!)(\S+)`, ByGroups(KeywordNamespace, NameNamespace), nil}, + {`#reader`, KeywordNamespace, Push("quoted-datum")}, + {"(?i)\\.(?=[()[\\]{}\",\\'`;\\s])|#c[is]|#['`]|#,@?", Operator, nil}, + {`'|#[s&]|#hash(eqv?)?|#\d*(?=[([{])`, Operator, Push("#pop", "quoted-datum")}, + }, + "datum*": { + {"`|,@?", Operator, nil}, + {"(?:\\|[^|]*\\||\\\\[\\w\\W]|[^|\\\\()[\\]{}\",\\'`;\\s]+)+", LiteralStringSymbol, Pop(1)}, + {`[|\\]`, Error, nil}, + Default(Pop(1)), + }, + "list": { + {`[)\]}]`, Punctuation, Pop(1)}, + }, + "unquoted-datum": { + Include("datum"), + {"quote(?=[()[\\]{}\",\\'`;\\s])", Keyword, Push("#pop", "quoted-datum")}, + {"`", Operator, Push("#pop", "quasiquoted-datum")}, + {"quasiquote(?=[()[\\]{}\",\\'`;\\s])", Keyword, Push("#pop", "quasiquoted-datum")}, + {`[([{]`, Punctuation, Push("#pop", "unquoted-list")}, + {Words(``, "(?=[()[\\]{}\",\\'`;\\s])", `#%app`, `#%datum`, `#%declare`, `#%expression`, `#%module-begin`, `#%plain-app`, `#%plain-lambda`, `#%plain-module-begin`, `#%printing-module-begin`, `#%provide`, `#%require`, `#%stratified-body`, `#%top`, `#%top-interaction`, `#%variable-reference`, `->`, `->*`, `->*m`, `->d`, `->dm`, `->i`, `->m`, `...`, `:do-in`, `==`, `=>`, `_`, `absent`, `abstract`, `all-defined-out`, `all-from-out`, `and`, `any`, `augment`, `augment*`, `augment-final`, `augment-final*`, `augride`, `augride*`, `begin`, `begin-for-syntax`, `begin0`, `case`, `case->`, `case->m`, `case-lambda`, `class`, `class*`, `class-field-accessor`, `class-field-mutator`, `class/c`, `class/derived`, `combine-in`, `combine-out`, `command-line`, `compound-unit`, `compound-unit/infer`, `cond`, `cons/dc`, `contract`, `contract-out`, `contract-struct`, `contracted`, `define`, `define-compound-unit`, `define-compound-unit/infer`, `define-contract-struct`, `define-custom-hash-types`, `define-custom-set-types`, `define-for-syntax`, `define-local-member-name`, `define-logger`, `define-match-expander`, `define-member-name`, `define-module-boundary-contract`, `define-namespace-anchor`, `define-opt/c`, `define-sequence-syntax`, `define-serializable-class`, `define-serializable-class*`, `define-signature`, `define-signature-form`, `define-struct`, `define-struct/contract`, `define-struct/derived`, `define-syntax`, `define-syntax-rule`, `define-syntaxes`, `define-unit`, `define-unit-binding`, `define-unit-from-context`, `define-unit/contract`, `define-unit/new-import-export`, `define-unit/s`, `define-values`, `define-values-for-export`, `define-values-for-syntax`, `define-values/invoke-unit`, `define-values/invoke-unit/infer`, `define/augment`, `define/augment-final`, `define/augride`, `define/contract`, `define/final-prop`, `define/match`, `define/overment`, `define/override`, `define/override-final`, `define/private`, `define/public`, `define/public-final`, `define/pubment`, `define/subexpression-pos-prop`, `define/subexpression-pos-prop/name`, `delay`, `delay/idle`, `delay/name`, `delay/strict`, `delay/sync`, `delay/thread`, `do`, `else`, `except`, `except-in`, `except-out`, `export`, `extends`, `failure-cont`, `false`, `false/c`, `field`, `field-bound?`, `file`, `flat-murec-contract`, `flat-rec-contract`, `for`, `for*`, `for*/and`, `for*/async`, `for*/first`, `for*/fold`, `for*/fold/derived`, `for*/hash`, `for*/hasheq`, `for*/hasheqv`, `for*/last`, `for*/list`, `for*/lists`, `for*/mutable-set`, `for*/mutable-seteq`, `for*/mutable-seteqv`, `for*/or`, `for*/product`, `for*/set`, `for*/seteq`, `for*/seteqv`, `for*/stream`, `for*/sum`, `for*/vector`, `for*/weak-set`, `for*/weak-seteq`, `for*/weak-seteqv`, `for-label`, `for-meta`, `for-syntax`, `for-template`, `for/and`, `for/async`, `for/first`, `for/fold`, `for/fold/derived`, `for/hash`, `for/hasheq`, `for/hasheqv`, `for/last`, `for/list`, `for/lists`, `for/mutable-set`, `for/mutable-seteq`, `for/mutable-seteqv`, `for/or`, `for/product`, `for/set`, `for/seteq`, `for/seteqv`, `for/stream`, `for/sum`, `for/vector`, `for/weak-set`, `for/weak-seteq`, `for/weak-seteqv`, `gen:custom-write`, `gen:dict`, `gen:equal+hash`, `gen:set`, `gen:stream`, `generic`, `get-field`, `hash/dc`, `if`, `implies`, `import`, `include`, `include-at/relative-to`, `include-at/relative-to/reader`, `include/reader`, `inherit`, `inherit-field`, `inherit/inner`, `inherit/super`, `init`, `init-depend`, `init-field`, `init-rest`, `inner`, `inspect`, `instantiate`, `interface`, `interface*`, `invariant-assertion`, `invoke-unit`, `invoke-unit/infer`, `lambda`, `lazy`, `let`, `let*`, `let*-values`, `let-syntax`, `let-syntaxes`, `let-values`, `let/cc`, `let/ec`, `letrec`, `letrec-syntax`, `letrec-syntaxes`, `letrec-syntaxes+values`, `letrec-values`, `lib`, `link`, `local`, `local-require`, `log-debug`, `log-error`, `log-fatal`, `log-info`, `log-warning`, `match`, `match*`, `match*/derived`, `match-define`, `match-define-values`, `match-lambda`, `match-lambda*`, `match-lambda**`, `match-let`, `match-let*`, `match-let*-values`, `match-let-values`, `match-letrec`, `match-letrec-values`, `match/derived`, `match/values`, `member-name-key`, `mixin`, `module`, `module*`, `module+`, `nand`, `new`, `nor`, `object-contract`, `object/c`, `only`, `only-in`, `only-meta-in`, `open`, `opt/c`, `or`, `overment`, `overment*`, `override`, `override*`, `override-final`, `override-final*`, `parameterize`, `parameterize*`, `parameterize-break`, `parametric->/c`, `place`, `place*`, `place/context`, `planet`, `prefix`, `prefix-in`, `prefix-out`, `private`, `private*`, `prompt-tag/c`, `protect-out`, `provide`, `provide-signature-elements`, `provide/contract`, `public`, `public*`, `public-final`, `public-final*`, `pubment`, `pubment*`, `quasiquote`, `quasisyntax`, `quasisyntax/loc`, `quote`, `quote-syntax`, `quote-syntax/prune`, `recontract-out`, `recursive-contract`, `relative-in`, `rename`, `rename-in`, `rename-inner`, `rename-out`, `rename-super`, `require`, `send`, `send*`, `send+`, `send-generic`, `send/apply`, `send/keyword-apply`, `set!`, `set!-values`, `set-field!`, `shared`, `stream`, `stream*`, `stream-cons`, `struct`, `struct*`, `struct-copy`, `struct-field-index`, `struct-out`, `struct/c`, `struct/ctc`, `struct/dc`, `submod`, `super`, `super-instantiate`, `super-make-object`, `super-new`, `syntax`, `syntax-case`, `syntax-case*`, `syntax-id-rules`, `syntax-rules`, `syntax/loc`, `tag`, `this`, `this%`, `thunk`, `thunk*`, `time`, `unconstrained-domain->`, `unit`, `unit-from-context`, `unit/c`, `unit/new-import-export`, `unit/s`, `unless`, `unquote`, `unquote-splicing`, `unsyntax`, `unsyntax-splicing`, `values/drop`, `when`, `with-continuation-mark`, `with-contract`, `with-contract-continuation-mark`, `with-handlers`, `with-handlers*`, `with-method`, `with-syntax`, `λ`), Keyword, Pop(1)}, + {Words(``, "(?=[()[\\]{}\",\\'`;\\s])", `*`, `*list/c`, `+`, `-`, `/`, `<`, ``, `>/c`, `>=`, `>=/c`, `abort-current-continuation`, `abs`, `absolute-path?`, `acos`, `add-between`, `add1`, `alarm-evt`, `always-evt`, `and/c`, `andmap`, `angle`, `any/c`, `append`, `append*`, `append-map`, `apply`, `argmax`, `argmin`, `arithmetic-shift`, `arity-at-least`, `arity-at-least-value`, `arity-at-least?`, `arity-checking-wrapper`, `arity-includes?`, `arity=?`, `arrow-contract-info`, `arrow-contract-info-accepts-arglist`, `arrow-contract-info-chaperone-procedure`, `arrow-contract-info-check-first-order`, `arrow-contract-info?`, `asin`, `assf`, `assoc`, `assq`, `assv`, `atan`, `bad-number-of-results`, `banner`, `base->-doms/c`, `base->-rngs/c`, `base->?`, `between/c`, `bitwise-and`, `bitwise-bit-field`, `bitwise-bit-set?`, `bitwise-ior`, `bitwise-not`, `bitwise-xor`, `blame-add-car-context`, `blame-add-cdr-context`, `blame-add-context`, `blame-add-missing-party`, `blame-add-nth-arg-context`, `blame-add-range-context`, `blame-add-unknown-context`, `blame-context`, `blame-contract`, `blame-fmt->-string`, `blame-missing-party?`, `blame-negative`, `blame-original?`, `blame-positive`, `blame-replace-negative`, `blame-source`, `blame-swap`, `blame-swapped?`, `blame-update`, `blame-value`, `blame?`, `boolean=?`, `boolean?`, `bound-identifier=?`, `box`, `box-cas!`, `box-immutable`, `box-immutable/c`, `box/c`, `box?`, `break-enabled`, `break-parameterization?`, `break-thread`, `build-chaperone-contract-property`, `build-compound-type-name`, `build-contract-property`, `build-flat-contract-property`, `build-list`, `build-path`, `build-path/convention-type`, `build-string`, `build-vector`, `byte-pregexp`, `byte-pregexp?`, `byte-ready?`, `byte-regexp`, `byte-regexp?`, `byte?`, `bytes`, `bytes->immutable-bytes`, `bytes->list`, `bytes->path`, `bytes->path-element`, `bytes->string/latin-1`, `bytes->string/locale`, `bytes->string/utf-8`, `bytes-append`, `bytes-append*`, `bytes-close-converter`, `bytes-convert`, `bytes-convert-end`, `bytes-converter?`, `bytes-copy`, `bytes-copy!`, `bytes-environment-variable-name?`, `bytes-fill!`, `bytes-join`, `bytes-length`, `bytes-no-nuls?`, `bytes-open-converter`, `bytes-ref`, `bytes-set!`, `bytes-utf-8-index`, `bytes-utf-8-length`, `bytes-utf-8-ref`, `bytes?`, `bytes?`, `caaaar`, `caaadr`, `caaar`, `caadar`, `caaddr`, `caadr`, `caar`, `cadaar`, `cadadr`, `cadar`, `caddar`, `cadddr`, `caddr`, `cadr`, `call-in-nested-thread`, `call-with-atomic-output-file`, `call-with-break-parameterization`, `call-with-composable-continuation`, `call-with-continuation-barrier`, `call-with-continuation-prompt`, `call-with-current-continuation`, `call-with-default-reading-parameterization`, `call-with-escape-continuation`, `call-with-exception-handler`, `call-with-file-lock/timeout`, `call-with-immediate-continuation-mark`, `call-with-input-bytes`, `call-with-input-file`, `call-with-input-file*`, `call-with-input-string`, `call-with-output-bytes`, `call-with-output-file`, `call-with-output-file*`, `call-with-output-string`, `call-with-parameterization`, `call-with-semaphore`, `call-with-semaphore/enable-break`, `call-with-values`, `call/cc`, `call/ec`, `car`, `cartesian-product`, `cdaaar`, `cdaadr`, `cdaar`, `cdadar`, `cdaddr`, `cdadr`, `cdar`, `cddaar`, `cddadr`, `cddar`, `cdddar`, `cddddr`, `cdddr`, `cddr`, `cdr`, `ceiling`, `channel-get`, `channel-put`, `channel-put-evt`, `channel-put-evt?`, `channel-try-get`, `channel/c`, `channel?`, `chaperone-box`, `chaperone-channel`, `chaperone-continuation-mark-key`, `chaperone-contract-property?`, `chaperone-contract?`, `chaperone-evt`, `chaperone-hash`, `chaperone-hash-set`, `chaperone-of?`, `chaperone-procedure`, `chaperone-procedure*`, `chaperone-prompt-tag`, `chaperone-struct`, `chaperone-struct-type`, `chaperone-vector`, `chaperone?`, `char->integer`, `char-alphabetic?`, `char-blank?`, `char-ci<=?`, `char-ci=?`, `char-ci>?`, `char-downcase`, `char-foldcase`, `char-general-category`, `char-graphic?`, `char-in`, `char-in/c`, `char-iso-control?`, `char-lower-case?`, `char-numeric?`, `char-punctuation?`, `char-ready?`, `char-symbolic?`, `char-title-case?`, `char-titlecase`, `char-upcase`, `char-upper-case?`, `char-utf-8-length`, `char-whitespace?`, `char<=?`, `char=?`, `char>?`, `char?`, `check-duplicate-identifier`, `check-duplicates`, `checked-procedure-check-and-extract`, `choice-evt`, `class->interface`, `class-info`, `class-seal`, `class-unseal`, `class?`, `cleanse-path`, `close-input-port`, `close-output-port`, `coerce-chaperone-contract`, `coerce-chaperone-contracts`, `coerce-contract`, `coerce-contract/f`, `coerce-contracts`, `coerce-flat-contract`, `coerce-flat-contracts`, `collect-garbage`, `collection-file-path`, `collection-path`, `combinations`, `compile`, `compile-allow-set!-undefined`, `compile-context-preservation-enabled`, `compile-enforce-module-constants`, `compile-syntax`, `compiled-expression-recompile`, `compiled-expression?`, `compiled-module-expression?`, `complete-path?`, `complex?`, `compose`, `compose1`, `conjoin`, `conjugate`, `cons`, `cons/c`, `cons?`, `const`, `continuation-mark-key/c`, `continuation-mark-key?`, `continuation-mark-set->context`, `continuation-mark-set->list`, `continuation-mark-set->list*`, `continuation-mark-set-first`, `continuation-mark-set?`, `continuation-marks`, `continuation-prompt-available?`, `continuation-prompt-tag?`, `continuation?`, `contract-continuation-mark-key`, `contract-custom-write-property-proc`, `contract-exercise`, `contract-first-order`, `contract-first-order-passes?`, `contract-late-neg-projection`, `contract-name`, `contract-proc`, `contract-projection`, `contract-property?`, `contract-random-generate`, `contract-random-generate-fail`, `contract-random-generate-fail?`, `contract-random-generate-get-current-environment`, `contract-random-generate-stash`, `contract-random-generate/choose`, `contract-stronger?`, `contract-struct-exercise`, `contract-struct-generate`, `contract-struct-late-neg-projection`, `contract-struct-list-contract?`, `contract-val-first-projection`, `contract?`, `convert-stream`, `copy-directory/files`, `copy-file`, `copy-port`, `cos`, `cosh`, `count`, `current-blame-format`, `current-break-parameterization`, `current-code-inspector`, `current-command-line-arguments`, `current-compile`, `current-compiled-file-roots`, `current-continuation-marks`, `current-contract-region`, `current-custodian`, `current-directory`, `current-directory-for-user`, `current-drive`, `current-environment-variables`, `current-error-port`, `current-eval`, `current-evt-pseudo-random-generator`, `current-force-delete-permissions`, `current-future`, `current-gc-milliseconds`, `current-get-interaction-input-port`, `current-inexact-milliseconds`, `current-input-port`, `current-inspector`, `current-library-collection-links`, `current-library-collection-paths`, `current-load`, `current-load-extension`, `current-load-relative-directory`, `current-load/use-compiled`, `current-locale`, `current-logger`, `current-memory-use`, `current-milliseconds`, `current-module-declare-name`, `current-module-declare-source`, `current-module-name-resolver`, `current-module-path-for-load`, `current-namespace`, `current-output-port`, `current-parameterization`, `current-plumber`, `current-preserved-thread-cell-values`, `current-print`, `current-process-milliseconds`, `current-prompt-read`, `current-pseudo-random-generator`, `current-read-interaction`, `current-reader-guard`, `current-readtable`, `current-seconds`, `current-security-guard`, `current-subprocess-custodian-mode`, `current-thread`, `current-thread-group`, `current-thread-initial-stack-size`, `current-write-relative-directory`, `curry`, `curryr`, `custodian-box-value`, `custodian-box?`, `custodian-limit-memory`, `custodian-managed-list`, `custodian-memory-accounting-available?`, `custodian-require-memory`, `custodian-shutdown-all`, `custodian?`, `custom-print-quotable-accessor`, `custom-print-quotable?`, `custom-write-accessor`, `custom-write-property-proc`, `custom-write?`, `date`, `date*`, `date*-nanosecond`, `date*-time-zone-name`, `date*?`, `date-day`, `date-dst?`, `date-hour`, `date-minute`, `date-month`, `date-second`, `date-time-zone-offset`, `date-week-day`, `date-year`, `date-year-day`, `date?`, `datum->syntax`, `datum-intern-literal`, `default-continuation-prompt-tag`, `degrees->radians`, `delete-directory`, `delete-directory/files`, `delete-file`, `denominator`, `dict->list`, `dict-can-functional-set?`, `dict-can-remove-keys?`, `dict-clear`, `dict-clear!`, `dict-copy`, `dict-count`, `dict-empty?`, `dict-for-each`, `dict-has-key?`, `dict-implements/c`, `dict-implements?`, `dict-iter-contract`, `dict-iterate-first`, `dict-iterate-key`, `dict-iterate-next`, `dict-iterate-value`, `dict-key-contract`, `dict-keys`, `dict-map`, `dict-mutable?`, `dict-ref`, `dict-ref!`, `dict-remove`, `dict-remove!`, `dict-set`, `dict-set!`, `dict-set*`, `dict-set*!`, `dict-update`, `dict-update!`, `dict-value-contract`, `dict-values`, `dict?`, `directory-exists?`, `directory-list`, `disjoin`, `display`, `display-lines`, `display-lines-to-file`, `display-to-file`, `displayln`, `double-flonum?`, `drop`, `drop-common-prefix`, `drop-right`, `dropf`, `dropf-right`, `dump-memory-stats`, `dup-input-port`, `dup-output-port`, `dynamic->*`, `dynamic-get-field`, `dynamic-object/c`, `dynamic-place`, `dynamic-place*`, `dynamic-require`, `dynamic-require-for-syntax`, `dynamic-send`, `dynamic-set-field!`, `dynamic-wind`, `eighth`, `empty`, `empty-sequence`, `empty-stream`, `empty?`, `environment-variables-copy`, `environment-variables-names`, `environment-variables-ref`, `environment-variables-set!`, `environment-variables?`, `eof`, `eof-evt`, `eof-object?`, `ephemeron-value`, `ephemeron?`, `eprintf`, `eq-contract-val`, `eq-contract?`, `eq-hash-code`, `eq?`, `equal-contract-val`, `equal-contract?`, `equal-hash-code`, `equal-secondary-hash-code`, `equal<%>`, `equal?`, `equal?/recur`, `eqv-hash-code`, `eqv?`, `error`, `error-display-handler`, `error-escape-handler`, `error-print-context-length`, `error-print-source-location`, `error-print-width`, `error-value->string-handler`, `eval`, `eval-jit-enabled`, `eval-syntax`, `even?`, `evt/c`, `evt?`, `exact->inexact`, `exact-ceiling`, `exact-floor`, `exact-integer?`, `exact-nonnegative-integer?`, `exact-positive-integer?`, `exact-round`, `exact-truncate`, `exact?`, `executable-yield-handler`, `exit`, `exit-handler`, `exn`, `exn-continuation-marks`, `exn-message`, `exn:break`, `exn:break-continuation`, `exn:break:hang-up`, `exn:break:hang-up?`, `exn:break:terminate`, `exn:break:terminate?`, `exn:break?`, `exn:fail`, `exn:fail:contract`, `exn:fail:contract:arity`, `exn:fail:contract:arity?`, `exn:fail:contract:blame`, `exn:fail:contract:blame-object`, `exn:fail:contract:blame?`, `exn:fail:contract:continuation`, `exn:fail:contract:continuation?`, `exn:fail:contract:divide-by-zero`, `exn:fail:contract:divide-by-zero?`, `exn:fail:contract:non-fixnum-result`, `exn:fail:contract:non-fixnum-result?`, `exn:fail:contract:variable`, `exn:fail:contract:variable-id`, `exn:fail:contract:variable?`, `exn:fail:contract?`, `exn:fail:filesystem`, `exn:fail:filesystem:errno`, `exn:fail:filesystem:errno-errno`, `exn:fail:filesystem:errno?`, `exn:fail:filesystem:exists`, `exn:fail:filesystem:exists?`, `exn:fail:filesystem:missing-module`, `exn:fail:filesystem:missing-module-path`, `exn:fail:filesystem:missing-module?`, `exn:fail:filesystem:version`, `exn:fail:filesystem:version?`, `exn:fail:filesystem?`, `exn:fail:network`, `exn:fail:network:errno`, `exn:fail:network:errno-errno`, `exn:fail:network:errno?`, `exn:fail:network?`, `exn:fail:object`, `exn:fail:object?`, `exn:fail:out-of-memory`, `exn:fail:out-of-memory?`, `exn:fail:read`, `exn:fail:read-srclocs`, `exn:fail:read:eof`, `exn:fail:read:eof?`, `exn:fail:read:non-char`, `exn:fail:read:non-char?`, `exn:fail:read?`, `exn:fail:syntax`, `exn:fail:syntax-exprs`, `exn:fail:syntax:missing-module`, `exn:fail:syntax:missing-module-path`, `exn:fail:syntax:missing-module?`, `exn:fail:syntax:unbound`, `exn:fail:syntax:unbound?`, `exn:fail:syntax?`, `exn:fail:unsupported`, `exn:fail:unsupported?`, `exn:fail:user`, `exn:fail:user?`, `exn:fail?`, `exn:misc:match?`, `exn:missing-module-accessor`, `exn:missing-module?`, `exn:srclocs-accessor`, `exn:srclocs?`, `exn?`, `exp`, `expand`, `expand-once`, `expand-syntax`, `expand-syntax-once`, `expand-syntax-to-top-form`, `expand-to-top-form`, `expand-user-path`, `explode-path`, `expt`, `externalizable<%>`, `failure-result/c`, `false?`, `field-names`, `fifth`, `file->bytes`, `file->bytes-lines`, `file->lines`, `file->list`, `file->string`, `file->value`, `file-exists?`, `file-name-from-path`, `file-or-directory-identity`, `file-or-directory-modify-seconds`, `file-or-directory-permissions`, `file-position`, `file-position*`, `file-size`, `file-stream-buffer-mode`, `file-stream-port?`, `file-truncate`, `filename-extension`, `filesystem-change-evt`, `filesystem-change-evt-cancel`, `filesystem-change-evt?`, `filesystem-root-list`, `filter`, `filter-map`, `filter-not`, `filter-read-input-port`, `find-executable-path`, `find-files`, `find-library-collection-links`, `find-library-collection-paths`, `find-relative-path`, `find-system-path`, `findf`, `first`, `first-or/c`, `fixnum?`, `flat-contract`, `flat-contract-predicate`, `flat-contract-property?`, `flat-contract?`, `flat-named-contract`, `flatten`, `floating-point-bytes->real`, `flonum?`, `floor`, `flush-output`, `fold-files`, `foldl`, `foldr`, `for-each`, `force`, `format`, `fourth`, `fprintf`, `free-identifier=?`, `free-label-identifier=?`, `free-template-identifier=?`, `free-transformer-identifier=?`, `fsemaphore-count`, `fsemaphore-post`, `fsemaphore-try-wait?`, `fsemaphore-wait`, `fsemaphore?`, `future`, `future?`, `futures-enabled?`, `gcd`, `generate-member-key`, `generate-temporaries`, `generic-set?`, `generic?`, `gensym`, `get-output-bytes`, `get-output-string`, `get-preference`, `get/build-late-neg-projection`, `get/build-val-first-projection`, `getenv`, `global-port-print-handler`, `group-by`, `group-execute-bit`, `group-read-bit`, `group-write-bit`, `guard-evt`, `handle-evt`, `handle-evt?`, `has-blame?`, `has-contract?`, `hash`, `hash->list`, `hash-clear`, `hash-clear!`, `hash-copy`, `hash-copy-clear`, `hash-count`, `hash-empty?`, `hash-eq?`, `hash-equal?`, `hash-eqv?`, `hash-for-each`, `hash-has-key?`, `hash-iterate-first`, `hash-iterate-key`, `hash-iterate-key+value`, `hash-iterate-next`, `hash-iterate-pair`, `hash-iterate-value`, `hash-keys`, `hash-map`, `hash-placeholder?`, `hash-ref`, `hash-ref!`, `hash-remove`, `hash-remove!`, `hash-set`, `hash-set!`, `hash-set*`, `hash-set*!`, `hash-update`, `hash-update!`, `hash-values`, `hash-weak?`, `hash/c`, `hash?`, `hasheq`, `hasheqv`, `identifier-binding`, `identifier-binding-symbol`, `identifier-label-binding`, `identifier-prune-lexical-context`, `identifier-prune-to-source-module`, `identifier-remove-from-definition-context`, `identifier-template-binding`, `identifier-transformer-binding`, `identifier?`, `identity`, `if/c`, `imag-part`, `immutable?`, `impersonate-box`, `impersonate-channel`, `impersonate-continuation-mark-key`, `impersonate-hash`, `impersonate-hash-set`, `impersonate-procedure`, `impersonate-procedure*`, `impersonate-prompt-tag`, `impersonate-struct`, `impersonate-vector`, `impersonator-contract?`, `impersonator-ephemeron`, `impersonator-of?`, `impersonator-prop:application-mark`, `impersonator-prop:blame`, `impersonator-prop:contracted`, `impersonator-property-accessor-procedure?`, `impersonator-property?`, `impersonator?`, `implementation?`, `implementation?/c`, `in-bytes`, `in-bytes-lines`, `in-combinations`, `in-cycle`, `in-dict`, `in-dict-keys`, `in-dict-pairs`, `in-dict-values`, `in-directory`, `in-hash`, `in-hash-keys`, `in-hash-pairs`, `in-hash-values`, `in-immutable-hash`, `in-immutable-hash-keys`, `in-immutable-hash-pairs`, `in-immutable-hash-values`, `in-immutable-set`, `in-indexed`, `in-input-port-bytes`, `in-input-port-chars`, `in-lines`, `in-list`, `in-mlist`, `in-mutable-hash`, `in-mutable-hash-keys`, `in-mutable-hash-pairs`, `in-mutable-hash-values`, `in-mutable-set`, `in-naturals`, `in-parallel`, `in-permutations`, `in-port`, `in-producer`, `in-range`, `in-sequences`, `in-set`, `in-slice`, `in-stream`, `in-string`, `in-syntax`, `in-value`, `in-values*-sequence`, `in-values-sequence`, `in-vector`, `in-weak-hash`, `in-weak-hash-keys`, `in-weak-hash-pairs`, `in-weak-hash-values`, `in-weak-set`, `inexact->exact`, `inexact-real?`, `inexact?`, `infinite?`, `input-port-append`, `input-port?`, `inspector?`, `instanceof/c`, `integer->char`, `integer->integer-bytes`, `integer-bytes->integer`, `integer-in`, `integer-length`, `integer-sqrt`, `integer-sqrt/remainder`, `integer?`, `interface->method-names`, `interface-extension?`, `interface?`, `internal-definition-context-binding-identifiers`, `internal-definition-context-introduce`, `internal-definition-context-seal`, `internal-definition-context?`, `is-a?`, `is-a?/c`, `keyword->string`, `keyword-apply`, `keywordbytes`, `list->mutable-set`, `list->mutable-seteq`, `list->mutable-seteqv`, `list->set`, `list->seteq`, `list->seteqv`, `list->string`, `list->vector`, `list->weak-set`, `list->weak-seteq`, `list->weak-seteqv`, `list-contract?`, `list-prefix?`, `list-ref`, `list-set`, `list-tail`, `list-update`, `list/c`, `list?`, `listen-port-number?`, `listof`, `load`, `load-extension`, `load-on-demand-enabled`, `load-relative`, `load-relative-extension`, `load/cd`, `load/use-compiled`, `local-expand`, `local-expand/capture-lifts`, `local-transformer-expand`, `local-transformer-expand/capture-lifts`, `locale-string-encoding`, `log`, `log-all-levels`, `log-level-evt`, `log-level?`, `log-max-level`, `log-message`, `log-receiver?`, `logger-name`, `logger?`, `magnitude`, `make-arity-at-least`, `make-base-empty-namespace`, `make-base-namespace`, `make-bytes`, `make-channel`, `make-chaperone-contract`, `make-continuation-mark-key`, `make-continuation-prompt-tag`, `make-contract`, `make-custodian`, `make-custodian-box`, `make-custom-hash`, `make-custom-hash-types`, `make-custom-set`, `make-custom-set-types`, `make-date`, `make-date*`, `make-derived-parameter`, `make-directory`, `make-directory*`, `make-do-sequence`, `make-empty-namespace`, `make-environment-variables`, `make-ephemeron`, `make-exn`, `make-exn:break`, `make-exn:break:hang-up`, `make-exn:break:terminate`, `make-exn:fail`, `make-exn:fail:contract`, `make-exn:fail:contract:arity`, `make-exn:fail:contract:blame`, `make-exn:fail:contract:continuation`, `make-exn:fail:contract:divide-by-zero`, `make-exn:fail:contract:non-fixnum-result`, `make-exn:fail:contract:variable`, `make-exn:fail:filesystem`, `make-exn:fail:filesystem:errno`, `make-exn:fail:filesystem:exists`, `make-exn:fail:filesystem:missing-module`, `make-exn:fail:filesystem:version`, `make-exn:fail:network`, `make-exn:fail:network:errno`, `make-exn:fail:object`, `make-exn:fail:out-of-memory`, `make-exn:fail:read`, `make-exn:fail:read:eof`, `make-exn:fail:read:non-char`, `make-exn:fail:syntax`, `make-exn:fail:syntax:missing-module`, `make-exn:fail:syntax:unbound`, `make-exn:fail:unsupported`, `make-exn:fail:user`, `make-file-or-directory-link`, `make-flat-contract`, `make-fsemaphore`, `make-generic`, `make-handle-get-preference-locked`, `make-hash`, `make-hash-placeholder`, `make-hasheq`, `make-hasheq-placeholder`, `make-hasheqv`, `make-hasheqv-placeholder`, `make-immutable-custom-hash`, `make-immutable-hash`, `make-immutable-hasheq`, `make-immutable-hasheqv`, `make-impersonator-property`, `make-input-port`, `make-input-port/read-to-peek`, `make-inspector`, `make-keyword-procedure`, `make-known-char-range-list`, `make-limited-input-port`, `make-list`, `make-lock-file-name`, `make-log-receiver`, `make-logger`, `make-mixin-contract`, `make-mutable-custom-set`, `make-none/c`, `make-object`, `make-output-port`, `make-parameter`, `make-parent-directory*`, `make-phantom-bytes`, `make-pipe`, `make-pipe-with-specials`, `make-placeholder`, `make-plumber`, `make-polar`, `make-prefab-struct`, `make-primitive-class`, `make-proj-contract`, `make-pseudo-random-generator`, `make-reader-graph`, `make-readtable`, `make-rectangular`, `make-rename-transformer`, `make-resolved-module-path`, `make-security-guard`, `make-semaphore`, `make-set!-transformer`, `make-shared-bytes`, `make-sibling-inspector`, `make-special-comment`, `make-srcloc`, `make-string`, `make-struct-field-accessor`, `make-struct-field-mutator`, `make-struct-type`, `make-struct-type-property`, `make-syntax-delta-introducer`, `make-syntax-introducer`, `make-temporary-file`, `make-tentative-pretty-print-output-port`, `make-thread-cell`, `make-thread-group`, `make-vector`, `make-weak-box`, `make-weak-custom-hash`, `make-weak-custom-set`, `make-weak-hash`, `make-weak-hasheq`, `make-weak-hasheqv`, `make-will-executor`, `map`, `match-equality-test`, `matches-arity-exactly?`, `max`, `mcar`, `mcdr`, `mcons`, `member`, `member-name-key-hash-code`, `member-name-key=?`, `member-name-key?`, `memf`, `memq`, `memv`, `merge-input`, `method-in-interface?`, `min`, `mixin-contract`, `module->exports`, `module->imports`, `module->language-info`, `module->namespace`, `module-compiled-cross-phase-persistent?`, `module-compiled-exports`, `module-compiled-imports`, `module-compiled-language-info`, `module-compiled-name`, `module-compiled-submodules`, `module-declared?`, `module-path-index-join`, `module-path-index-resolve`, `module-path-index-split`, `module-path-index-submodule`, `module-path-index?`, `module-path?`, `module-predefined?`, `module-provide-protected?`, `modulo`, `mpair?`, `mutable-set`, `mutable-seteq`, `mutable-seteqv`, `n->th`, `nack-guard-evt`, `namespace-anchor->empty-namespace`, `namespace-anchor->namespace`, `namespace-anchor?`, `namespace-attach-module`, `namespace-attach-module-declaration`, `namespace-base-phase`, `namespace-mapped-symbols`, `namespace-module-identifier`, `namespace-module-registry`, `namespace-require`, `namespace-require/constant`, `namespace-require/copy`, `namespace-require/expansion-time`, `namespace-set-variable-value!`, `namespace-symbol->identifier`, `namespace-syntax-introduce`, `namespace-undefine-variable!`, `namespace-unprotect-module`, `namespace-variable-value`, `namespace?`, `nan?`, `natural-number/c`, `negate`, `negative?`, `never-evt`, `new-∀/c`, `new-∃/c`, `newline`, `ninth`, `non-empty-listof`, `non-empty-string?`, `none/c`, `normal-case-path`, `normalize-arity`, `normalize-path`, `normalized-arity?`, `not`, `not/c`, `null`, `null?`, `number->string`, `number?`, `numerator`, `object%`, `object->vector`, `object-info`, `object-interface`, `object-method-arity-includes?`, `object-name`, `object-or-false=?`, `object=?`, `object?`, `odd?`, `one-of/c`, `open-input-bytes`, `open-input-file`, `open-input-output-file`, `open-input-string`, `open-output-bytes`, `open-output-file`, `open-output-nowhere`, `open-output-string`, `or/c`, `order-of-magnitude`, `ormap`, `other-execute-bit`, `other-read-bit`, `other-write-bit`, `output-port?`, `pair?`, `parameter-procedure=?`, `parameter/c`, `parameter?`, `parameterization?`, `parse-command-line`, `partition`, `path->bytes`, `path->complete-path`, `path->directory-path`, `path->string`, `path-add-suffix`, `path-convention-type`, `path-element->bytes`, `path-element->string`, `path-element?`, `path-for-some-system?`, `path-list-string->path-list`, `path-only`, `path-replace-suffix`, `path-string?`, `pathbytes`, `port->bytes-lines`, `port->lines`, `port->list`, `port->string`, `port-closed-evt`, `port-closed?`, `port-commit-peeked`, `port-count-lines!`, `port-count-lines-enabled`, `port-counts-lines?`, `port-display-handler`, `port-file-identity`, `port-file-unlock`, `port-next-location`, `port-number?`, `port-print-handler`, `port-progress-evt`, `port-provides-progress-evts?`, `port-read-handler`, `port-try-file-lock?`, `port-write-handler`, `port-writes-atomic?`, `port-writes-special?`, `port?`, `positive?`, `predicate/c`, `prefab-key->struct-type`, `prefab-key?`, `prefab-struct-key`, `preferences-lock-file-mode`, `pregexp`, `pregexp?`, `pretty-display`, `pretty-format`, `pretty-print`, `pretty-print-.-symbol-without-bars`, `pretty-print-abbreviate-read-macros`, `pretty-print-columns`, `pretty-print-current-style-table`, `pretty-print-depth`, `pretty-print-exact-as-decimal`, `pretty-print-extend-style-table`, `pretty-print-handler`, `pretty-print-newline`, `pretty-print-post-print-hook`, `pretty-print-pre-print-hook`, `pretty-print-print-hook`, `pretty-print-print-line`, `pretty-print-remap-stylable`, `pretty-print-show-inexactness`, `pretty-print-size-hook`, `pretty-print-style-table?`, `pretty-printing`, `pretty-write`, `primitive-closure?`, `primitive-result-arity`, `primitive?`, `print`, `print-as-expression`, `print-boolean-long-form`, `print-box`, `print-graph`, `print-hash-table`, `print-mpair-curly-braces`, `print-pair-curly-braces`, `print-reader-abbreviations`, `print-struct`, `print-syntax-width`, `print-unreadable`, `print-vector-length`, `printable/c`, `printable<%>`, `printf`, `println`, `procedure->method`, `procedure-arity`, `procedure-arity-includes/c`, `procedure-arity-includes?`, `procedure-arity?`, `procedure-closure-contents-eq?`, `procedure-extract-target`, `procedure-keywords`, `procedure-reduce-arity`, `procedure-reduce-keyword-arity`, `procedure-rename`, `procedure-result-arity`, `procedure-specialize`, `procedure-struct-type?`, `procedure?`, `process`, `process*`, `process*/ports`, `process/ports`, `processor-count`, `progress-evt?`, `promise-forced?`, `promise-running?`, `promise/c`, `promise/name?`, `promise?`, `prop:arity-string`, `prop:arrow-contract`, `prop:arrow-contract-get-info`, `prop:arrow-contract?`, `prop:blame`, `prop:chaperone-contract`, `prop:checked-procedure`, `prop:contract`, `prop:contracted`, `prop:custom-print-quotable`, `prop:custom-write`, `prop:dict`, `prop:dict/contract`, `prop:equal+hash`, `prop:evt`, `prop:exn:missing-module`, `prop:exn:srclocs`, `prop:expansion-contexts`, `prop:flat-contract`, `prop:impersonator-of`, `prop:input-port`, `prop:liberal-define-context`, `prop:object-name`, `prop:opt-chaperone-contract`, `prop:opt-chaperone-contract-get-test`, `prop:opt-chaperone-contract?`, `prop:orc-contract`, `prop:orc-contract-get-subcontracts`, `prop:orc-contract?`, `prop:output-port`, `prop:place-location`, `prop:procedure`, `prop:recursive-contract`, `prop:recursive-contract-unroll`, `prop:recursive-contract?`, `prop:rename-transformer`, `prop:sequence`, `prop:set!-transformer`, `prop:stream`, `proper-subset?`, `pseudo-random-generator->vector`, `pseudo-random-generator-vector?`, `pseudo-random-generator?`, `put-preferences`, `putenv`, `quotient`, `quotient/remainder`, `radians->degrees`, `raise`, `raise-argument-error`, `raise-arguments-error`, `raise-arity-error`, `raise-blame-error`, `raise-contract-error`, `raise-mismatch-error`, `raise-not-cons-blame-error`, `raise-range-error`, `raise-result-error`, `raise-syntax-error`, `raise-type-error`, `raise-user-error`, `random`, `random-seed`, `range`, `rational?`, `rationalize`, `read`, `read-accept-bar-quote`, `read-accept-box`, `read-accept-compiled`, `read-accept-dot`, `read-accept-graph`, `read-accept-infix-dot`, `read-accept-lang`, `read-accept-quasiquote`, `read-accept-reader`, `read-byte`, `read-byte-or-special`, `read-bytes`, `read-bytes!`, `read-bytes!-evt`, `read-bytes-avail!`, `read-bytes-avail!*`, `read-bytes-avail!-evt`, `read-bytes-avail!/enable-break`, `read-bytes-evt`, `read-bytes-line`, `read-bytes-line-evt`, `read-case-sensitive`, `read-cdot`, `read-char`, `read-char-or-special`, `read-curly-brace-as-paren`, `read-curly-brace-with-tag`, `read-decimal-as-inexact`, `read-eval-print-loop`, `read-language`, `read-line`, `read-line-evt`, `read-on-demand-source`, `read-square-bracket-as-paren`, `read-square-bracket-with-tag`, `read-string`, `read-string!`, `read-string!-evt`, `read-string-evt`, `read-syntax`, `read-syntax/recursive`, `read/recursive`, `readtable-mapping`, `readtable?`, `real->decimal-string`, `real->double-flonum`, `real->floating-point-bytes`, `real->single-flonum`, `real-in`, `real-part`, `real?`, `reencode-input-port`, `reencode-output-port`, `regexp`, `regexp-match`, `regexp-match*`, `regexp-match-evt`, `regexp-match-exact?`, `regexp-match-peek`, `regexp-match-peek-immediate`, `regexp-match-peek-positions`, `regexp-match-peek-positions*`, `regexp-match-peek-positions-immediate`, `regexp-match-peek-positions-immediate/end`, `regexp-match-peek-positions/end`, `regexp-match-positions`, `regexp-match-positions*`, `regexp-match-positions/end`, `regexp-match/end`, `regexp-match?`, `regexp-max-lookbehind`, `regexp-quote`, `regexp-replace`, `regexp-replace*`, `regexp-replace-quote`, `regexp-replaces`, `regexp-split`, `regexp-try-match`, `regexp?`, `relative-path?`, `relocate-input-port`, `relocate-output-port`, `remainder`, `remf`, `remf*`, `remove`, `remove*`, `remove-duplicates`, `remq`, `remq*`, `remv`, `remv*`, `rename-contract`, `rename-file-or-directory`, `rename-transformer-target`, `rename-transformer?`, `replace-evt`, `reroot-path`, `resolve-path`, `resolved-module-path-name`, `resolved-module-path?`, `rest`, `reverse`, `round`, `second`, `seconds->date`, `security-guard?`, `semaphore-peek-evt`, `semaphore-peek-evt?`, `semaphore-post`, `semaphore-try-wait?`, `semaphore-wait`, `semaphore-wait/enable-break`, `semaphore?`, `sequence->list`, `sequence->stream`, `sequence-add-between`, `sequence-andmap`, `sequence-append`, `sequence-count`, `sequence-filter`, `sequence-fold`, `sequence-for-each`, `sequence-generate`, `sequence-generate*`, `sequence-length`, `sequence-map`, `sequence-ormap`, `sequence-ref`, `sequence-tail`, `sequence/c`, `sequence?`, `set`, `set!-transformer-procedure`, `set!-transformer?`, `set->list`, `set->stream`, `set-add`, `set-add!`, `set-box!`, `set-clear`, `set-clear!`, `set-copy`, `set-copy-clear`, `set-count`, `set-empty?`, `set-eq?`, `set-equal?`, `set-eqv?`, `set-first`, `set-for-each`, `set-implements/c`, `set-implements?`, `set-intersect`, `set-intersect!`, `set-map`, `set-mcar!`, `set-mcdr!`, `set-member?`, `set-mutable?`, `set-phantom-bytes!`, `set-port-next-location!`, `set-remove`, `set-remove!`, `set-rest`, `set-some-basic-contracts!`, `set-subtract`, `set-subtract!`, `set-symmetric-difference`, `set-symmetric-difference!`, `set-union`, `set-union!`, `set-weak?`, `set/c`, `set=?`, `set?`, `seteq`, `seteqv`, `seventh`, `sgn`, `shared-bytes`, `shell-execute`, `shrink-path-wrt`, `shuffle`, `simple-form-path`, `simplify-path`, `sin`, `single-flonum?`, `sinh`, `sixth`, `skip-projection-wrapper?`, `sleep`, `some-system-path->string`, `sort`, `special-comment-value`, `special-comment?`, `special-filter-input-port`, `split-at`, `split-at-right`, `split-common-prefix`, `split-path`, `splitf-at`, `splitf-at-right`, `sqr`, `sqrt`, `srcloc`, `srcloc->string`, `srcloc-column`, `srcloc-line`, `srcloc-position`, `srcloc-source`, `srcloc-span`, `srcloc?`, `stop-after`, `stop-before`, `stream->list`, `stream-add-between`, `stream-andmap`, `stream-append`, `stream-count`, `stream-empty?`, `stream-filter`, `stream-first`, `stream-fold`, `stream-for-each`, `stream-length`, `stream-map`, `stream-ormap`, `stream-ref`, `stream-rest`, `stream-tail`, `stream/c`, `stream?`, `string`, `string->bytes/latin-1`, `string->bytes/locale`, `string->bytes/utf-8`, `string->immutable-string`, `string->keyword`, `string->list`, `string->number`, `string->path`, `string->path-element`, `string->some-system-path`, `string->symbol`, `string->uninterned-symbol`, `string->unreadable-symbol`, `string-append`, `string-append*`, `string-ci<=?`, `string-ci=?`, `string-ci>?`, `string-contains?`, `string-copy`, `string-copy!`, `string-downcase`, `string-environment-variable-name?`, `string-fill!`, `string-foldcase`, `string-join`, `string-len/c`, `string-length`, `string-locale-ci?`, `string-locale-downcase`, `string-locale-upcase`, `string-locale?`, `string-no-nuls?`, `string-normalize-nfc`, `string-normalize-nfd`, `string-normalize-nfkc`, `string-normalize-nfkd`, `string-normalize-spaces`, `string-port?`, `string-prefix?`, `string-ref`, `string-replace`, `string-set!`, `string-split`, `string-suffix?`, `string-titlecase`, `string-trim`, `string-upcase`, `string-utf-8-length`, `string<=?`, `string=?`, `string>?`, `string?`, `struct->vector`, `struct-accessor-procedure?`, `struct-constructor-procedure?`, `struct-info`, `struct-mutator-procedure?`, `struct-predicate-procedure?`, `struct-type-info`, `struct-type-make-constructor`, `struct-type-make-predicate`, `struct-type-property-accessor-procedure?`, `struct-type-property/c`, `struct-type-property?`, `struct-type?`, `struct:arity-at-least`, `struct:arrow-contract-info`, `struct:date`, `struct:date*`, `struct:exn`, `struct:exn:break`, `struct:exn:break:hang-up`, `struct:exn:break:terminate`, `struct:exn:fail`, `struct:exn:fail:contract`, `struct:exn:fail:contract:arity`, `struct:exn:fail:contract:blame`, `struct:exn:fail:contract:continuation`, `struct:exn:fail:contract:divide-by-zero`, `struct:exn:fail:contract:non-fixnum-result`, `struct:exn:fail:contract:variable`, `struct:exn:fail:filesystem`, `struct:exn:fail:filesystem:errno`, `struct:exn:fail:filesystem:exists`, `struct:exn:fail:filesystem:missing-module`, `struct:exn:fail:filesystem:version`, `struct:exn:fail:network`, `struct:exn:fail:network:errno`, `struct:exn:fail:object`, `struct:exn:fail:out-of-memory`, `struct:exn:fail:read`, `struct:exn:fail:read:eof`, `struct:exn:fail:read:non-char`, `struct:exn:fail:syntax`, `struct:exn:fail:syntax:missing-module`, `struct:exn:fail:syntax:unbound`, `struct:exn:fail:unsupported`, `struct:exn:fail:user`, `struct:srcloc`, `struct:wrapped-extra-arg-arrow`, `struct?`, `sub1`, `subbytes`, `subclass?`, `subclass?/c`, `subprocess`, `subprocess-group-enabled`, `subprocess-kill`, `subprocess-pid`, `subprocess-status`, `subprocess-wait`, `subprocess?`, `subset?`, `substring`, `suggest/c`, `symbol->string`, `symbol-interned?`, `symbol-unreadable?`, `symboldatum`, `syntax->list`, `syntax-arm`, `syntax-column`, `syntax-debug-info`, `syntax-disarm`, `syntax-e`, `syntax-line`, `syntax-local-bind-syntaxes`, `syntax-local-certifier`, `syntax-local-context`, `syntax-local-expand-expression`, `syntax-local-get-shadower`, `syntax-local-identifier-as-binding`, `syntax-local-introduce`, `syntax-local-lift-context`, `syntax-local-lift-expression`, `syntax-local-lift-module`, `syntax-local-lift-module-end-declaration`, `syntax-local-lift-provide`, `syntax-local-lift-require`, `syntax-local-lift-values-expression`, `syntax-local-make-definition-context`, `syntax-local-make-delta-introducer`, `syntax-local-module-defined-identifiers`, `syntax-local-module-exports`, `syntax-local-module-required-identifiers`, `syntax-local-name`, `syntax-local-phase-level`, `syntax-local-submodules`, `syntax-local-transforming-module-provides?`, `syntax-local-value`, `syntax-local-value/immediate`, `syntax-original?`, `syntax-position`, `syntax-property`, `syntax-property-preserved?`, `syntax-property-symbol-keys`, `syntax-protect`, `syntax-rearm`, `syntax-recertify`, `syntax-shift-phase-level`, `syntax-source`, `syntax-source-module`, `syntax-span`, `syntax-taint`, `syntax-tainted?`, `syntax-track-origin`, `syntax-transforming-module-expression?`, `syntax-transforming-with-lifts?`, `syntax-transforming?`, `syntax/c`, `syntax?`, `system`, `system*`, `system*/exit-code`, `system-big-endian?`, `system-idle-evt`, `system-language+country`, `system-library-subpath`, `system-path-convention-type`, `system-type`, `system/exit-code`, `tail-marks-match?`, `take`, `take-common-prefix`, `take-right`, `takef`, `takef-right`, `tan`, `tanh`, `tcp-abandon-port`, `tcp-accept`, `tcp-accept-evt`, `tcp-accept-ready?`, `tcp-accept/enable-break`, `tcp-addresses`, `tcp-close`, `tcp-connect`, `tcp-connect/enable-break`, `tcp-listen`, `tcp-listener?`, `tcp-port?`, `tentative-pretty-print-port-cancel`, `tentative-pretty-print-port-transfer`, `tenth`, `terminal-port?`, `the-unsupplied-arg`, `third`, `thread`, `thread-cell-ref`, `thread-cell-set!`, `thread-cell-values?`, `thread-cell?`, `thread-dead-evt`, `thread-dead?`, `thread-group?`, `thread-receive`, `thread-receive-evt`, `thread-resume`, `thread-resume-evt`, `thread-rewind-receive`, `thread-running?`, `thread-send`, `thread-suspend`, `thread-suspend-evt`, `thread-try-receive`, `thread-wait`, `thread/suspend-to-kill`, `thread?`, `time-apply`, `touch`, `transplant-input-port`, `transplant-output-port`, `true`, `truncate`, `udp-addresses`, `udp-bind!`, `udp-bound?`, `udp-close`, `udp-connect!`, `udp-connected?`, `udp-multicast-interface`, `udp-multicast-join-group!`, `udp-multicast-leave-group!`, `udp-multicast-loopback?`, `udp-multicast-set-interface!`, `udp-multicast-set-loopback!`, `udp-multicast-set-ttl!`, `udp-multicast-ttl`, `udp-open-socket`, `udp-receive!`, `udp-receive!*`, `udp-receive!-evt`, `udp-receive!/enable-break`, `udp-receive-ready-evt`, `udp-send`, `udp-send*`, `udp-send-evt`, `udp-send-ready-evt`, `udp-send-to`, `udp-send-to*`, `udp-send-to-evt`, `udp-send-to/enable-break`, `udp-send/enable-break`, `udp?`, `unbox`, `uncaught-exception-handler`, `unit?`, `unspecified-dom`, `unsupplied-arg?`, `use-collection-link-paths`, `use-compiled-file-paths`, `use-user-specific-search-paths`, `user-execute-bit`, `user-read-bit`, `user-write-bit`, `value-blame`, `value-contract`, `values`, `variable-reference->empty-namespace`, `variable-reference->module-base-phase`, `variable-reference->module-declaration-inspector`, `variable-reference->module-path-index`, `variable-reference->module-source`, `variable-reference->namespace`, `variable-reference->phase`, `variable-reference->resolved-module-path`, `variable-reference-constant?`, `variable-reference?`, `vector`, `vector->immutable-vector`, `vector->list`, `vector->pseudo-random-generator`, `vector->pseudo-random-generator!`, `vector->values`, `vector-append`, `vector-argmax`, `vector-argmin`, `vector-copy`, `vector-copy!`, `vector-count`, `vector-drop`, `vector-drop-right`, `vector-fill!`, `vector-filter`, `vector-filter-not`, `vector-immutable`, `vector-immutable/c`, `vector-immutableof`, `vector-length`, `vector-map`, `vector-map!`, `vector-member`, `vector-memq`, `vector-memv`, `vector-ref`, `vector-set!`, `vector-set*!`, `vector-set-performance-stats!`, `vector-split-at`, `vector-split-at-right`, `vector-take`, `vector-take-right`, `vector/c`, `vector?`, `vectorof`, `version`, `void`, `void?`, `weak-box-value`, `weak-box?`, `weak-set`, `weak-seteq`, `weak-seteqv`, `will-execute`, `will-executor?`, `will-register`, `will-try-execute`, `with-input-from-bytes`, `with-input-from-file`, `with-input-from-string`, `with-output-to-bytes`, `with-output-to-file`, `with-output-to-string`, `would-be-future`, `wrap-evt`, `wrapped-extra-arg-arrow`, `wrapped-extra-arg-arrow-extra-neg-party-argument`, `wrapped-extra-arg-arrow-real-func`, `wrapped-extra-arg-arrow?`, `writable<%>`, `write`, `write-byte`, `write-bytes`, `write-bytes-avail`, `write-bytes-avail*`, `write-bytes-avail-evt`, `write-bytes-avail/enable-break`, `write-char`, `write-special`, `write-special-avail*`, `write-special-evt`, `write-string`, `write-to-file`, `writeln`, `xor`, `zero?`, `~.a`, `~.s`, `~.v`, `~a`, `~e`, `~r`, `~s`, `~v`), NameBuiltin, Pop(1)}, + {"(?:\\|[^|]*\\||\\\\[\\w\\W]|[^|\\\\()[\\]{}\",\\'`;\\s]+)+", Name, Pop(1)}, + Include("datum*"), + }, + "unquoted-list": { + Include("list"), + {`(?!\Z)`, Text, Push("unquoted-datum")}, + }, + "quasiquoted-datum": { + Include("datum"), + {`,@?`, Operator, Push("#pop", "unquoted-datum")}, + {"unquote(-splicing)?(?=[()[\\]{}\",\\'`;\\s])", Keyword, Push("#pop", "unquoted-datum")}, + {`[([{]`, Punctuation, Push("#pop", "quasiquoted-list")}, + Include("datum*"), + }, + "quasiquoted-list": { + Include("list"), + {`(?!\Z)`, Text, Push("quasiquoted-datum")}, + }, + "quoted-datum": { + Include("datum"), + {`[([{]`, Punctuation, Push("#pop", "quoted-list")}, + Include("datum*"), + }, + "quoted-list": { + Include("list"), + {`(?!\Z)`, Text, Push("quoted-datum")}, + }, + "block-comment": { + {`#\|`, CommentMultiline, Push()}, + {`\|#`, CommentMultiline, Pop(1)}, + {`[^#|]+|.`, CommentMultiline, nil}, + }, + "string": { + {`"`, LiteralStringDouble, Pop(1)}, + {`(?s)\\([0-7]{1,3}|x[\da-fA-F]{1,2}|u[\da-fA-F]{1,4}|U[\da-fA-F]{1,8}|.)`, LiteralStringEscape, nil}, + {`[^\\"]+`, LiteralStringDouble, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/ragel.go b/vendor/github.com/alecthomas/chroma/lexers/ragel.go new file mode 100644 index 0000000..d7e69aa --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/ragel.go @@ -0,0 +1,75 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Ragel lexer. +var Ragel = Register(MustNewLexer( + &Config{ + Name: "Ragel", + Aliases: []string{"ragel"}, + Filenames: []string{}, + MimeTypes: []string{}, + }, + Rules{ + "whitespace": { + {`\s+`, TextWhitespace, nil}, + }, + "comments": { + {`\#.*$`, Comment, nil}, + }, + "keywords": { + {`(access|action|alphtype)\b`, Keyword, nil}, + {`(getkey|write|machine|include)\b`, Keyword, nil}, + {`(any|ascii|extend|alpha|digit|alnum|lower|upper)\b`, Keyword, nil}, + {`(xdigit|cntrl|graph|print|punct|space|zlen|empty)\b`, Keyword, nil}, + }, + "numbers": { + {`0x[0-9A-Fa-f]+`, LiteralNumberHex, nil}, + {`[+-]?[0-9]+`, LiteralNumberInteger, nil}, + }, + "literals": { + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralString, nil}, + {`\[(\\\\|\\\]|[^\]])*\]`, LiteralString, nil}, + {`/(?!\*)(\\\\|\\/|[^/])*/`, LiteralStringRegex, nil}, + }, + "identifiers": { + {`[a-zA-Z_]\w*`, NameVariable, nil}, + }, + "operators": { + {`,`, Operator, nil}, + {`\||&|--?`, Operator, nil}, + {`\.|<:|:>>?`, Operator, nil}, + {`:`, Operator, nil}, + {`->`, Operator, nil}, + {`(>|\$|%|<|@|<>)(/|eof\b)`, Operator, nil}, + {`(>|\$|%|<|@|<>)(!|err\b)`, Operator, nil}, + {`(>|\$|%|<|@|<>)(\^|lerr\b)`, Operator, nil}, + {`(>|\$|%|<|@|<>)(~|to\b)`, Operator, nil}, + {`(>|\$|%|<|@|<>)(\*|from\b)`, Operator, nil}, + {`>|@|\$|%`, Operator, nil}, + {`\*|\?|\+|\{[0-9]*,[0-9]*\}`, Operator, nil}, + {`!|\^`, Operator, nil}, + {`\(|\)`, Operator, nil}, + }, + "root": { + Include("literals"), + Include("whitespace"), + Include("comments"), + Include("keywords"), + Include("numbers"), + Include("identifiers"), + Include("operators"), + {`\{`, Punctuation, Push("host")}, + {`=`, Operator, nil}, + {`;`, Punctuation, nil}, + }, + "host": { + {`([^{}\'"/#]+|[^\\]\\[{}]|"(\\\\|\\"|[^"])*"|'(\\\\|\\'|[^'])*'|//.*$\n?|/\*(.|\n)*?\*/|\#.*$\n?|/(?!\*)(\\\\|\\/|[^/])*/|/)+`, Other, nil}, + {`\{`, Punctuation, Push()}, + {`\}`, Punctuation, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/regedit.go b/vendor/github.com/alecthomas/chroma/lexers/regedit.go new file mode 100644 index 0000000..d1c0372 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/regedit.go @@ -0,0 +1,31 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Reg lexer. +var Reg = Register(MustNewLexer( + &Config{ + Name: "reg", + Aliases: []string{"registry"}, + Filenames: []string{"*.reg"}, + MimeTypes: []string{"text/x-windows-registry"}, + }, + Rules{ + "root": { + {`Windows Registry Editor.*`, Text, nil}, + {`\s+`, Text, nil}, + {`[;#].*`, CommentSingle, nil}, + {`(\[)(-?)(HKEY_[A-Z_]+)(.*?\])$`, ByGroups(Keyword, Operator, NameBuiltin, Keyword), nil}, + {`("(?:\\"|\\\\|[^"])+")([ \t]*)(=)([ \t]*)`, ByGroups(NameAttribute, Text, Operator, Text), Push("value")}, + {`(.*?)([ \t]*)(=)([ \t]*)`, ByGroups(NameAttribute, Text, Operator, Text), Push("value")}, + }, + "value": { + {`-`, Operator, Pop(1)}, + {`(dword|hex(?:\([0-9a-fA-F]\))?)(:)([0-9a-fA-F,]+)`, ByGroups(NameVariable, Punctuation, LiteralNumber), Pop(1)}, + {`.+`, LiteralString, Pop(1)}, + Default(Pop(1)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/rexx.go b/vendor/github.com/alecthomas/chroma/lexers/rexx.go new file mode 100644 index 0000000..e3fc03b --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/rexx.go @@ -0,0 +1,58 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Rexx lexer. +var Rexx = Register(MustNewLexer( + &Config{ + Name: "Rexx", + Aliases: []string{"rexx", "arexx"}, + Filenames: []string{"*.rexx", "*.rex", "*.rx", "*.arexx"}, + MimeTypes: []string{"text/x-rexx"}, + NotMultiline: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\s`, TextWhitespace, nil}, + {`/\*`, CommentMultiline, Push("comment")}, + {`"`, LiteralString, Push("string_double")}, + {`'`, LiteralString, Push("string_single")}, + {`[0-9]+(\.[0-9]+)?(e[+-]?[0-9])?`, LiteralNumber, nil}, + {`([a-z_]\w*)(\s*)(:)(\s*)(procedure)\b`, ByGroups(NameFunction, TextWhitespace, Operator, TextWhitespace, KeywordDeclaration), nil}, + {`([a-z_]\w*)(\s*)(:)`, ByGroups(NameLabel, TextWhitespace, Operator), nil}, + Include("function"), + Include("keyword"), + Include("operator"), + {`[a-z_]\w*`, Text, nil}, + }, + "function": { + {Words(``, `(\s*)(\()`, `abbrev`, `abs`, `address`, `arg`, `b2x`, `bitand`, `bitor`, `bitxor`, `c2d`, `c2x`, `center`, `charin`, `charout`, `chars`, `compare`, `condition`, `copies`, `d2c`, `d2x`, `datatype`, `date`, `delstr`, `delword`, `digits`, `errortext`, `form`, `format`, `fuzz`, `insert`, `lastpos`, `left`, `length`, `linein`, `lineout`, `lines`, `max`, `min`, `overlay`, `pos`, `queued`, `random`, `reverse`, `right`, `sign`, `sourceline`, `space`, `stream`, `strip`, `substr`, `subword`, `symbol`, `time`, `trace`, `translate`, `trunc`, `value`, `verify`, `word`, `wordindex`, `wordlength`, `wordpos`, `words`, `x2b`, `x2c`, `x2d`, `xrange`), ByGroups(NameBuiltin, TextWhitespace, Operator), nil}, + }, + "keyword": { + {`(address|arg|by|call|do|drop|else|end|exit|for|forever|if|interpret|iterate|leave|nop|numeric|off|on|options|parse|pull|push|queue|return|say|select|signal|to|then|trace|until|while)\b`, KeywordReserved, nil}, + }, + "operator": { + {`(-|//|/|\(|\)|\*\*|\*|\\<<|\\<|\\==|\\=|\\>>|\\>|\\|\|\||\||&&|&|%|\+|<<=|<<|<=|<>|<|==|=|><|>=|>>=|>>|>|¬<<|¬<|¬==|¬=|¬>>|¬>|¬|\.|,)`, Operator, nil}, + }, + "string_double": { + {`[^"\n]+`, LiteralString, nil}, + {`""`, LiteralString, nil}, + {`"`, LiteralString, Pop(1)}, + {`\n`, Text, Pop(1)}, + }, + "string_single": { + {`[^\'\n]`, LiteralString, nil}, + {`\'\'`, LiteralString, nil}, + {`\'`, LiteralString, Pop(1)}, + {`\n`, Text, Pop(1)}, + }, + "comment": { + {`[^*]+`, CommentMultiline, nil}, + {`\*/`, CommentMultiline, Pop(1)}, + {`\*`, CommentMultiline, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/rst.go b/vendor/github.com/alecthomas/chroma/lexers/rst.go new file mode 100644 index 0000000..c67eda9 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/rst.go @@ -0,0 +1,85 @@ +package lexers + +import ( + "strings" + + . "github.com/alecthomas/chroma" // nolint +) + +// Restructuredtext lexer. +var Restructuredtext = Register(MustNewLexer( + &Config{ + Name: "reStructuredText", + Aliases: []string{"rst", "rest", "restructuredtext"}, + Filenames: []string{"*.rst", "*.rest"}, + MimeTypes: []string{"text/x-rst", "text/prs.fallenstein.rst"}, + }, + Rules{ + "root": { + {"^(=+|-+|`+|:+|\\.+|\\'+|\"+|~+|\\^+|_+|\\*+|\\++|#+)([ \\t]*\\n)(.+)(\\n)(\\1)(\\n)", ByGroups(GenericHeading, Text, GenericHeading, Text, GenericHeading, Text), nil}, + {"^(\\S.*)(\\n)(={3,}|-{3,}|`{3,}|:{3,}|\\.{3,}|\\'{3,}|\"{3,}|~{3,}|\\^{3,}|_{3,}|\\*{3,}|\\+{3,}|#{3,})(\\n)", ByGroups(GenericHeading, Text, GenericHeading, Text), nil}, + {`^(\s*)([-*+])( .+\n(?:\1 .+\n)*)`, ByGroups(Text, LiteralNumber, UsingSelf("inline")), nil}, + {`^(\s*)([0-9#ivxlcmIVXLCM]+\.)( .+\n(?:\1 .+\n)*)`, ByGroups(Text, LiteralNumber, UsingSelf("inline")), nil}, + {`^(\s*)(\(?[0-9#ivxlcmIVXLCM]+\))( .+\n(?:\1 .+\n)*)`, ByGroups(Text, LiteralNumber, UsingSelf("inline")), nil}, + {`^(\s*)([A-Z]+\.)( .+\n(?:\1 .+\n)+)`, ByGroups(Text, LiteralNumber, UsingSelf("inline")), nil}, + {`^(\s*)(\(?[A-Za-z]+\))( .+\n(?:\1 .+\n)+)`, ByGroups(Text, LiteralNumber, UsingSelf("inline")), nil}, + {`^(\s*)(\|)( .+\n(?:\| .+\n)*)`, ByGroups(Text, Operator, UsingSelf("inline")), nil}, + {`^( *\.\.)(\s*)((?:source)?code(?:-block)?)(::)([ \t]*)([^\n]+)(\n[ \t]*\n)([ \t]+)(.*)(\n)((?:(?:\8.*|)\n)+)`, EmitterFunc(rstCodeBlock), nil}, + {`^( *\.\.)(\s*)([\w:-]+?)(::)(?:([ \t]*)(.*))`, ByGroups(Punctuation, Text, OperatorWord, Punctuation, Text, UsingSelf("inline")), nil}, + {`^( *\.\.)(\s*)(_(?:[^:\\]|\\.)+:)(.*?)$`, ByGroups(Punctuation, Text, NameTag, UsingSelf("inline")), nil}, + {`^( *\.\.)(\s*)(\[.+\])(.*?)$`, ByGroups(Punctuation, Text, NameTag, UsingSelf("inline")), nil}, + {`^( *\.\.)(\s*)(\|.+\|)(\s*)([\w:-]+?)(::)(?:([ \t]*)(.*))`, ByGroups(Punctuation, Text, NameTag, Text, OperatorWord, Punctuation, Text, UsingSelf("inline")), nil}, + {`^ *\.\..*(\n( +.*\n|\n)+)?`, CommentPreproc, nil}, + {`^( *)(:[a-zA-Z-]+:)(\s*)$`, ByGroups(Text, NameClass, Text), nil}, + {`^( *)(:.*?:)([ \t]+)(.*?)$`, ByGroups(Text, NameClass, Text, NameFunction), nil}, + {`^(\S.*(?)(`__?)", ByGroups(LiteralString, LiteralStringInterpol, LiteralString), nil}, + {"`.+?`__?", LiteralString, nil}, + {"(`.+?`)(:[a-zA-Z0-9:-]+?:)?", ByGroups(NameVariable, NameAttribute), nil}, + {"(:[a-zA-Z0-9:-]+?:)(`.+?`)", ByGroups(NameAttribute, NameVariable), nil}, + {`\*\*.+?\*\*`, GenericStrong, nil}, + {`\*.+?\*`, GenericEmph, nil}, + {`\[.*?\]_`, LiteralString, nil}, + {`<.+?>`, NameTag, nil}, + {"[^\\\\\\n\\[*`:]+", Text, nil}, + {`.`, Text, nil}, + }, + "literal": { + {"[^`]+", LiteralString, nil}, + {"``((?=$)|(?=[-/:.,; \\n\\x00\\\u2010\\\u2011\\\u2012\\\u2013\\\u2014\\\u00a0\\'\\\"\\)\\]\\}\\>\\\u2019\\\u201d\\\u00bb\\!\\?]))", LiteralString, Pop(1)}, + {"`", LiteralString, nil}, + }, + }, +)) + +func rstCodeBlock(groups []string, lexer Lexer) Iterator { + iterators := []Iterator{} + tokens := []*Token{ + {Punctuation, groups[1]}, + {Text, groups[2]}, + {OperatorWord, groups[3]}, + {Punctuation, groups[4]}, + {Text, groups[5]}, + {Keyword, groups[6]}, + {Text, groups[7]}, + } + code := strings.Join(groups[8:], "") + lexer = Get(groups[6]) + if lexer == nil { + tokens = append(tokens, &Token{String, code}) + iterators = append(iterators, Literator(tokens...)) + } else { + sub, err := lexer.Tokenise(nil, code) + if err != nil { + panic(err) + } + iterators = append(iterators, Literator(tokens...), sub) + } + return Concaterator(iterators...) +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/ruby.go b/vendor/github.com/alecthomas/chroma/lexers/ruby.go new file mode 100644 index 0000000..56455be --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/ruby.go @@ -0,0 +1,249 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Ruby lexer. +var Ruby = Register(MustNewLexer( + &Config{ + Name: "Ruby", + Aliases: []string{"rb", "ruby", "duby"}, + Filenames: []string{"*.rb", "*.rbw", "Rakefile", "*.rake", "*.gemspec", "*.rbx", "*.duby", "Gemfile"}, + MimeTypes: []string{"text/x-ruby", "application/x-ruby"}, + DotAll: true, + }, + Rules{ + "root": { + {`\A#!.+?$`, CommentHashbang, nil}, + {`#.*?$`, CommentSingle, nil}, + {`=begin\s.*?\n=end.*?$`, CommentMultiline, nil}, + {Words(``, `\b`, `BEGIN`, `END`, `alias`, `begin`, `break`, `case`, `defined?`, `do`, `else`, `elsif`, `end`, `ensure`, `for`, `if`, `in`, `next`, `redo`, `rescue`, `raise`, `retry`, `return`, `super`, `then`, `undef`, `unless`, `until`, `when`, `while`, `yield`), Keyword, nil}, + {`(module)(\s+)([a-zA-Z_]\w*(?:::[a-zA-Z_]\w*)*)`, ByGroups(Keyword, Text, NameNamespace), nil}, + {`(def)(\s+)`, ByGroups(Keyword, Text), Push("funcname")}, + {"def(?=[*%&^`~+-/\\[<>=])", Keyword, Push("funcname")}, + {`(class)(\s+)`, ByGroups(Keyword, Text), Push("classname")}, + {Words(``, `\b`, `initialize`, `new`, `loop`, `include`, `extend`, `raise`, `attr_reader`, `attr_writer`, `attr_accessor`, `attr`, `catch`, `throw`, `private`, `module_function`, `public`, `protected`, `true`, `false`, `nil`), KeywordPseudo, nil}, + {`(not|and|or)\b`, OperatorWord, nil}, + {Words(``, `\?`, `autoload`, `block_given`, `const_defined`, `eql`, `equal`, `frozen`, `include`, `instance_of`, `is_a`, `iterator`, `kind_of`, `method_defined`, `nil`, `private_method_defined`, `protected_method_defined`, `public_method_defined`, `respond_to`, `tainted`), NameBuiltin, nil}, + {`(chomp|chop|exit|gsub|sub)!`, NameBuiltin, nil}, + {Words(`(?~!:])|(?<=(?:\s|;)when\s)|(?<=(?:\s|;)or\s)|(?<=(?:\s|;)and\s)|(?<=\.index\s)|(?<=\.scan\s)|(?<=\.sub\s)|(?<=\.sub!\s)|(?<=\.gsub\s)|(?<=\.gsub!\s)|(?<=\.match\s)|(?<=(?:\s|;)if\s)|(?<=(?:\s|;)elsif\s)|(?<=^when\s)|(?<=^index\s)|(?<=^scan\s)|(?<=^sub\s)|(?<=^gsub\s)|(?<=^sub!\s)|(?<=^gsub!\s)|(?<=^match\s)|(?<=^if\s)|(?<=^elsif\s))(\s*)(/)`, ByGroups(Text, LiteralStringRegex), Push("multiline-regex")}, + {`(?<=\(|,|\[)/`, LiteralStringRegex, Push("multiline-regex")}, + {`(\s+)(/)(?![\s=])`, ByGroups(Text, LiteralStringRegex), Push("multiline-regex")}, + {`(0_?[0-7]+(?:_[0-7]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberOct, Text, Operator), nil}, + {`(0x[0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberHex, Text, Operator), nil}, + {`(0b[01]+(?:_[01]+)*)(\s*)([/?])?`, ByGroups(LiteralNumberBin, Text, Operator), nil}, + {`([\d]+(?:_\d+)*)(\s*)([/?])?`, ByGroups(LiteralNumberInteger, Text, Operator), nil}, + {`@@[a-zA-Z_]\w*`, NameVariableClass, nil}, + {`@[a-zA-Z_]\w*`, NameVariableInstance, nil}, + {`\$\w+`, NameVariableGlobal, nil}, + {"\\$[!@&`\\'+~=/\\\\,;.<>_*$?:\"^-]", NameVariableGlobal, nil}, + {`\$-[0adFiIlpvw]`, NameVariableGlobal, nil}, + {`::`, Operator, nil}, + Include("strings"), + {`\?(\\[MC]-)*(\\([\\abefnrstv#"\']|x[a-fA-F0-9]{1,2}|[0-7]{1,3})|\S)(?!\w)`, LiteralStringChar, nil}, + {`[A-Z]\w+`, NameConstant, nil}, + {Words(`(\.|::)`, ``, `*`, `**`, `-`, `+`, `-@`, `+@`, `/`, `%`, `&`, `|`, `^`, "`", `~`, `[]`, `[]=`, `<<`, `>>`, `<`, `<>`, `<=>`, `>`, `>=`, `==`, `===`), ByGroups(Operator, NameOperator), nil}, + {"(\\.|::)([a-zA-Z_]\\w*[!?]?|[*%&^`~+\\-/\\[<>=])", ByGroups(Operator, Name), nil}, + {`[a-zA-Z_]\w*[!?]?`, Name, nil}, + {`(\[|\]|\*\*|<>?|>=|<=|<=>|=~|={3}|!~|&&?|\|\||\.{1,3})`, Operator, nil}, + {`[-+/*%=<>&!^|~]=?`, Operator, nil}, + {`[(){};,/?:\\]`, Punctuation, nil}, + {`\s+`, Text, nil}, + }, + "funcname": { + {`\(`, Punctuation, Push("defexpr")}, + {"(?:([a-zA-Z_]\\w*)(\\.))?([a-zA-Z_]\\w*[!?]?|\\*\\*?|[-+]@?|[/%&|^`~]|\\[\\]=?|<<|>>|<=?>|>=?|===?)", ByGroups(NameClass, Operator, NameFunction), Pop(1)}, + Default(Pop(1)), + }, + "classname": { + {`\(`, Punctuation, Push("defexpr")}, + {`<<`, Operator, Pop(1)}, + {`[A-Z_]\w*`, NameClass, Pop(1)}, + Default(Pop(1)), + }, + "defexpr": { + {`(\))(\.|::)?`, ByGroups(Punctuation, Operator), Pop(1)}, + {`\(`, Operator, Push()}, + Include("root"), + }, + "in-intp": { + {`\{`, LiteralStringInterpol, Push()}, + {`\}`, LiteralStringInterpol, Pop(1)}, + Include("root"), + }, + "string-intp": { + {`#\{`, LiteralStringInterpol, Push("in-intp")}, + {`#@@?[a-zA-Z_]\w*`, LiteralStringInterpol, nil}, + {`#\$[a-zA-Z_]\w*`, LiteralStringInterpol, nil}, + }, + "string-intp-escaped": { + Include("string-intp"), + {`\\([\\abefnrstv#"\']|x[a-fA-F0-9]{1,2}|[0-7]{1,3})`, LiteralStringEscape, nil}, + }, + "interpolated-regex": { + Include("string-intp"), + {`[\\#]`, LiteralStringRegex, nil}, + {`[^\\#]+`, LiteralStringRegex, nil}, + }, + "interpolated-string": { + Include("string-intp"), + {`[\\#]`, LiteralStringOther, nil}, + {`[^\\#]+`, LiteralStringOther, nil}, + }, + "multiline-regex": { + Include("string-intp"), + {`\\\\`, LiteralStringRegex, nil}, + {`\\/`, LiteralStringRegex, nil}, + {`[\\#]`, LiteralStringRegex, nil}, + {`[^\\/#]+`, LiteralStringRegex, nil}, + {`/[mixounse]*`, LiteralStringRegex, Pop(1)}, + }, + "end-part": { + {`.+`, CommentPreproc, Pop(1)}, + }, + "strings": { + {`\:@{0,2}[a-zA-Z_]\w*[!?]?`, LiteralStringSymbol, nil}, + {Words(`\:@{0,2}`, ``, `*`, `**`, `-`, `+`, `-@`, `+@`, `/`, `%`, `&`, `|`, `^`, "`", `~`, `[]`, `[]=`, `<<`, `>>`, `<`, `<>`, `<=>`, `>`, `>=`, `==`, `===`), LiteralStringSymbol, nil}, + {`:'(\\\\|\\'|[^'])*'`, LiteralStringSymbol, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`:"`, LiteralStringSymbol, Push("simple-sym")}, + {`([a-zA-Z_]\w*)(:)(?!:)`, ByGroups(LiteralStringSymbol, Punctuation), nil}, + {`"`, LiteralStringDouble, Push("simple-string")}, + {"(?&!^|~,(])(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)`, ByGroups(Text, LiteralStringOther, None), nil}, + {`^(\s*)(%([\t ])(?:(?:\\\3|(?!\3).)*)\3)`, ByGroups(Text, LiteralStringOther, None), nil}, + {`(%([^a-zA-Z0-9\s]))((?:\\\2|(?!\2).)*)(\2)`, String, nil}, + }, + "simple-string": { + Include("string-intp-escaped"), + {`[^\\"#]+`, LiteralStringDouble, nil}, + {`[\\#]`, LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Pop(1)}, + }, + "simple-sym": { + Include("string-intp-escaped"), + {`[^\\"#]+`, LiteralStringSymbol, nil}, + {`[\\#]`, LiteralStringSymbol, nil}, + {`"`, LiteralStringSymbol, Pop(1)}, + }, + "simple-backtick": { + Include("string-intp-escaped"), + {"[^\\\\`#]+", LiteralStringBacktick, nil}, + {`[\\#]`, LiteralStringBacktick, nil}, + {"`", LiteralStringBacktick, Pop(1)}, + }, + "cb-intp-string": { + {`\\[\\{}]`, LiteralStringOther, nil}, + {`\{`, LiteralStringOther, Push()}, + {`\}`, LiteralStringOther, Pop(1)}, + Include("string-intp-escaped"), + {`[\\#{}]`, LiteralStringOther, nil}, + {`[^\\#{}]+`, LiteralStringOther, nil}, + }, + "cb-string": { + {`\\[\\{}]`, LiteralStringOther, nil}, + {`\{`, LiteralStringOther, Push()}, + {`\}`, LiteralStringOther, Pop(1)}, + {`[\\#{}]`, LiteralStringOther, nil}, + {`[^\\#{}]+`, LiteralStringOther, nil}, + }, + "cb-regex": { + {`\\[\\{}]`, LiteralStringRegex, nil}, + {`\{`, LiteralStringRegex, Push()}, + {`\}[mixounse]*`, LiteralStringRegex, Pop(1)}, + Include("string-intp"), + {`[\\#{}]`, LiteralStringRegex, nil}, + {`[^\\#{}]+`, LiteralStringRegex, nil}, + }, + "sb-intp-string": { + {`\\[\\\[\]]`, LiteralStringOther, nil}, + {`\[`, LiteralStringOther, Push()}, + {`\]`, LiteralStringOther, Pop(1)}, + Include("string-intp-escaped"), + {`[\\#\[\]]`, LiteralStringOther, nil}, + {`[^\\#\[\]]+`, LiteralStringOther, nil}, + }, + "sb-string": { + {`\\[\\\[\]]`, LiteralStringOther, nil}, + {`\[`, LiteralStringOther, Push()}, + {`\]`, LiteralStringOther, Pop(1)}, + {`[\\#\[\]]`, LiteralStringOther, nil}, + {`[^\\#\[\]]+`, LiteralStringOther, nil}, + }, + "sb-regex": { + {`\\[\\\[\]]`, LiteralStringRegex, nil}, + {`\[`, LiteralStringRegex, Push()}, + {`\][mixounse]*`, LiteralStringRegex, Pop(1)}, + Include("string-intp"), + {`[\\#\[\]]`, LiteralStringRegex, nil}, + {`[^\\#\[\]]+`, LiteralStringRegex, nil}, + }, + "pa-intp-string": { + {`\\[\\()]`, LiteralStringOther, nil}, + {`\(`, LiteralStringOther, Push()}, + {`\)`, LiteralStringOther, Pop(1)}, + Include("string-intp-escaped"), + {`[\\#()]`, LiteralStringOther, nil}, + {`[^\\#()]+`, LiteralStringOther, nil}, + }, + "pa-string": { + {`\\[\\()]`, LiteralStringOther, nil}, + {`\(`, LiteralStringOther, Push()}, + {`\)`, LiteralStringOther, Pop(1)}, + {`[\\#()]`, LiteralStringOther, nil}, + {`[^\\#()]+`, LiteralStringOther, nil}, + }, + "pa-regex": { + {`\\[\\()]`, LiteralStringRegex, nil}, + {`\(`, LiteralStringRegex, Push()}, + {`\)[mixounse]*`, LiteralStringRegex, Pop(1)}, + Include("string-intp"), + {`[\\#()]`, LiteralStringRegex, nil}, + {`[^\\#()]+`, LiteralStringRegex, nil}, + }, + "ab-intp-string": { + {`\\[\\<>]`, LiteralStringOther, nil}, + {`<`, LiteralStringOther, Push()}, + {`>`, LiteralStringOther, Pop(1)}, + Include("string-intp-escaped"), + {`[\\#<>]`, LiteralStringOther, nil}, + {`[^\\#<>]+`, LiteralStringOther, nil}, + }, + "ab-string": { + {`\\[\\<>]`, LiteralStringOther, nil}, + {`<`, LiteralStringOther, Push()}, + {`>`, LiteralStringOther, Pop(1)}, + {`[\\#<>]`, LiteralStringOther, nil}, + {`[^\\#<>]+`, LiteralStringOther, nil}, + }, + "ab-regex": { + {`\\[\\<>]`, LiteralStringRegex, nil}, + {`<`, LiteralStringRegex, Push()}, + {`>[mixounse]*`, LiteralStringRegex, Pop(1)}, + Include("string-intp"), + {`[\\#<>]`, LiteralStringRegex, nil}, + {`[^\\#<>]+`, LiteralStringRegex, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/rust.go b/vendor/github.com/alecthomas/chroma/lexers/rust.go new file mode 100644 index 0000000..d77c70e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/rust.go @@ -0,0 +1,132 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Rust lexer. +var Rust = Register(MustNewLexer( + &Config{ + Name: "Rust", + Aliases: []string{"rust"}, + Filenames: []string{"*.rs", "*.rs.in"}, + MimeTypes: []string{"text/rust"}, + }, + Rules{ + "root": { + {`#![^[\r\n].*$`, CommentPreproc, nil}, + Default(Push("base")), + }, + "base": { + {`\n`, TextWhitespace, nil}, + {`\s+`, TextWhitespace, nil}, + {`//!.*?\n`, LiteralStringDoc, nil}, + {`///(\n|[^/].*?\n)`, LiteralStringDoc, nil}, + {`//(.*?)\n`, CommentSingle, nil}, + {`/\*\*(\n|[^/*])`, LiteralStringDoc, Push("doccomment")}, + {`/\*!`, LiteralStringDoc, Push("doccomment")}, + {`/\*`, CommentMultiline, Push("comment")}, + {`\$([a-zA-Z_]\w*|\(,?|\),?|,?)`, CommentPreproc, nil}, + {Words(``, `\b`, `as`, `box`, `const`, `crate`, `else`, `extern`, `for`, `if`, `impl`, `in`, `loop`, `match`, `move`, `mut`, `pub`, `ref`, `return`, `static`, `super`, `trait`, `unsafe`, `use`, `where`, `while`), Keyword, nil}, + {Words(``, `\b`, `abstract`, `alignof`, `become`, `do`, `final`, `macro`, `offsetof`, `override`, `priv`, `proc`, `pure`, `sizeof`, `typeof`, `unsized`, `virtual`, `yield`), KeywordReserved, nil}, + {`(true|false)\b`, KeywordConstant, nil}, + {`mod\b`, Keyword, Push("modname")}, + {`let\b`, KeywordDeclaration, nil}, + {`fn\b`, Keyword, Push("funcname")}, + {`(struct|enum|type|union)\b`, Keyword, Push("typename")}, + {`(default)(\s+)(type|fn)\b`, ByGroups(Keyword, Text, Keyword), nil}, + {Words(``, `\b`, `u8`, `u16`, `u32`, `u64`, `i8`, `i16`, `i32`, `i64`, `usize`, `isize`, `f32`, `f64`, `str`, `bool`), KeywordType, nil}, + {`self\b`, NameBuiltinPseudo, nil}, + {Words(``, `\b`, `Copy`, `Send`, `Sized`, `Sync`, `Drop`, `Fn`, `FnMut`, `FnOnce`, `Box`, `ToOwned`, `Clone`, `PartialEq`, `PartialOrd`, `Eq`, `Ord`, `AsRef`, `AsMut`, `Into`, `From`, `Default`, `Iterator`, `Extend`, `IntoIterator`, `DoubleEndedIterator`, `ExactSizeIterator`, `Option`, `Some`, `None`, `Result`, `Ok`, `Err`, `SliceConcatExt`, `String`, `ToString`, `Vec`), NameBuiltin, nil}, + {`::\b`, Text, nil}, + {`(?::|->)`, Text, Push("typename")}, + {`(break|continue)(\s*)(\'[A-Za-z_]\w*)?`, ByGroups(Keyword, TextWhitespace, NameLabel), nil}, + {`'(\\['"\\nrt]|\\x[0-7][0-9a-fA-F]|\\0|\\u\{[0-9a-fA-F]{1,6}\}|.)'`, LiteralStringChar, nil}, + {`b'(\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\0|\\u\{[0-9a-fA-F]{1,6}\}|.)'`, LiteralStringChar, nil}, + {`0b[01_]+`, LiteralNumberBin, Push("number_lit")}, + {`0o[0-7_]+`, LiteralNumberOct, Push("number_lit")}, + {`0[xX][0-9a-fA-F_]+`, LiteralNumberHex, Push("number_lit")}, + {`[0-9][0-9_]*(\.[0-9_]+[eE][+\-]?[0-9_]+|\.[0-9_]*(?!\.)|[eE][+\-]?[0-9_]+)`, LiteralNumberFloat, Push("number_lit")}, + {`[0-9][0-9_]*`, LiteralNumberInteger, Push("number_lit")}, + {`b"`, LiteralString, Push("bytestring")}, + {`"`, LiteralString, Push("string")}, + {`b?r(#*)".*?"\1`, LiteralString, nil}, + {`'static`, NameBuiltin, nil}, + {`'[a-zA-Z_]\w*`, NameAttribute, nil}, + {`[{}()\[\],.;]`, Punctuation, nil}, + {`[+\-*/%&|<>^!~@=:?]`, Operator, nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + {`#!?\[`, CommentPreproc, Push("attribute[")}, + {`([A-Za-z_]\w*)(!)(\s*)([A-Za-z_]\w*)?(\s*)(\{)`, ByGroups(CommentPreproc, Punctuation, TextWhitespace, Name, TextWhitespace, Punctuation), Push("macro{")}, + {`([A-Za-z_]\w*)(!)(\s*)([A-Za-z_]\w*)?(\()`, ByGroups(CommentPreproc, Punctuation, TextWhitespace, Name, Punctuation), Push("macro(")}, + }, + "comment": { + {`[^*/]+`, CommentMultiline, nil}, + {`/\*`, CommentMultiline, Push()}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[*/]`, CommentMultiline, nil}, + }, + "doccomment": { + {`[^*/]+`, LiteralStringDoc, nil}, + {`/\*`, LiteralStringDoc, Push()}, + {`\*/`, LiteralStringDoc, Pop(1)}, + {`[*/]`, LiteralStringDoc, nil}, + }, + "modname": { + {`\s+`, Text, nil}, + {`[a-zA-Z_]\w*`, NameNamespace, Pop(1)}, + Default(Pop(1)), + }, + "funcname": { + {`\s+`, Text, nil}, + {`[a-zA-Z_]\w*`, NameFunction, Pop(1)}, + Default(Pop(1)), + }, + "typename": { + {`\s+`, Text, nil}, + {`&`, KeywordPseudo, nil}, + {Words(``, `\b`, `Copy`, `Send`, `Sized`, `Sync`, `Drop`, `Fn`, `FnMut`, `FnOnce`, `Box`, `ToOwned`, `Clone`, `PartialEq`, `PartialOrd`, `Eq`, `Ord`, `AsRef`, `AsMut`, `Into`, `From`, `Default`, `Iterator`, `Extend`, `IntoIterator`, `DoubleEndedIterator`, `ExactSizeIterator`, `Option`, `Some`, `None`, `Result`, `Ok`, `Err`, `SliceConcatExt`, `String`, `ToString`, `Vec`), NameBuiltin, nil}, + {Words(``, `\b`, `u8`, `u16`, `u32`, `u64`, `i8`, `i16`, `i32`, `i64`, `usize`, `isize`, `f32`, `f64`, `str`, `bool`), KeywordType, nil}, + {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + Default(Pop(1)), + }, + "number_lit": { + {`[ui](8|16|32|64|size)`, Keyword, Pop(1)}, + {`f(32|64)`, Keyword, Pop(1)}, + Default(Pop(1)), + }, + "string": { + {`"`, LiteralString, Pop(1)}, + {`\\['"\\nrt]|\\x[0-7][0-9a-fA-F]|\\0|\\u\{[0-9a-fA-F]{1,6}\}`, LiteralStringEscape, nil}, + {`[^\\"]+`, LiteralString, nil}, + {`\\`, LiteralString, nil}, + }, + "bytestring": { + {`\\x[89a-fA-F][0-9a-fA-F]`, LiteralStringEscape, nil}, + Include("string"), + }, + "macro{": { + {`\{`, Operator, Push()}, + {`\}`, Operator, Pop(1)}, + }, + "macro(": { + {`\(`, Operator, Push()}, + {`\)`, Operator, Pop(1)}, + }, + "attribute_common": { + {`"`, LiteralString, Push("string")}, + {`\[`, CommentPreproc, Push("attribute[")}, + {`\(`, CommentPreproc, Push("attribute(")}, + }, + "attribute[": { + Include("attribute_common"), + {`\];?`, CommentPreproc, Pop(1)}, + {`[^"\]]+`, CommentPreproc, nil}, + }, + "attribute(": { + Include("attribute_common"), + {`\);?`, CommentPreproc, Pop(1)}, + {`[^")]+`, CommentPreproc, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/sass.go b/vendor/github.com/alecthomas/chroma/lexers/sass.go new file mode 100644 index 0000000..9fa4283 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/sass.go @@ -0,0 +1,143 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Sass lexer. +var Sass = Register(MustNewLexer( + &Config{ + Name: "Sass", + Aliases: []string{"sass"}, + Filenames: []string{"*.sass"}, + MimeTypes: []string{"text/x-sass"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`[ \t]*\n`, Text, nil}, + // { `[ \t]*`, ?? ??, nil }, + }, + "content": { + // { `//[^\n]*`, ?? .callback at 0x10fcaf378> ??, Push("root") }, + // { `/\*[^\n]*`, ?? .callback at 0x10fcaf400> ??, Push("root") }, + {`@import`, Keyword, Push("import")}, + {`@for`, Keyword, Push("for")}, + {`@(debug|warn|if|while)`, Keyword, Push("value")}, + {`(@mixin)( [\w-]+)`, ByGroups(Keyword, NameFunction), Push("value")}, + {`(@include)( [\w-]+)`, ByGroups(Keyword, NameDecorator), Push("value")}, + {`@extend`, Keyword, Push("selector")}, + {`@[\w-]+`, Keyword, Push("selector")}, + {`=[\w-]+`, NameFunction, Push("value")}, + {`\+[\w-]+`, NameDecorator, Push("value")}, + {`([!$][\w-]\w*)([ \t]*(?:(?:\|\|)?=|:))`, ByGroups(NameVariable, Operator), Push("value")}, + {`:`, NameAttribute, Push("old-style-attr")}, + {`(?=.+?[=:]([^a-z]|$))`, NameAttribute, Push("new-style-attr")}, + Default(Push("selector")), + }, + "single-comment": { + {`.+`, CommentSingle, nil}, + {`\n`, Text, Push("root")}, + }, + "multi-comment": { + {`.+`, CommentMultiline, nil}, + {`\n`, Text, Push("root")}, + }, + "import": { + {`[ \t]+`, Text, nil}, + {`\S+`, LiteralString, nil}, + {`\n`, Text, Push("root")}, + }, + "old-style-attr": { + {`[^\s:="\[]+`, NameAttribute, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`[ \t]*=`, Operator, Push("value")}, + Default(Push("value")), + }, + "new-style-attr": { + {`[^\s:="\[]+`, NameAttribute, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`[ \t]*[=:]`, Operator, Push("value")}, + }, + "inline-comment": { + {`(\\#|#(?=[^\n{])|\*(?=[^\n/])|[^\n#*])+`, CommentMultiline, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`\*/`, Comment, Pop(1)}, + }, + "value": { + {`[ \t]+`, Text, nil}, + {`[!$][\w-]+`, NameVariable, nil}, + {`url\(`, LiteralStringOther, Push("string-url")}, + {`[a-z_-][\w-]*(?=\()`, NameFunction, nil}, + {Words(``, `\b`, `align-content`, `align-items`, `align-self`, `alignment-baseline`, `all`, `animation`, `animation-delay`, `animation-direction`, `animation-duration`, `animation-fill-mode`, `animation-iteration-count`, `animation-name`, `animation-play-state`, `animation-timing-function`, `appearance`, `azimuth`, `backface-visibility`, `background`, `background-attachment`, `background-blend-mode`, `background-clip`, `background-color`, `background-image`, `background-origin`, `background-position`, `background-repeat`, `background-size`, `baseline-shift`, `bookmark-label`, `bookmark-level`, `bookmark-state`, `border`, `border-bottom`, `border-bottom-color`, `border-bottom-left-radius`, `border-bottom-right-radius`, `border-bottom-style`, `border-bottom-width`, `border-boundary`, `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`, `bottom`, `box-decoration-break`, `box-shadow`, `box-sizing`, `box-snap`, `box-suppress`, `break-after`, `break-before`, `break-inside`, `caption-side`, `caret`, `caret-animation`, `caret-color`, `caret-shape`, `chains`, `clear`, `clip`, `clip-path`, `clip-rule`, `color`, `color-interpolation-filters`, `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`, `counter-set`, `crop`, `cue`, `cue-after`, `cue-before`, `cursor`, `direction`, `display`, `dominant-baseline`, `elevation`, `empty-cells`, `filter`, `flex`, `flex-basis`, `flex-direction`, `flex-flow`, `flex-grow`, `flex-shrink`, `flex-wrap`, `float`, `float-defer`, `float-offset`, `float-reference`, `flood-color`, `flood-opacity`, `flow`, `flow-from`, `flow-into`, `font`, `font-family`, `font-feature-settings`, `font-kerning`, `font-language-override`, `font-size`, `font-size-adjust`, `font-stretch`, `font-style`, `font-synthesis`, `font-variant`, `font-variant-alternates`, `font-variant-caps`, `font-variant-east-asian`, `font-variant-ligatures`, `font-variant-numeric`, `font-variant-position`, `font-weight`, `footnote-display`, `footnote-policy`, `glyph-orientation-vertical`, `grid`, `grid-area`, `grid-auto-columns`, `grid-auto-flow`, `grid-auto-rows`, `grid-column`, `grid-column-end`, `grid-column-gap`, `grid-column-start`, `grid-gap`, `grid-row`, `grid-row-end`, `grid-row-gap`, `grid-row-start`, `grid-template`, `grid-template-areas`, `grid-template-columns`, `grid-template-rows`, `hanging-punctuation`, `height`, `hyphenate-character`, `hyphenate-limit-chars`, `hyphenate-limit-last`, `hyphenate-limit-lines`, `hyphenate-limit-zone`, `hyphens`, `image-orientation`, `image-resolution`, `initial-letter`, `initial-letter-align`, `initial-letter-wrap`, `isolation`, `justify-content`, `justify-items`, `justify-self`, `left`, `letter-spacing`, `lighting-color`, `line-break`, `line-grid`, `line-height`, `line-snap`, `list-style`, `list-style-image`, `list-style-position`, `list-style-type`, `margin`, `margin-bottom`, `margin-left`, `margin-right`, `margin-top`, `marker-side`, `marquee-direction`, `marquee-loop`, `marquee-speed`, `marquee-style`, `mask`, `mask-border`, `mask-border-mode`, `mask-border-outset`, `mask-border-repeat`, `mask-border-slice`, `mask-border-source`, `mask-border-width`, `mask-clip`, `mask-composite`, `mask-image`, `mask-mode`, `mask-origin`, `mask-position`, `mask-repeat`, `mask-size`, `mask-type`, `max-height`, `max-lines`, `max-width`, `min-height`, `min-width`, `mix-blend-mode`, `motion`, `motion-offset`, `motion-path`, `motion-rotation`, `move-to`, `nav-down`, `nav-left`, `nav-right`, `nav-up`, `object-fit`, `object-position`, `offset-after`, `offset-before`, `offset-end`, `offset-start`, `opacity`, `order`, `orphans`, `outline`, `outline-color`, `outline-offset`, `outline-style`, `outline-width`, `overflow`, `overflow-style`, `overflow-wrap`, `overflow-x`, `overflow-y`, `padding`, `padding-bottom`, `padding-left`, `padding-right`, `padding-top`, `page`, `page-break-after`, `page-break-before`, `page-break-inside`, `page-policy`, `pause`, `pause-after`, `pause-before`, `perspective`, `perspective-origin`, `pitch`, `pitch-range`, `play-during`, `polar-angle`, `polar-distance`, `position`, `presentation-level`, `quotes`, `region-fragment`, `resize`, `rest`, `rest-after`, `rest-before`, `richness`, `right`, `rotation`, `rotation-point`, `ruby-align`, `ruby-merge`, `ruby-position`, `running`, `scroll-snap-coordinate`, `scroll-snap-destination`, `scroll-snap-points-x`, `scroll-snap-points-y`, `scroll-snap-type`, `shape-image-threshold`, `shape-inside`, `shape-margin`, `shape-outside`, `size`, `speak`, `speak-as`, `speak-header`, `speak-numeral`, `speak-punctuation`, `speech-rate`, `stress`, `string-set`, `tab-size`, `table-layout`, `text-align`, `text-align-last`, `text-combine-upright`, `text-decoration`, `text-decoration-color`, `text-decoration-line`, `text-decoration-skip`, `text-decoration-style`, `text-emphasis`, `text-emphasis-color`, `text-emphasis-position`, `text-emphasis-style`, `text-indent`, `text-justify`, `text-orientation`, `text-overflow`, `text-shadow`, `text-space-collapse`, `text-space-trim`, `text-spacing`, `text-transform`, `text-underline-position`, `text-wrap`, `top`, `transform`, `transform-origin`, `transform-style`, `transition`, `transition-delay`, `transition-duration`, `transition-property`, `transition-timing-function`, `unicode-bidi`, `user-select`, `vertical-align`, `visibility`, `voice-balance`, `voice-duration`, `voice-family`, `voice-pitch`, `voice-range`, `voice-rate`, `voice-stress`, `voice-volume`, `volume`, `white-space`, `widows`, `width`, `will-change`, `word-break`, `word-spacing`, `word-wrap`, `wrap-after`, `wrap-before`, `wrap-flow`, `wrap-inside`, `wrap-through`, `writing-mode`, `z-index`, `above`, `absolute`, `always`, `armenian`, `aural`, `auto`, `avoid`, `baseline`, `behind`, `below`, `bidi-override`, `blink`, `block`, `bold`, `bolder`, `both`, `capitalize`, `center-left`, `center-right`, `center`, `circle`, `cjk-ideographic`, `close-quote`, `collapse`, `condensed`, `continuous`, `crop`, `crosshair`, `cross`, `cursive`, `dashed`, `decimal-leading-zero`, `decimal`, `default`, `digits`, `disc`, `dotted`, `double`, `e-resize`, `embed`, `extra-condensed`, `extra-expanded`, `expanded`, `fantasy`, `far-left`, `far-right`, `faster`, `fast`, `fixed`, `georgian`, `groove`, `hebrew`, `help`, `hidden`, `hide`, `higher`, `high`, `hiragana-iroha`, `hiragana`, `icon`, `inherit`, `inline-table`, `inline`, `inset`, `inside`, `invert`, `italic`, `justify`, `katakana-iroha`, `katakana`, `landscape`, `larger`, `large`, `left-side`, `leftwards`, `level`, `lighter`, `line-through`, `list-item`, `loud`, `lower-alpha`, `lower-greek`, `lower-roman`, `lowercase`, `ltr`, `lower`, `low`, `medium`, `message-box`, `middle`, `mix`, `monospace`, `n-resize`, `narrower`, `ne-resize`, `no-close-quote`, `no-open-quote`, `no-repeat`, `none`, `normal`, `nowrap`, `nw-resize`, `oblique`, `once`, `open-quote`, `outset`, `outside`, `overline`, `pointer`, `portrait`, `px`, `relative`, `repeat-x`, `repeat-y`, `repeat`, `rgb`, `ridge`, `right-side`, `rightwards`, `s-resize`, `sans-serif`, `scroll`, `se-resize`, `semi-condensed`, `semi-expanded`, `separate`, `serif`, `show`, `silent`, `slow`, `slower`, `small-caps`, `small-caption`, `smaller`, `soft`, `solid`, `spell-out`, `square`, `static`, `status-bar`, `super`, `sw-resize`, `table-caption`, `table-cell`, `table-column`, `table-column-group`, `table-footer-group`, `table-header-group`, `table-row`, `table-row-group`, `text`, `text-bottom`, `text-top`, `thick`, `thin`, `transparent`, `ultra-condensed`, `ultra-expanded`, `underline`, `upper-alpha`, `upper-latin`, `upper-roman`, `uppercase`, `url`, `visible`, `w-resize`, `wait`, `wider`, `x-fast`, `x-high`, `x-large`, `x-loud`, `x-low`, `x-small`, `x-soft`, `xx-large`, `xx-small`, `yes`), NameConstant, nil}, + {Words(``, `\b`, `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`, `black`, `blanchedalmond`, `blue`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`, `chocolate`, `coral`, `cornflowerblue`, `cornsilk`, `crimson`, `cyan`, `darkblue`, `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkgrey`, `darkkhaki`, `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`, `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkslategrey`, `darkturquoise`, `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dimgrey`, `dodgerblue`, `firebrick`, `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`, `goldenrod`, `gray`, `green`, `greenyellow`, `grey`, `honeydew`, `hotpink`, `indianred`, `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`, `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrodyellow`, `lightgray`, `lightgreen`, `lightgrey`, `lightpink`, `lightsalmon`, `lightseagreen`, `lightskyblue`, `lightslategray`, `lightslategrey`, `lightsteelblue`, `lightyellow`, `lime`, `limegreen`, `linen`, `magenta`, `maroon`, `mediumaquamarine`, `mediumblue`, `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`, `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`, `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navy`, `oldlace`, `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`, `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`, `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `red`, `rosybrown`, `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`, `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `slategrey`, `snow`, `springgreen`, `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`, `wheat`, `white`, `whitesmoke`, `yellow`, `yellowgreen`, `transparent`), NameEntity, nil}, + {Words(``, `\b`, `black`, `silver`, `gray`, `white`, `maroon`, `red`, `purple`, `fuchsia`, `green`, `lime`, `olive`, `yellow`, `navy`, `blue`, `teal`, `aqua`), NameBuiltin, nil}, + {`\!(important|default)`, NameException, nil}, + {`(true|false)`, NamePseudo, nil}, + {`(and|or|not)`, OperatorWord, nil}, + {`/\*`, CommentMultiline, Push("inline-comment")}, + {`//[^\n]*`, CommentSingle, nil}, + {`\#[a-z0-9]{1,6}`, LiteralNumberHex, nil}, + {`(-?\d+)(\%|[a-z]+)?`, ByGroups(LiteralNumberInteger, KeywordType), nil}, + {`(-?\d*\.\d+)(\%|[a-z]+)?`, ByGroups(LiteralNumberFloat, KeywordType), nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`[~^*!&%<>|+=@:,./?-]+`, Operator, nil}, + {`[\[\]()]+`, Punctuation, nil}, + {`"`, LiteralStringDouble, Push("string-double")}, + {`'`, LiteralStringSingle, Push("string-single")}, + {`[a-z_-][\w-]*`, Name, nil}, + {`\n`, Text, Push("root")}, + }, + "interpolation": { + {`\}`, LiteralStringInterpol, Pop(1)}, + Include("value"), + }, + "selector": { + {`[ \t]+`, Text, nil}, + {`\:`, NameDecorator, Push("pseudo-class")}, + {`\.`, NameClass, Push("class")}, + {`\#`, NameNamespace, Push("id")}, + {`[\w-]+`, NameTag, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`&`, Keyword, nil}, + {`[~^*!&\[\]()<>|+=@:;,./?-]`, Operator, nil}, + {`"`, LiteralStringDouble, Push("string-double")}, + {`'`, LiteralStringSingle, Push("string-single")}, + {`\n`, Text, Push("root")}, + }, + "string-double": { + {`(\\.|#(?=[^\n{])|[^\n"#])+`, LiteralStringDouble, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`"`, LiteralStringDouble, Pop(1)}, + }, + "string-single": { + {`(\\.|#(?=[^\n{])|[^\n'#])+`, LiteralStringDouble, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`'`, LiteralStringDouble, Pop(1)}, + }, + "string-url": { + {`(\\#|#(?=[^\n{])|[^\n#)])+`, LiteralStringOther, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`\)`, LiteralStringOther, Pop(1)}, + }, + "pseudo-class": { + {`[\w-]+`, NameDecorator, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + Default(Pop(1)), + }, + "class": { + {`[\w-]+`, NameClass, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + Default(Pop(1)), + }, + "id": { + {`[\w-]+`, NameNamespace, nil}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + Default(Pop(1)), + }, + "for": { + {`(from|to|through)`, OperatorWord, nil}, + Include("value"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/scala.go b/vendor/github.com/alecthomas/chroma/lexers/scala.go new file mode 100644 index 0000000..c08a3f0 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/scala.go @@ -0,0 +1,102 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Scala lexer. +var Scala = Register(MustNewLexer( + &Config{ + Name: "Scala", + Aliases: []string{"scala"}, + Filenames: []string{"*.scala"}, + MimeTypes: []string{"text/x-scala"}, + DotAll: true, + }, + Rules{ + "root": { + {`(class|trait|object)(\s+)`, ByGroups(Keyword, Text), Push("class")}, + {`[^\S\n]+`, Text, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*`, CommentMultiline, Push("comment")}, + {`@[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ](?:[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ]|[0-9])*(?:(?<=_)[-~\^\*!%&\\<>\|+=:/?@¦-§©¬®°-±¶×÷϶҂؆-؈؎-؏۩۽-۾߶৺୰௳-௸௺౿ೱ-ೲ൹༁-༃༓-༗༚-༟༴༶༸྾-࿅࿇-࿏႞-႟፠᎐-᎙᥀᧠-᧿᭡-᭪᭴-᭼⁄⁒⁺-⁼₊-₌℀-℁℃-℆℈-℉℔№-℘℞-℣℥℧℩℮℺-℻⅀-⅄⅊-⅍⅏←-⌨⌫-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭔⳥-⳪⺀-⿻〄〒-〓〠〶-〷〾-〿㆐-㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫﬩﷽﹢﹤-﹦+<->|~¬¦│-○-�]+)?`, NameDecorator, nil}, + {`(abstract|ca(?:se|tch)|d(?:ef|o)|e(?:lse|xtends)|f(?:inal(?:ly)?|or(?:Some)?)|i(?:f|mplicit)|lazy|match|new|override|pr(?:ivate|otected)|re(?:quires|turn)|s(?:ealed|uper)|t(?:h(?:is|row)|ry)|va[lr]|w(?:hile|ith)|yield)\b|(<[%:-]|=>|>:|[#=@_⇒←])(\b|(?=\s)|$)`, Keyword, nil}, + {`:(?![-~\^\*!%&\\<>\|+=:/?@¦-§©¬®°-±¶×÷϶҂؆-؈؎-؏۩۽-۾߶৺୰௳-௸௺౿ೱ-ೲ൹༁-༃༓-༗༚-༟༴༶༸྾-࿅࿇-࿏႞-႟፠᎐-᎙᥀᧠-᧿᭡-᭪᭴-᭼⁄⁒⁺-⁼₊-₌℀-℁℃-℆℈-℉℔№-℘℞-℣℥℧℩℮℺-℻⅀-⅄⅊-⅍⅏←-⌨⌫-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭔⳥-⳪⺀-⿻〄〒-〓〠〶-〷〾-〿㆐-㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫﬩﷽﹢﹤-﹦+<->|~¬¦│-○-�]+)`, Keyword, Push("type")}, + {`[A-Z\$_À-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸ-ŹŻŽƁ-ƂƄƆ-ƇƉ-ƋƎ-ƑƓ-ƔƖ-ƘƜ-ƝƟ-ƠƢƤƦ-ƧƩƬƮ-ƯƱ-ƳƵƷ-ƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺ-ȻȽ-ȾɁɃ-ɆɈɊɌɎͰͲͶΆΈ-ΏΑ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹ-ϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀ-ӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԱ-ՖႠ-ჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙ-ὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾ-ℿⅅↃⰀ-ⰮⱠⱢ-ⱤⱧⱩⱫⱭ-ⱯⱲⱵⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽ-ꝾꞀꞂꞄꞆꞋA-Z][a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ](?:[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ]|[0-9])*(?:(?<=_)[-~\^\*!%&\\<>\|+=:/?@¦-§©¬®°-±¶×÷϶҂؆-؈؎-؏۩۽-۾߶৺୰௳-௸௺౿ೱ-ೲ൹༁-༃༓-༗༚-༟༴༶༸྾-࿅࿇-࿏႞-႟፠᎐-᎙᥀᧠-᧿᭡-᭪᭴-᭼⁄⁒⁺-⁼₊-₌℀-℁℃-℆℈-℉℔№-℘℞-℣℥℧℩℮℺-℻⅀-⅄⅊-⅍⅏←-⌨⌫-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭔⳥-⳪⺀-⿻〄〒-〓〠〶-〷〾-〿㆐-㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫﬩﷽﹢﹤-﹦+<->|~¬¦│-○-�]+)?\b`, NameClass, nil}, + {`(true|false|null)\b`, KeywordConstant, nil}, + {`(import|package)(\s+)`, ByGroups(Keyword, Text), Push("import")}, + {`(type)(\s+)`, ByGroups(Keyword, Text), Push("type")}, + {`""".*?"""(?!")`, LiteralString, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'`, LiteralStringChar, nil}, + {`'[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ](?:[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ]|[0-9])*(?:(?<=_)[-~\^\*!%&\\<>\|+=:/?@¦-§©¬®°-±¶×÷϶҂؆-؈؎-؏۩۽-۾߶৺୰௳-௸௺౿ೱ-ೲ൹༁-༃༓-༗༚-༟༴༶༸྾-࿅࿇-࿏႞-႟፠᎐-᎙᥀᧠-᧿᭡-᭪᭴-᭼⁄⁒⁺-⁼₊-₌℀-℁℃-℆℈-℉℔№-℘℞-℣℥℧℩℮℺-℻⅀-⅄⅊-⅍⅏←-⌨⌫-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭔⳥-⳪⺀-⿻〄〒-〓〠〶-〷〾-〿㆐-㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫﬩﷽﹢﹤-﹦+<->|~¬¦│-○-�]+)?`, TextSymbol, nil}, + {`[fs]"""`, LiteralString, Push("interptriplestring")}, + {`[fs]"`, LiteralString, Push("interpstring")}, + {`raw"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ](?:[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ]|[0-9])*(?:(?<=_)[-~\^\*!%&\\<>\|+=:/?@¦-§©¬®°-±¶×÷϶҂؆-؈؎-؏۩۽-۾߶৺୰௳-௸௺౿ೱ-ೲ൹༁-༃༓-༗༚-༟༴༶༸྾-࿅࿇-࿏႞-႟፠᎐-᎙᥀᧠-᧿᭡-᭪᭴-᭼⁄⁒⁺-⁼₊-₌℀-℁℃-℆℈-℉℔№-℘℞-℣℥℧℩℮℺-℻⅀-⅄⅊-⅍⅏←-⌨⌫-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭔⳥-⳪⺀-⿻〄〒-〓〠〶-〷〾-〿㆐-㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫﬩﷽﹢﹤-﹦+<->|~¬¦│-○-�]+)?`, Name, nil}, + {"`[^`]+`", Name, nil}, + {`\[`, Operator, Push("typeparam")}, + {`[(){};,.#]`, Operator, nil}, + {`[-~\^\*!%&\\<>\|+=:/?@¦-§©¬®°-±¶×÷϶҂؆-؈؎-؏۩۽-۾߶৺୰௳-௸௺౿ೱ-ೲ൹༁-༃༓-༗༚-༟༴༶༸྾-࿅࿇-࿏႞-႟፠᎐-᎙᥀᧠-᧿᭡-᭪᭴-᭼⁄⁒⁺-⁼₊-₌℀-℁℃-℆℈-℉℔№-℘℞-℣℥℧℩℮℺-℻⅀-⅄⅊-⅍⅏←-⌨⌫-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭔⳥-⳪⺀-⿻〄〒-〓〠〶-〷〾-〿㆐-㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫﬩﷽﹢﹤-﹦+<->|~¬¦│-○-�]+`, Operator, nil}, + {`([0-9][0-9]*\.[0-9]*|\.[0-9]+)([eE][+-]?[0-9]+)?[fFdD]?`, LiteralNumberFloat, nil}, + {`0x[0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`[0-9]+L?`, LiteralNumberInteger, nil}, + {`\n`, Text, nil}, + }, + "class": { + {"([a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc](?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]|[0-9])*(?:(?<=_)[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+)?|[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+|`[^`]+`)(\\s*)(\\[)", ByGroups(NameClass, Text, Operator), Push("typeparam")}, + {`\s+`, Text, nil}, + {`\{`, Operator, Pop(1)}, + {`\(`, Operator, Pop(1)}, + {`//.*?\n`, CommentSingle, Pop(1)}, + {"[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc](?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]|[0-9])*(?:(?<=_)[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+)?|[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+|`[^`]+`", NameClass, Pop(1)}, + }, + "type": { + {`\s+`, Text, nil}, + {`<[%:]|>:|[#_]|forSome|type`, Keyword, nil}, + {`([,);}]|=>|=|⇒)(\s*)`, ByGroups(Operator, Text), Pop(1)}, + {`[({]`, Operator, Push()}, + {"((?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc](?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]|[0-9])*(?:(?<=_)[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+)?|[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+|`[^`]+`)(?:\\.(?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc](?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]|[0-9])*(?:(?<=_)[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+)?|[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+|`[^`]+`))*)(\\s*)(\\[)", ByGroups(KeywordType, Text, Operator), Push("#pop", "typeparam")}, + {"((?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc](?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]|[0-9])*(?:(?<=_)[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+)?|[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+|`[^`]+`)(?:\\.(?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc](?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]|[0-9])*(?:(?<=_)[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+)?|[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+|`[^`]+`))*)(\\s*)$", ByGroups(KeywordType, Text), Pop(1)}, + {`//.*?\n`, CommentSingle, Pop(1)}, + {"\\.|[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc](?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]|[0-9])*(?:(?<=_)[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+)?|[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+|`[^`]+`", KeywordType, nil}, + }, + "typeparam": { + {`[\s,]+`, Text, nil}, + {`<[%:]|=>|>:|[#_⇒]|forSome|type`, Keyword, nil}, + {`([\])}])`, Operator, Pop(1)}, + {`[(\[{]`, Operator, Push()}, + {"\\.|[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc](?:[a-zA-Z\\$_\u00aa\u00b5\u00ba\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02af\u0370-\u0373\u0376-\u0377\u037b-\u037d\u0386\u0388-\u03f5\u03f7-\u0481\u048a-\u0556\u0561-\u0587\u05d0-\u05f2\u0621-\u063f\u0641-\u064a\u066e-\u066f\u0671-\u06d3\u06d5\u06ee-\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u097f\u0985-\u09b9\u09bd\u09ce\u09dc-\u09e1\u09f0-\u09f1\u0a05-\u0a39\u0a59-\u0a5e\u0a72-\u0a74\u0a85-\u0ab9\u0abd\u0ad0-\u0ae1\u0b05-\u0b39\u0b3d\u0b5c-\u0b61\u0b71\u0b83-\u0bb9\u0bd0\u0c05-\u0c3d\u0c58-\u0c61\u0c85-\u0cb9\u0cbd\u0cde-\u0ce1\u0d05-\u0d3d\u0d60-\u0d61\u0d7a-\u0d7f\u0d85-\u0dc6\u0e01-\u0e30\u0e32-\u0e33\u0e40-\u0e45\u0e81-\u0eb0\u0eb2-\u0eb3\u0ebd-\u0ec4\u0edc-\u0f00\u0f40-\u0f6c\u0f88-\u0f8b\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065-\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10fa\u1100-\u135a\u1380-\u138f\u13a0-\u166c\u166f-\u1676\u1681-\u169a\u16a0-\u16ea\u16ee-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u18a8\u18aa-\u191c\u1950-\u19a9\u19c1-\u19c7\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae-\u1baf\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e00-\u1fbc\u1fbe\u1fc2-\u1fcc\u1fd0-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ffc\u2071\u207f\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c7c\u2c80-\u2ce4\u2d00-\u2d65\u2d80-\u2dde\u3006-\u3007\u3021-\u3029\u3038-\u303a\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff-\u318e\u31a0-\u31b7\u31f0-\u31ff\u3400-\u4db5\u4e00-\ua014\ua016-\ua48c\ua500-\ua60b\ua610-\ua61f\ua62a-\ua66e\ua680-\ua697\ua722-\ua76f\ua771-\ua787\ua78b-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua90a-\ua925\ua930-\ua946\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uac00-\ud7a3\uf900-\ufb1d\ufb1f-\ufb28\ufb2a-\ufd3d\ufd50-\ufdfb\ufe70-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uff6f\uff71-\uff9d\uffa0-\uffdc]|[0-9])*(?:(?<=_)[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+)?|[-~\\^\\*!%&\\\\<>\\|+=:/?@\u00a6-\u00a7\u00a9\u00ac\u00ae\u00b0-\u00b1\u00b6\u00d7\u00f7\u03f6\u0482\u0606-\u0608\u060e-\u060f\u06e9\u06fd-\u06fe\u07f6\u09fa\u0b70\u0bf3-\u0bf8\u0bfa\u0c7f\u0cf1-\u0cf2\u0d79\u0f01-\u0f03\u0f13-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcf\u109e-\u109f\u1360\u1390-\u1399\u1940\u19e0-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u2044\u2052\u207a-\u207c\u208a-\u208c\u2100-\u2101\u2103-\u2106\u2108-\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a-\u213b\u2140-\u2144\u214a-\u214d\u214f\u2190-\u2328\u232b-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b54\u2ce5-\u2cea\u2e80-\u2ffb\u3004\u3012-\u3013\u3020\u3036-\u3037\u303e-\u303f\u3190-\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua828-\ua82b\ufb29\ufdfd\ufe62\ufe64-\ufe66\uff0b\uff1c-\uff1e\uff5c\uff5e\uffe2\uffe4\uffe8-\uffee\ufffc-\ufffd]+|`[^`]+`", KeywordType, nil}, + }, + "comment": { + {`[^/*]+`, CommentMultiline, nil}, + {`/\*`, CommentMultiline, Push()}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[*/]`, CommentMultiline, nil}, + }, + "import": { + {`([a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ](?:[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ]|[0-9])*(?:(?<=_)[-~\^\*!%&\\<>\|+=:/?@¦-§©¬®°-±¶×÷϶҂؆-؈؎-؏۩۽-۾߶৺୰௳-௸௺౿ೱ-ೲ൹༁-༃༓-༗༚-༟༴༶༸྾-࿅࿇-࿏႞-႟፠᎐-᎙᥀᧠-᧿᭡-᭪᭴-᭼⁄⁒⁺-⁼₊-₌℀-℁℃-℆℈-℉℔№-℘℞-℣℥℧℩℮℺-℻⅀-⅄⅊-⅍⅏←-⌨⌫-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭔⳥-⳪⺀-⿻〄〒-〓〠〶-〷〾-〿㆐-㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫﬩﷽﹢﹤-﹦+<->|~¬¦│-○-�]+)?|\.)+`, NameNamespace, Pop(1)}, + }, + "interpstringcommon": { + {`[^"$\\]+`, LiteralString, nil}, + {`\$\$`, LiteralString, nil}, + {`\$[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ](?:[a-zA-Z\$_ªµºÀ-ÖØ-öø-ʯͰ-ͳͶ-ͷͻ-ͽΆΈ-ϵϷ-ҁҊ-Ֆա-ևא-ײء-ؿف-يٮ-ٯٱ-ۓەۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪऄ-हऽॐक़-ॡॲ-ॿঅ-হঽৎড়-ৡৰ-ৱਅ-ਹਖ਼-ਫ਼ੲ-ੴઅ-હઽૐ-ૡଅ-ହଽଡ଼-ୡୱஃ-ஹௐఅ-ఽౘ-ౡಅ-ಹಽೞ-ೡഅ-ഽൠ-ൡൺ-ൿඅ-ෆก-ะา-ำเ-ๅກ-ະາ-ຳຽ-ໄໜ-ༀཀ-ཬྈ-ྋက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჺᄀ-ፚᎀ-ᎏᎠ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᛮ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝰក-ឳៜᠠ-ᡂᡄ-ᢨᢪ-ᤜᥐ-ᦩᧁ-ᧇᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᰀ-ᰣᱍ-ᱏᱚ-ᱷᴀ-ᴫᵢ-ᵷᵹ-ᶚḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⱼⲀ-ⳤⴀ-ⵥⶀ-ⷞ〆-〇〡-〩〸-〺〼ぁ-ゖゟァ-ヺヿ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-ꀔꀖ-ꒌꔀ-ꘋꘐ-ꘟꘪ-ꙮꚀ-ꚗꜢ-ꝯꝱ-ꞇꞋ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꤊ-ꤥꤰ-ꥆꨀ-ꨨꩀ-ꩂꩄ-ꩋ가-힣豈-יִײַ-ﬨשׁ-ﴽﵐ-ﷻﹰ-ﻼA-Za-zヲ-ッア-ンᅠ-ᅵ]|\d)*`, LiteralStringInterpol, nil}, + {`\$\{`, LiteralStringInterpol, Push("interpbrace")}, + {`\\.`, LiteralString, nil}, + }, + "interptriplestring": { + {`"""(?!")`, LiteralString, Pop(1)}, + {`"`, LiteralString, nil}, + Include("interpstringcommon"), + }, + "interpstring": { + {`"`, LiteralString, Pop(1)}, + Include("interpstringcommon"), + }, + "interpbrace": { + {`\}`, LiteralStringInterpol, Pop(1)}, + {`\{`, LiteralStringInterpol, Push()}, + Include("root"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/scheme.go b/vendor/github.com/alecthomas/chroma/lexers/scheme.go new file mode 100644 index 0000000..98fbb51 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/scheme.go @@ -0,0 +1,52 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// nolint + +// Scheme lexer. +var SchemeLang = Register(MustNewLexer( + &Config{ + Name: "Scheme", + Aliases: []string{"scheme", "scm"}, + Filenames: []string{"*.scm", "*.ss"}, + MimeTypes: []string{"text/x-scheme", "application/x-scheme"}, + }, + Rules{ + "root": { + {`;.*$`, CommentSingle, nil}, + {`#\|`, CommentMultiline, Push("multiline-comment")}, + {`#;\s*\(`, Comment, Push("commented-form")}, + {`#!r6rs`, Comment, nil}, + {`\s+`, Text, nil}, + {`-?\d+\.\d+`, LiteralNumberFloat, nil}, + {`-?\d+`, LiteralNumberInteger, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`'[\w!$%&*+,/:<=>?@^~|-]+`, LiteralStringSymbol, nil}, + {`#\\([()/'\"._!§$%& ?=+-]|[a-zA-Z0-9]+)`, LiteralStringChar, nil}, + {`(#t|#f)`, NameConstant, nil}, + {"('|#|`|,@|,|\\.)", Operator, nil}, + {`(lambda |define |if |else |cond |and |or |case |let |let\* |letrec |begin |do |delay |set\! |\=\> |quote |quasiquote |unquote |unquote\-splicing |define\-syntax |let\-syntax |letrec\-syntax |syntax\-rules )`, Keyword, nil}, + {`(?<='\()[\w!$%&*+,/:<=>?@^~|-]+`, NameVariable, nil}, + {`(?<=#\()[\w!$%&*+,/:<=>?@^~|-]+`, NameVariable, nil}, + {`(?<=\()(\* |\+ |\- |\/ |\< |\<\= |\= |\> |\>\= |abs |acos |angle |append |apply |asin |assoc |assq |assv |atan |boolean\? |caaaar |caaadr |caaar |caadar |caaddr |caadr |caar |cadaar |cadadr |cadar |caddar |cadddr |caddr |cadr |call\-with\-current\-continuation |call\-with\-input\-file |call\-with\-output\-file |call\-with\-values |call\/cc |car |cdaaar |cdaadr |cdaar |cdadar |cdaddr |cdadr |cdar |cddaar |cddadr |cddar |cdddar |cddddr |cdddr |cddr |cdr |ceiling |char\-\>integer |char\-alphabetic\? |char\-ci\<\=\? |char\-ci\<\? |char\-ci\=\? |char\-ci\>\=\? |char\-ci\>\? |char\-downcase |char\-lower\-case\? |char\-numeric\? |char\-ready\? |char\-upcase |char\-upper\-case\? |char\-whitespace\? |char\<\=\? |char\<\? |char\=\? |char\>\=\? |char\>\? |char\? |close\-input\-port |close\-output\-port |complex\? |cons |cos |current\-input\-port |current\-output\-port |denominator |display |dynamic\-wind |eof\-object\? |eq\? |equal\? |eqv\? |eval |even\? |exact\-\>inexact |exact\? |exp |expt |floor |for\-each |force |gcd |imag\-part |inexact\-\>exact |inexact\? |input\-port\? |integer\-\>char |integer\? |interaction\-environment |lcm |length |list |list\-\>string |list\-\>vector |list\-ref |list\-tail |list\? |load |log |magnitude |make\-polar |make\-rectangular |make\-string |make\-vector |map |max |member |memq |memv |min |modulo |negative\? |newline |not |null\-environment |null\? |number\-\>string |number\? |numerator |odd\? |open\-input\-file |open\-output\-file |output\-port\? |pair\? |peek\-char |port\? |positive\? |procedure\? |quotient |rational\? |rationalize |read |read\-char |real\-part |real\? |remainder |reverse |round |scheme\-report\-environment |set\-car\! |set\-cdr\! |sin |sqrt |string |string\-\>list |string\-\>number |string\-\>symbol |string\-append |string\-ci\<\=\? |string\-ci\<\? |string\-ci\=\? |string\-ci\>\=\? |string\-ci\>\? |string\-copy |string\-fill\! |string\-length |string\-ref |string\-set\! |string\<\=\? |string\<\? |string\=\? |string\>\=\? |string\>\? |string\? |substring |symbol\-\>string |symbol\? |tan |transcript\-off |transcript\-on |truncate |values |vector |vector\-\>list |vector\-fill\! |vector\-length |vector\-ref |vector\-set\! |vector\? |with\-input\-from\-file |with\-output\-to\-file |write |write\-char |zero\? )`, NameBuiltin, nil}, + {`(?<=\()[\w!$%&*+,/:<=>?@^~|-]+`, NameFunction, nil}, + {`[\w!$%&*+,/:<=>?@^~|-]+`, NameVariable, nil}, + {`(\(|\))`, Punctuation, nil}, + {`(\[|\])`, Punctuation, nil}, + }, + "multiline-comment": { + {`#\|`, CommentMultiline, Push()}, + {`\|#`, CommentMultiline, Pop(1)}, + {`[^|#]+`, CommentMultiline, nil}, + {`[|#]`, CommentMultiline, nil}, + }, + "commented-form": { + {`\(`, Comment, Push()}, + {`\)`, Comment, Pop(1)}, + {`[^()]+`, Comment, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/scilab.go b/vendor/github.com/alecthomas/chroma/lexers/scilab.go new file mode 100644 index 0000000..1f96c15 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/scilab.go @@ -0,0 +1,43 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Scilab lexer. +var Scilab = Register(MustNewLexer( + &Config{ + Name: "Scilab", + Aliases: []string{"scilab"}, + Filenames: []string{"*.sci", "*.sce", "*.tst"}, + MimeTypes: []string{"text/scilab"}, + }, + Rules{ + "root": { + {`//.*?$`, CommentSingle, nil}, + {`^\s*function`, Keyword, Push("deffunc")}, + {Words(``, `\b`, `__FILE__`, `__LINE__`, `break`, `case`, `catch`, `classdef`, `continue`, `do`, `else`, `elseif`, `end`, `end_try_catch`, `end_unwind_protect`, `endclassdef`, `endevents`, `endfor`, `endfunction`, `endif`, `endmethods`, `endproperties`, `endswitch`, `endwhile`, `events`, `for`, `function`, `get`, `global`, `if`, `methods`, `otherwise`, `persistent`, `properties`, `return`, `set`, `static`, `switch`, `try`, `until`, `unwind_protect`, `unwind_protect_cleanup`, `while`), Keyword, nil}, + {Words(``, `\b`, `!!_invoke_`, `%H5Object_e`, `%H5Object_fieldnames`, `%H5Object_p`, `%XMLAttr_6`, `%XMLAttr_e`, `%XMLAttr_i_XMLElem`, `%XMLAttr_length`, `%XMLAttr_p`, `%XMLAttr_size`, `%XMLDoc_6`, `%XMLDoc_e`, `%XMLDoc_i_XMLList`, `%XMLDoc_p`, `%XMLElem_6`, `%XMLElem_e`, `%XMLElem_i_XMLDoc`, `%XMLElem_i_XMLElem`, `%XMLElem_i_XMLList`, `%XMLElem_p`, `%XMLList_6`, `%XMLList_e`, `%XMLList_i_XMLElem`, `%XMLList_i_XMLList`, `%XMLList_length`, `%XMLList_p`, `%XMLList_size`, `%XMLNs_6`, `%XMLNs_e`, `%XMLNs_i_XMLElem`, `%XMLNs_p`, `%XMLSet_6`, `%XMLSet_e`, `%XMLSet_length`, `%XMLSet_p`, `%XMLSet_size`, `%XMLValid_p`, `%_EClass_6`, `%_EClass_e`, `%_EClass_p`, `%_EObj_0`, `%_EObj_1__EObj`, `%_EObj_1_b`, `%_EObj_1_c`, `%_EObj_1_i`, `%_EObj_1_s`, `%_EObj_2__EObj`, `%_EObj_2_b`, `%_EObj_2_c`, `%_EObj_2_i`, `%_EObj_2_s`, `%_EObj_3__EObj`, `%_EObj_3_b`, `%_EObj_3_c`, `%_EObj_3_i`, `%_EObj_3_s`, `%_EObj_4__EObj`, `%_EObj_4_b`, `%_EObj_4_c`, `%_EObj_4_i`, `%_EObj_4_s`, `%_EObj_5`, `%_EObj_6`, `%_EObj_a__EObj`, `%_EObj_a_b`, `%_EObj_a_c`, `%_EObj_a_i`, `%_EObj_a_s`, `%_EObj_d__EObj`, `%_EObj_d_b`, `%_EObj_d_c`, `%_EObj_d_i`, `%_EObj_d_s`, `%_EObj_disp`, `%_EObj_e`, `%_EObj_g__EObj`, `%_EObj_g_b`, `%_EObj_g_c`, `%_EObj_g_i`, `%_EObj_g_s`, `%_EObj_h__EObj`, `%_EObj_h_b`, `%_EObj_h_c`, `%_EObj_h_i`, `%_EObj_h_s`, `%_EObj_i__EObj`, `%_EObj_j__EObj`, `%_EObj_j_b`, `%_EObj_j_c`, `%_EObj_j_i`, `%_EObj_j_s`, `%_EObj_k__EObj`, `%_EObj_k_b`, `%_EObj_k_c`, `%_EObj_k_i`, `%_EObj_k_s`, `%_EObj_l__EObj`, `%_EObj_l_b`, `%_EObj_l_c`, `%_EObj_l_i`, `%_EObj_l_s`, `%_EObj_m__EObj`, `%_EObj_m_b`, `%_EObj_m_c`, `%_EObj_m_i`, `%_EObj_m_s`, `%_EObj_n__EObj`, `%_EObj_n_b`, `%_EObj_n_c`, `%_EObj_n_i`, `%_EObj_n_s`, `%_EObj_o__EObj`, `%_EObj_o_b`, `%_EObj_o_c`, `%_EObj_o_i`, `%_EObj_o_s`, `%_EObj_p`, `%_EObj_p__EObj`, `%_EObj_p_b`, `%_EObj_p_c`, `%_EObj_p_i`, `%_EObj_p_s`, `%_EObj_q__EObj`, `%_EObj_q_b`, `%_EObj_q_c`, `%_EObj_q_i`, `%_EObj_q_s`, `%_EObj_r__EObj`, `%_EObj_r_b`, `%_EObj_r_c`, `%_EObj_r_i`, `%_EObj_r_s`, `%_EObj_s__EObj`, `%_EObj_s_b`, `%_EObj_s_c`, `%_EObj_s_i`, `%_EObj_s_s`, `%_EObj_t`, `%_EObj_x__EObj`, `%_EObj_x_b`, `%_EObj_x_c`, `%_EObj_x_i`, `%_EObj_x_s`, `%_EObj_y__EObj`, `%_EObj_y_b`, `%_EObj_y_c`, `%_EObj_y_i`, `%_EObj_y_s`, `%_EObj_z__EObj`, `%_EObj_z_b`, `%_EObj_z_c`, `%_EObj_z_i`, `%_EObj_z_s`, `%_eigs`, `%_load`, `%b_1__EObj`, `%b_2__EObj`, `%b_3__EObj`, `%b_4__EObj`, `%b_a__EObj`, `%b_d__EObj`, `%b_g__EObj`, `%b_h__EObj`, `%b_i_XMLList`, `%b_i__EObj`, `%b_j__EObj`, `%b_k__EObj`, `%b_l__EObj`, `%b_m__EObj`, `%b_n__EObj`, `%b_o__EObj`, `%b_p__EObj`, `%b_q__EObj`, `%b_r__EObj`, `%b_s__EObj`, `%b_x__EObj`, `%b_y__EObj`, `%b_z__EObj`, `%c_1__EObj`, `%c_2__EObj`, `%c_3__EObj`, `%c_4__EObj`, `%c_a__EObj`, `%c_d__EObj`, `%c_g__EObj`, `%c_h__EObj`, `%c_i_XMLAttr`, `%c_i_XMLDoc`, `%c_i_XMLElem`, `%c_i_XMLList`, `%c_i__EObj`, `%c_j__EObj`, `%c_k__EObj`, `%c_l__EObj`, `%c_m__EObj`, `%c_n__EObj`, `%c_o__EObj`, `%c_p__EObj`, `%c_q__EObj`, `%c_r__EObj`, `%c_s__EObj`, `%c_x__EObj`, `%c_y__EObj`, `%c_z__EObj`, `%ce_i_XMLList`, `%fptr_i_XMLList`, `%h_i_XMLList`, `%hm_i_XMLList`, `%i_1__EObj`, `%i_2__EObj`, `%i_3__EObj`, `%i_4__EObj`, `%i_a__EObj`, `%i_abs`, `%i_cumprod`, `%i_cumsum`, `%i_d__EObj`, `%i_diag`, `%i_g__EObj`, `%i_h__EObj`, `%i_i_XMLList`, `%i_i__EObj`, `%i_j__EObj`, `%i_k__EObj`, `%i_l__EObj`, `%i_m__EObj`, `%i_matrix`, `%i_max`, `%i_maxi`, `%i_min`, `%i_mini`, `%i_mput`, `%i_n__EObj`, `%i_o__EObj`, `%i_p`, `%i_p__EObj`, `%i_prod`, `%i_q__EObj`, `%i_r__EObj`, `%i_s__EObj`, `%i_sum`, `%i_tril`, `%i_triu`, `%i_x__EObj`, `%i_y__EObj`, `%i_z__EObj`, `%ip_i_XMLList`, `%l_i_XMLList`, `%l_i__EObj`, `%lss_i_XMLList`, `%mc_i_XMLList`, `%msp_full`, `%msp_i_XMLList`, `%msp_spget`, `%p_i_XMLList`, `%ptr_i_XMLList`, `%r_i_XMLList`, `%s_1__EObj`, `%s_2__EObj`, `%s_3__EObj`, `%s_4__EObj`, `%s_a__EObj`, `%s_d__EObj`, `%s_g__EObj`, `%s_h__EObj`, `%s_i_XMLList`, `%s_i__EObj`, `%s_j__EObj`, `%s_k__EObj`, `%s_l__EObj`, `%s_m__EObj`, `%s_n__EObj`, `%s_o__EObj`, `%s_p__EObj`, `%s_q__EObj`, `%s_r__EObj`, `%s_s__EObj`, `%s_x__EObj`, `%s_y__EObj`, `%s_z__EObj`, `%sp_i_XMLList`, `%spb_i_XMLList`, `%st_i_XMLList`, `Calendar`, `ClipBoard`, `Matplot`, `Matplot1`, `PlaySound`, `TCL_DeleteInterp`, `TCL_DoOneEvent`, `TCL_EvalFile`, `TCL_EvalStr`, `TCL_ExistArray`, `TCL_ExistInterp`, `TCL_ExistVar`, `TCL_GetVar`, `TCL_GetVersion`, `TCL_SetVar`, `TCL_UnsetVar`, `TCL_UpVar`, `_`, `_code2str`, `_d`, `_str2code`, `about`, `abs`, `acos`, `addModulePreferences`, `addcolor`, `addf`, `addhistory`, `addinter`, `addlocalizationdomain`, `amell`, `and`, `argn`, `arl2_ius`, `ascii`, `asin`, `atan`, `backslash`, `balanc`, `banner`, `base2dec`, `basename`, `bdiag`, `beep`, `besselh`, `besseli`, `besselj`, `besselk`, `bessely`, `beta`, `bezout`, `bfinit`, `blkfc1i`, `blkslvi`, `bool2s`, `browsehistory`, `browsevar`, `bsplin3val`, `buildDoc`, `buildouttb`, `bvode`, `c_link`, `call`, `callblk`, `captions`, `cd`, `cdfbet`, `cdfbin`, `cdfchi`, `cdfchn`, `cdff`, `cdffnc`, `cdfgam`, `cdfnbn`, `cdfnor`, `cdfpoi`, `cdft`, `ceil`, `champ`, `champ1`, `chdir`, `chol`, `clc`, `clean`, `clear`, `clearfun`, `clearglobal`, `closeEditor`, `closeEditvar`, `closeXcos`, `code2str`, `coeff`, `color`, `comp`, `completion`, `conj`, `contour2di`, `contr`, `conv2`, `convstr`, `copy`, `copyfile`, `corr`, `cos`, `coserror`, `createdir`, `cshep2d`, `csvDefault`, `csvIsnum`, `csvRead`, `csvStringToDouble`, `csvTextScan`, `csvWrite`, `ctree2`, `ctree3`, `ctree4`, `cumprod`, `cumsum`, `curblock`, `curblockc`, `daskr`, `dasrt`, `dassl`, `data2sig`, `datatipCreate`, `datatipManagerMode`, `datatipMove`, `datatipRemove`, `datatipSetDisplay`, `datatipSetInterp`, `datatipSetOrientation`, `datatipSetStyle`, `datatipToggle`, `dawson`, `dct`, `debug`, `dec2base`, `deff`, `definedfields`, `degree`, `delbpt`, `delete`, `deletefile`, `delip`, `delmenu`, `det`, `dgettext`, `dhinf`, `diag`, `diary`, `diffobjs`, `disp`, `dispbpt`, `displayhistory`, `disposefftwlibrary`, `dlgamma`, `dnaupd`, `dneupd`, `double`, `drawaxis`, `drawlater`, `drawnow`, `driver`, `dsaupd`, `dsearch`, `dseupd`, `dst`, `duplicate`, `editvar`, `emptystr`, `end_scicosim`, `ereduc`, `erf`, `erfc`, `erfcx`, `erfi`, `errcatch`, `errclear`, `error`, `eval_cshep2d`, `exec`, `execstr`, `exists`, `exit`, `exp`, `expm`, `exportUI`, `export_to_hdf5`, `eye`, `fadj2sp`, `fec`, `feval`, `fft`, `fftw`, `fftw_flags`, `fftw_forget_wisdom`, `fftwlibraryisloaded`, `figure`, `file`, `filebrowser`, `fileext`, `fileinfo`, `fileparts`, `filesep`, `find`, `findBD`, `findfiles`, `fire_closing_finished`, `floor`, `format`, `fort`, `fprintfMat`, `freq`, `frexp`, `fromc`, `fromjava`, `fscanfMat`, `fsolve`, `fstair`, `full`, `fullpath`, `funcprot`, `funptr`, `gamma`, `gammaln`, `geom3d`, `get`, `getURL`, `get_absolute_file_path`, `get_fftw_wisdom`, `getblocklabel`, `getcallbackobject`, `getdate`, `getdebuginfo`, `getdefaultlanguage`, `getdrives`, `getdynlibext`, `getenv`, `getfield`, `gethistory`, `gethistoryfile`, `getinstalledlookandfeels`, `getio`, `getlanguage`, `getlongpathname`, `getlookandfeel`, `getmd5`, `getmemory`, `getmodules`, `getos`, `getpid`, `getrelativefilename`, `getscicosvars`, `getscilabmode`, `getshortpathname`, `gettext`, `getvariablesonstack`, `getversion`, `glist`, `global`, `glue`, `grand`, `graphicfunction`, `grayplot`, `grep`, `gsort`, `gstacksize`, `h5attr`, `h5close`, `h5cp`, `h5dataset`, `h5dump`, `h5exists`, `h5flush`, `h5get`, `h5group`, `h5isArray`, `h5isAttr`, `h5isCompound`, `h5isFile`, `h5isGroup`, `h5isList`, `h5isRef`, `h5isSet`, `h5isSpace`, `h5isType`, `h5isVlen`, `h5label`, `h5ln`, `h5ls`, `h5mount`, `h5mv`, `h5open`, `h5read`, `h5readattr`, `h5rm`, `h5umount`, `h5write`, `h5writeattr`, `havewindow`, `helpbrowser`, `hess`, `hinf`, `historymanager`, `historysize`, `host`, `htmlDump`, `htmlRead`, `htmlReadStr`, `htmlWrite`, `iconvert`, `ieee`, `ilib_verbose`, `imag`, `impl`, `import_from_hdf5`, `imult`, `inpnvi`, `int`, `int16`, `int2d`, `int32`, `int3d`, `int8`, `interp`, `interp2d`, `interp3d`, `intg`, `intppty`, `inttype`, `inv`, `invoke_lu`, `is_handle_valid`, `is_hdf5_file`, `isalphanum`, `isascii`, `isdef`, `isdigit`, `isdir`, `isequal`, `isequalbitwise`, `iserror`, `isfile`, `isglobal`, `isletter`, `isnum`, `isreal`, `iswaitingforinput`, `jallowClassReloading`, `jarray`, `jautoTranspose`, `jautoUnwrap`, `javaclasspath`, `javalibrarypath`, `jcast`, `jcompile`, `jconvMatrixMethod`, `jcreatejar`, `jdeff`, `jdisableTrace`, `jenableTrace`, `jexists`, `jgetclassname`, `jgetfield`, `jgetfields`, `jgetinfo`, `jgetmethods`, `jimport`, `jinvoke`, `jinvoke_db`, `jnewInstance`, `jremove`, `jsetfield`, `junwrap`, `junwraprem`, `jwrap`, `jwrapinfloat`, `kron`, `lasterror`, `ldiv`, `ldivf`, `legendre`, `length`, `lib`, `librarieslist`, `libraryinfo`, `light`, `linear_interpn`, `lines`, `link`, `linmeq`, `list`, `listvar_in_hdf5`, `load`, `loadGui`, `loadScicos`, `loadXcos`, `loadfftwlibrary`, `loadhistory`, `log`, `log1p`, `lsq`, `lsq_splin`, `lsqrsolve`, `lsslist`, `lstcat`, `lstsize`, `ltitr`, `lu`, `ludel`, `lufact`, `luget`, `lusolve`, `macr2lst`, `macr2tree`, `matfile_close`, `matfile_listvar`, `matfile_open`, `matfile_varreadnext`, `matfile_varwrite`, `matrix`, `max`, `maxfiles`, `mclearerr`, `mclose`, `meof`, `merror`, `messagebox`, `mfprintf`, `mfscanf`, `mget`, `mgeti`, `mgetl`, `mgetstr`, `min`, `mlist`, `mode`, `model2blk`, `mopen`, `move`, `movefile`, `mprintf`, `mput`, `mputl`, `mputstr`, `mscanf`, `mseek`, `msprintf`, `msscanf`, `mtell`, `mtlb_mode`, `mtlb_sparse`, `mucomp`, `mulf`, `name2rgb`, `nearfloat`, `newaxes`, `newest`, `newfun`, `nnz`, `norm`, `notify`, `number_properties`, `ode`, `odedc`, `ones`, `openged`, `opentk`, `optim`, `or`, `ordmmd`, `parallel_concurrency`, `parallel_run`, `param3d`, `param3d1`, `part`, `pathconvert`, `pathsep`, `phase_simulation`, `plot2d`, `plot2d1`, `plot2d2`, `plot2d3`, `plot2d4`, `plot3d`, `plot3d1`, `plotbrowser`, `pointer_xproperty`, `poly`, `ppol`, `pppdiv`, `predef`, `preferences`, `print`, `printf`, `printfigure`, `printsetupbox`, `prod`, `progressionbar`, `prompt`, `pwd`, `qld`, `qp_solve`, `qr`, `raise_window`, `rand`, `rankqr`, `rat`, `rcond`, `rdivf`, `read`, `read4b`, `read_csv`, `readb`, `readgateway`, `readmps`, `real`, `realtime`, `realtimeinit`, `regexp`, `relocate_handle`, `remez`, `removeModulePreferences`, `removedir`, `removelinehistory`, `res_with_prec`, `resethistory`, `residu`, `resume`, `return`, `ricc`, `rlist`, `roots`, `rotate_axes`, `round`, `rpem`, `rtitr`, `rubberbox`, `save`, `saveGui`, `saveafterncommands`, `saveconsecutivecommands`, `savehistory`, `schur`, `sci_haltscicos`, `sci_tree2`, `sci_tree3`, `sci_tree4`, `sciargs`, `scicos_debug`, `scicos_debug_count`, `scicos_time`, `scicosim`, `scinotes`, `sctree`, `semidef`, `set`, `set_blockerror`, `set_fftw_wisdom`, `set_xproperty`, `setbpt`, `setdefaultlanguage`, `setenv`, `setfield`, `sethistoryfile`, `setlanguage`, `setlookandfeel`, `setmenu`, `sfact`, `sfinit`, `show_window`, `sident`, `sig2data`, `sign`, `simp`, `simp_mode`, `sin`, `size`, `slash`, `sleep`, `sorder`, `sparse`, `spchol`, `spcompack`, `spec`, `spget`, `splin`, `splin2d`, `splin3d`, `splitURL`, `spones`, `sprintf`, `sqrt`, `stacksize`, `str2code`, `strcat`, `strchr`, `strcmp`, `strcspn`, `strindex`, `string`, `stringbox`, `stripblanks`, `strncpy`, `strrchr`, `strrev`, `strsplit`, `strspn`, `strstr`, `strsubst`, `strtod`, `strtok`, `subf`, `sum`, `svd`, `swap_handles`, `symfcti`, `syredi`, `system_getproperty`, `system_setproperty`, `ta2lpd`, `tan`, `taucs_chdel`, `taucs_chfact`, `taucs_chget`, `taucs_chinfo`, `taucs_chsolve`, `tempname`, `testmatrix`, `timer`, `tlist`, `tohome`, `tokens`, `toolbar`, `toprint`, `tr_zer`, `tril`, `triu`, `type`, `typename`, `uiDisplayTree`, `uicontextmenu`, `uicontrol`, `uigetcolor`, `uigetdir`, `uigetfile`, `uigetfont`, `uimenu`, `uint16`, `uint32`, `uint8`, `uipopup`, `uiputfile`, `uiwait`, `ulink`, `umf_ludel`, `umf_lufact`, `umf_luget`, `umf_luinfo`, `umf_lusolve`, `umfpack`, `unglue`, `unix`, `unsetmenu`, `unzoom`, `updatebrowsevar`, `usecanvas`, `useeditor`, `user`, `var2vec`, `varn`, `vec2var`, `waitbar`, `warnBlockByUID`, `warning`, `what`, `where`, `whereis`, `who`, `winsid`, `with_module`, `writb`, `write`, `write4b`, `write_csv`, `x_choose`, `x_choose_modeless`, `x_dialog`, `x_mdialog`, `xarc`, `xarcs`, `xarrows`, `xchange`, `xchoicesi`, `xclick`, `xcos`, `xcosAddToolsMenu`, `xcosConfigureXmlFile`, `xcosDiagramToScilab`, `xcosPalCategoryAdd`, `xcosPalDelete`, `xcosPalDisable`, `xcosPalEnable`, `xcosPalGenerateIcon`, `xcosPalGet`, `xcosPalLoad`, `xcosPalMove`, `xcosSimulationStarted`, `xcosUpdateBlock`, `xdel`, `xend`, `xfarc`, `xfarcs`, `xfpoly`, `xfpolys`, `xfrect`, `xget`, `xgetmouse`, `xgraduate`, `xgrid`, `xinit`, `xlfont`, `xls_open`, `xls_read`, `xmlAddNs`, `xmlAppend`, `xmlAsNumber`, `xmlAsText`, `xmlDTD`, `xmlDelete`, `xmlDocument`, `xmlDump`, `xmlElement`, `xmlFormat`, `xmlGetNsByHref`, `xmlGetNsByPrefix`, `xmlGetOpenDocs`, `xmlIsValidObject`, `xmlName`, `xmlNs`, `xmlRead`, `xmlReadStr`, `xmlRelaxNG`, `xmlRemove`, `xmlSchema`, `xmlSetAttributes`, `xmlValidate`, `xmlWrite`, `xmlXPath`, `xname`, `xpause`, `xpoly`, `xpolys`, `xrect`, `xrects`, `xs2bmp`, `xs2emf`, `xs2eps`, `xs2gif`, `xs2jpg`, `xs2pdf`, `xs2png`, `xs2ppm`, `xs2ps`, `xs2svg`, `xsegs`, `xset`, `xstring`, `xstringb`, `xtitle`, `zeros`, `znaupd`, `zneupd`, `zoom_rect`, `abort`, `apropos`, `break`, `case`, `catch`, `continue`, `do`, `else`, `elseif`, `end`, `endfunction`, `for`, `function`, `help`, `if`, `pause`, `quit`, `select`, `then`, `try`, `while`, `!_deff_wrapper`, `%0_i_st`, `%3d_i_h`, `%Block_xcosUpdateBlock`, `%TNELDER_p`, `%TNELDER_string`, `%TNMPLOT_p`, `%TNMPLOT_string`, `%TOPTIM_p`, `%TOPTIM_string`, `%TSIMPLEX_p`, `%TSIMPLEX_string`, `%_EVoid_p`, `%_gsort`, `%_listvarinfile`, `%_rlist`, `%_save`, `%_sodload`, `%_strsplit`, `%_unwrap`, `%ar_p`, `%asn`, `%b_a_b`, `%b_a_s`, `%b_c_s`, `%b_c_spb`, `%b_cumprod`, `%b_cumsum`, `%b_d_s`, `%b_diag`, `%b_e`, `%b_f_s`, `%b_f_spb`, `%b_g_s`, `%b_g_spb`, `%b_grand`, `%b_h_s`, `%b_h_spb`, `%b_i_b`, `%b_i_ce`, `%b_i_h`, `%b_i_hm`, `%b_i_s`, `%b_i_sp`, `%b_i_spb`, `%b_i_st`, `%b_iconvert`, `%b_l_b`, `%b_l_s`, `%b_m_b`, `%b_m_s`, `%b_matrix`, `%b_n_hm`, `%b_o_hm`, `%b_p_s`, `%b_prod`, `%b_r_b`, `%b_r_s`, `%b_s_b`, `%b_s_s`, `%b_string`, `%b_sum`, `%b_tril`, `%b_triu`, `%b_x_b`, `%b_x_s`, `%bicg`, `%bicgstab`, `%c_a_c`, `%c_b_c`, `%c_b_s`, `%c_diag`, `%c_dsearch`, `%c_e`, `%c_eye`, `%c_f_s`, `%c_grand`, `%c_i_c`, `%c_i_ce`, `%c_i_h`, `%c_i_hm`, `%c_i_lss`, `%c_i_r`, `%c_i_s`, `%c_i_st`, `%c_matrix`, `%c_n_l`, `%c_n_st`, `%c_o_l`, `%c_o_st`, `%c_ones`, `%c_rand`, `%c_tril`, `%c_triu`, `%cblock_c_cblock`, `%cblock_c_s`, `%cblock_e`, `%cblock_f_cblock`, `%cblock_p`, `%cblock_size`, `%ce_6`, `%ce_c_ce`, `%ce_e`, `%ce_f_ce`, `%ce_i_ce`, `%ce_i_s`, `%ce_i_st`, `%ce_matrix`, `%ce_p`, `%ce_size`, `%ce_string`, `%ce_t`, `%cgs`, `%champdat_i_h`, `%choose`, `%diagram_xcos`, `%dir_p`, `%fptr_i_st`, `%grand_perm`, `%grayplot_i_h`, `%h_i_st`, `%hmS_k_hmS_generic`, `%hm_1_hm`, `%hm_1_s`, `%hm_2_hm`, `%hm_2_s`, `%hm_3_hm`, `%hm_3_s`, `%hm_4_hm`, `%hm_4_s`, `%hm_5`, `%hm_a_hm`, `%hm_a_r`, `%hm_a_s`, `%hm_abs`, `%hm_and`, `%hm_bool2s`, `%hm_c_hm`, `%hm_ceil`, `%hm_conj`, `%hm_cos`, `%hm_cumprod`, `%hm_cumsum`, `%hm_d_hm`, `%hm_d_s`, `%hm_degree`, `%hm_dsearch`, `%hm_e`, `%hm_exp`, `%hm_eye`, `%hm_f_hm`, `%hm_find`, `%hm_floor`, `%hm_g_hm`, `%hm_grand`, `%hm_gsort`, `%hm_h_hm`, `%hm_i_b`, `%hm_i_ce`, `%hm_i_h`, `%hm_i_hm`, `%hm_i_i`, `%hm_i_p`, `%hm_i_r`, `%hm_i_s`, `%hm_i_st`, `%hm_iconvert`, `%hm_imag`, `%hm_int`, `%hm_isnan`, `%hm_isreal`, `%hm_j_hm`, `%hm_j_s`, `%hm_k_hm`, `%hm_k_s`, `%hm_log`, `%hm_m_p`, `%hm_m_r`, `%hm_m_s`, `%hm_matrix`, `%hm_max`, `%hm_mean`, `%hm_median`, `%hm_min`, `%hm_n_b`, `%hm_n_c`, `%hm_n_hm`, `%hm_n_i`, `%hm_n_p`, `%hm_n_s`, `%hm_o_b`, `%hm_o_c`, `%hm_o_hm`, `%hm_o_i`, `%hm_o_p`, `%hm_o_s`, `%hm_ones`, `%hm_or`, `%hm_p`, `%hm_prod`, `%hm_q_hm`, `%hm_r_s`, `%hm_rand`, `%hm_real`, `%hm_round`, `%hm_s`, `%hm_s_hm`, `%hm_s_r`, `%hm_s_s`, `%hm_sign`, `%hm_sin`, `%hm_size`, `%hm_sqrt`, `%hm_stdev`, `%hm_string`, `%hm_sum`, `%hm_x_hm`, `%hm_x_p`, `%hm_x_s`, `%hm_zeros`, `%i_1_s`, `%i_2_s`, `%i_3_s`, `%i_4_s`, `%i_Matplot`, `%i_a_i`, `%i_a_s`, `%i_and`, `%i_ascii`, `%i_b_s`, `%i_bezout`, `%i_champ`, `%i_champ1`, `%i_contour`, `%i_contour2d`, `%i_d_i`, `%i_d_s`, `%i_dsearch`, `%i_e`, `%i_fft`, `%i_g_i`, `%i_gcd`, `%i_grand`, `%i_h_i`, `%i_i_ce`, `%i_i_h`, `%i_i_hm`, `%i_i_i`, `%i_i_s`, `%i_i_st`, `%i_j_i`, `%i_j_s`, `%i_l_s`, `%i_lcm`, `%i_length`, `%i_m_i`, `%i_m_s`, `%i_mfprintf`, `%i_mprintf`, `%i_msprintf`, `%i_n_s`, `%i_o_s`, `%i_or`, `%i_p_i`, `%i_p_s`, `%i_plot2d`, `%i_plot2d1`, `%i_plot2d2`, `%i_q_s`, `%i_r_i`, `%i_r_s`, `%i_round`, `%i_s_i`, `%i_s_s`, `%i_sign`, `%i_string`, `%i_x_i`, `%i_x_s`, `%ip_a_s`, `%ip_i_st`, `%ip_m_s`, `%ip_n_ip`, `%ip_o_ip`, `%ip_p`, `%ip_part`, `%ip_s_s`, `%ip_string`, `%k`, `%l_i_h`, `%l_i_s`, `%l_i_st`, `%l_isequal`, `%l_n_c`, `%l_n_l`, `%l_n_m`, `%l_n_p`, `%l_n_s`, `%l_n_st`, `%l_o_c`, `%l_o_l`, `%l_o_m`, `%l_o_p`, `%l_o_s`, `%l_o_st`, `%lss_a_lss`, `%lss_a_p`, `%lss_a_r`, `%lss_a_s`, `%lss_c_lss`, `%lss_c_p`, `%lss_c_r`, `%lss_c_s`, `%lss_e`, `%lss_eye`, `%lss_f_lss`, `%lss_f_p`, `%lss_f_r`, `%lss_f_s`, `%lss_i_ce`, `%lss_i_lss`, `%lss_i_p`, `%lss_i_r`, `%lss_i_s`, `%lss_i_st`, `%lss_inv`, `%lss_l_lss`, `%lss_l_p`, `%lss_l_r`, `%lss_l_s`, `%lss_m_lss`, `%lss_m_p`, `%lss_m_r`, `%lss_m_s`, `%lss_n_lss`, `%lss_n_p`, `%lss_n_r`, `%lss_n_s`, `%lss_norm`, `%lss_o_lss`, `%lss_o_p`, `%lss_o_r`, `%lss_o_s`, `%lss_ones`, `%lss_r_lss`, `%lss_r_p`, `%lss_r_r`, `%lss_r_s`, `%lss_rand`, `%lss_s`, `%lss_s_lss`, `%lss_s_p`, `%lss_s_r`, `%lss_s_s`, `%lss_size`, `%lss_t`, `%lss_v_lss`, `%lss_v_p`, `%lss_v_r`, `%lss_v_s`, `%lt_i_s`, `%m_n_l`, `%m_o_l`, `%mc_i_h`, `%mc_i_s`, `%mc_i_st`, `%mc_n_st`, `%mc_o_st`, `%mc_string`, `%mps_p`, `%mps_string`, `%msp_a_s`, `%msp_abs`, `%msp_e`, `%msp_find`, `%msp_i_s`, `%msp_i_st`, `%msp_length`, `%msp_m_s`, `%msp_maxi`, `%msp_n_msp`, `%msp_nnz`, `%msp_o_msp`, `%msp_p`, `%msp_sparse`, `%msp_spones`, `%msp_t`, `%p_a_lss`, `%p_a_r`, `%p_c_lss`, `%p_c_r`, `%p_cumprod`, `%p_cumsum`, `%p_d_p`, `%p_d_r`, `%p_d_s`, `%p_det`, `%p_e`, `%p_f_lss`, `%p_f_r`, `%p_grand`, `%p_i_ce`, `%p_i_h`, `%p_i_hm`, `%p_i_lss`, `%p_i_p`, `%p_i_r`, `%p_i_s`, `%p_i_st`, `%p_inv`, `%p_j_s`, `%p_k_p`, `%p_k_r`, `%p_k_s`, `%p_l_lss`, `%p_l_p`, `%p_l_r`, `%p_l_s`, `%p_m_hm`, `%p_m_lss`, `%p_m_r`, `%p_matrix`, `%p_n_l`, `%p_n_lss`, `%p_n_r`, `%p_o_l`, `%p_o_lss`, `%p_o_r`, `%p_o_sp`, `%p_p_s`, `%p_part`, `%p_prod`, `%p_q_p`, `%p_q_r`, `%p_q_s`, `%p_r_lss`, `%p_r_p`, `%p_r_r`, `%p_r_s`, `%p_s_lss`, `%p_s_r`, `%p_simp`, `%p_string`, `%p_sum`, `%p_v_lss`, `%p_v_p`, `%p_v_r`, `%p_v_s`, `%p_x_hm`, `%p_x_r`, `%p_y_p`, `%p_y_r`, `%p_y_s`, `%p_z_p`, `%p_z_r`, `%p_z_s`, `%pcg`, `%plist_p`, `%plist_string`, `%r_0`, `%r_a_hm`, `%r_a_lss`, `%r_a_p`, `%r_a_r`, `%r_a_s`, `%r_c_lss`, `%r_c_p`, `%r_c_r`, `%r_c_s`, `%r_clean`, `%r_cumprod`, `%r_cumsum`, `%r_d_p`, `%r_d_r`, `%r_d_s`, `%r_det`, `%r_diag`, `%r_e`, `%r_eye`, `%r_f_lss`, `%r_f_p`, `%r_f_r`, `%r_f_s`, `%r_i_ce`, `%r_i_hm`, `%r_i_lss`, `%r_i_p`, `%r_i_r`, `%r_i_s`, `%r_i_st`, `%r_inv`, `%r_j_s`, `%r_k_p`, `%r_k_r`, `%r_k_s`, `%r_l_lss`, `%r_l_p`, `%r_l_r`, `%r_l_s`, `%r_m_hm`, `%r_m_lss`, `%r_m_p`, `%r_m_r`, `%r_m_s`, `%r_matrix`, `%r_n_lss`, `%r_n_p`, `%r_n_r`, `%r_n_s`, `%r_norm`, `%r_o_lss`, `%r_o_p`, `%r_o_r`, `%r_o_s`, `%r_ones`, `%r_p`, `%r_p_s`, `%r_prod`, `%r_q_p`, `%r_q_r`, `%r_q_s`, `%r_r_lss`, `%r_r_p`, `%r_r_r`, `%r_r_s`, `%r_rand`, `%r_s`, `%r_s_hm`, `%r_s_lss`, `%r_s_p`, `%r_s_r`, `%r_s_s`, `%r_simp`, `%r_size`, `%r_string`, `%r_sum`, `%r_t`, `%r_tril`, `%r_triu`, `%r_v_lss`, `%r_v_p`, `%r_v_r`, `%r_v_s`, `%r_varn`, `%r_x_p`, `%r_x_r`, `%r_x_s`, `%r_y_p`, `%r_y_r`, `%r_y_s`, `%r_z_p`, `%r_z_r`, `%r_z_s`, `%s_1_hm`, `%s_1_i`, `%s_2_hm`, `%s_2_i`, `%s_3_hm`, `%s_3_i`, `%s_4_hm`, `%s_4_i`, `%s_5`, `%s_a_b`, `%s_a_hm`, `%s_a_i`, `%s_a_ip`, `%s_a_lss`, `%s_a_msp`, `%s_a_r`, `%s_a_sp`, `%s_and`, `%s_b_i`, `%s_b_s`, `%s_bezout`, `%s_c_b`, `%s_c_cblock`, `%s_c_lss`, `%s_c_r`, `%s_c_sp`, `%s_d_b`, `%s_d_i`, `%s_d_p`, `%s_d_r`, `%s_d_sp`, `%s_e`, `%s_f_b`, `%s_f_cblock`, `%s_f_lss`, `%s_f_r`, `%s_f_sp`, `%s_g_b`, `%s_g_s`, `%s_gcd`, `%s_grand`, `%s_h_b`, `%s_h_s`, `%s_i_b`, `%s_i_c`, `%s_i_ce`, `%s_i_h`, `%s_i_hm`, `%s_i_i`, `%s_i_lss`, `%s_i_p`, `%s_i_r`, `%s_i_s`, `%s_i_sp`, `%s_i_spb`, `%s_i_st`, `%s_j_i`, `%s_k_hm`, `%s_k_p`, `%s_k_r`, `%s_k_sp`, `%s_l_b`, `%s_l_hm`, `%s_l_i`, `%s_l_lss`, `%s_l_p`, `%s_l_r`, `%s_l_s`, `%s_l_sp`, `%s_lcm`, `%s_m_b`, `%s_m_hm`, `%s_m_i`, `%s_m_ip`, `%s_m_lss`, `%s_m_msp`, `%s_m_r`, `%s_matrix`, `%s_n_hm`, `%s_n_i`, `%s_n_l`, `%s_n_lss`, `%s_n_r`, `%s_n_st`, `%s_o_hm`, `%s_o_i`, `%s_o_l`, `%s_o_lss`, `%s_o_r`, `%s_o_st`, `%s_or`, `%s_p_b`, `%s_p_i`, `%s_pow`, `%s_q_hm`, `%s_q_i`, `%s_q_p`, `%s_q_r`, `%s_q_sp`, `%s_r_b`, `%s_r_i`, `%s_r_lss`, `%s_r_p`, `%s_r_r`, `%s_r_s`, `%s_r_sp`, `%s_s_b`, `%s_s_hm`, `%s_s_i`, `%s_s_ip`, `%s_s_lss`, `%s_s_r`, `%s_s_sp`, `%s_simp`, `%s_v_lss`, `%s_v_p`, `%s_v_r`, `%s_v_s`, `%s_x_b`, `%s_x_hm`, `%s_x_i`, `%s_x_r`, `%s_y_p`, `%s_y_r`, `%s_y_sp`, `%s_z_p`, `%s_z_r`, `%s_z_sp`, `%sn`, `%sp_a_s`, `%sp_a_sp`, `%sp_and`, `%sp_c_s`, `%sp_ceil`, `%sp_conj`, `%sp_cos`, `%sp_cumprod`, `%sp_cumsum`, `%sp_d_s`, `%sp_d_sp`, `%sp_det`, `%sp_diag`, `%sp_e`, `%sp_exp`, `%sp_f_s`, `%sp_floor`, `%sp_grand`, `%sp_gsort`, `%sp_i_ce`, `%sp_i_h`, `%sp_i_s`, `%sp_i_sp`, `%sp_i_st`, `%sp_int`, `%sp_inv`, `%sp_k_s`, `%sp_k_sp`, `%sp_l_s`, `%sp_l_sp`, `%sp_length`, `%sp_max`, `%sp_min`, `%sp_norm`, `%sp_or`, `%sp_p_s`, `%sp_prod`, `%sp_q_s`, `%sp_q_sp`, `%sp_r_s`, `%sp_r_sp`, `%sp_round`, `%sp_s_s`, `%sp_s_sp`, `%sp_sin`, `%sp_sqrt`, `%sp_string`, `%sp_sum`, `%sp_tril`, `%sp_triu`, `%sp_y_s`, `%sp_y_sp`, `%sp_z_s`, `%sp_z_sp`, `%spb_and`, `%spb_c_b`, `%spb_cumprod`, `%spb_cumsum`, `%spb_diag`, `%spb_e`, `%spb_f_b`, `%spb_g_b`, `%spb_g_spb`, `%spb_h_b`, `%spb_h_spb`, `%spb_i_b`, `%spb_i_ce`, `%spb_i_h`, `%spb_i_st`, `%spb_or`, `%spb_prod`, `%spb_sum`, `%spb_tril`, `%spb_triu`, `%st_6`, `%st_c_st`, `%st_e`, `%st_f_st`, `%st_i_b`, `%st_i_c`, `%st_i_fptr`, `%st_i_h`, `%st_i_i`, `%st_i_ip`, `%st_i_lss`, `%st_i_msp`, `%st_i_p`, `%st_i_r`, `%st_i_s`, `%st_i_sp`, `%st_i_spb`, `%st_i_st`, `%st_matrix`, `%st_n_c`, `%st_n_l`, `%st_n_mc`, `%st_n_p`, `%st_n_s`, `%st_o_c`, `%st_o_l`, `%st_o_mc`, `%st_o_p`, `%st_o_s`, `%st_o_tl`, `%st_p`, `%st_size`, `%st_string`, `%st_t`, `%ticks_i_h`, `%xls_e`, `%xls_p`, `%xlssheet_e`, `%xlssheet_p`, `%xlssheet_size`, `%xlssheet_string`, `DominationRank`, `G_make`, `IsAScalar`, `NDcost`, `OS_Version`, `PlotSparse`, `ReadHBSparse`, `TCL_CreateSlave`, `abcd`, `abinv`, `accept_func_default`, `accept_func_vfsa`, `acf`, `acosd`, `acosh`, `acoshm`, `acosm`, `acot`, `acotd`, `acoth`, `acsc`, `acscd`, `acsch`, `add_demo`, `add_help_chapter`, `add_module_help_chapter`, `add_param`, `add_profiling`, `adj2sp`, `aff2ab`, `ana_style`, `analpf`, `analyze`, `aplat`, `arhnk`, `arl2`, `arma2p`, `arma2ss`, `armac`, `armax`, `armax1`, `arobasestring2strings`, `arsimul`, `ascii2string`, `asciimat`, `asec`, `asecd`, `asech`, `asind`, `asinh`, `asinhm`, `asinm`, `assert_checkalmostequal`, `assert_checkequal`, `assert_checkerror`, `assert_checkfalse`, `assert_checkfilesequal`, `assert_checktrue`, `assert_comparecomplex`, `assert_computedigits`, `assert_cond2reltol`, `assert_cond2reqdigits`, `assert_generror`, `atand`, `atanh`, `atanhm`, `atanm`, `atomsAutoload`, `atomsAutoloadAdd`, `atomsAutoloadDel`, `atomsAutoloadList`, `atomsCategoryList`, `atomsCheckModule`, `atomsDepTreeShow`, `atomsGetConfig`, `atomsGetInstalled`, `atomsGetInstalledPath`, `atomsGetLoaded`, `atomsGetLoadedPath`, `atomsInstall`, `atomsIsInstalled`, `atomsIsLoaded`, `atomsList`, `atomsLoad`, `atomsQuit`, `atomsRemove`, `atomsRepositoryAdd`, `atomsRepositoryDel`, `atomsRepositoryList`, `atomsRestoreConfig`, `atomsSaveConfig`, `atomsSearch`, `atomsSetConfig`, `atomsShow`, `atomsSystemInit`, `atomsSystemUpdate`, `atomsTest`, `atomsUpdate`, `atomsVersion`, `augment`, `auread`, `auwrite`, `balreal`, `bench_run`, `bilin`, `bilt`, `bin2dec`, `binomial`, `bitand`, `bitcmp`, `bitget`, `bitor`, `bitset`, `bitxor`, `black`, `blanks`, `bloc2exp`, `bloc2ss`, `block_parameter_error`, `bode`, `bode_asymp`, `bstap`, `buttmag`, `bvodeS`, `bytecode`, `bytecodewalk`, `cainv`, `calendar`, `calerf`, `calfrq`, `canon`, `casc`, `cat`, `cat_code`, `cb_m2sci_gui`, `ccontrg`, `cell`, `cell2mat`, `cellstr`, `center`, `cepstrum`, `cfspec`, `char`, `chart`, `cheb1mag`, `cheb2mag`, `check_gateways`, `check_modules_xml`, `check_versions`, `chepol`, `chfact`, `chsolve`, `classmarkov`, `clean_help`, `clock`, `cls2dls`, `cmb_lin`, `cmndred`, `cmoment`, `coding_ga_binary`, `coding_ga_identity`, `coff`, `coffg`, `colcomp`, `colcompr`, `colinout`, `colregul`, `companion`, `complex`, `compute_initial_temp`, `cond`, `cond2sp`, `condestsp`, `configure_msifort`, `configure_msvc`, `conjgrad`, `cont_frm`, `cont_mat`, `contrss`, `conv`, `convert_to_float`, `convertindex`, `convol`, `convol2d`, `copfac`, `correl`, `cosd`, `cosh`, `coshm`, `cosm`, `cotd`, `cotg`, `coth`, `cothm`, `cov`, `covar`, `createXConfiguration`, `createfun`, `createstruct`, `cross`, `crossover_ga_binary`, `crossover_ga_default`, `csc`, `cscd`, `csch`, `csgn`, `csim`, `cspect`, `ctr_gram`, `czt`, `dae`, `daeoptions`, `damp`, `datafit`, `date`, `datenum`, `datevec`, `dbphi`, `dcf`, `ddp`, `dec2bin`, `dec2hex`, `dec2oct`, `del_help_chapter`, `del_module_help_chapter`, `demo_begin`, `demo_choose`, `demo_compiler`, `demo_end`, `demo_file_choice`, `demo_folder_choice`, `demo_function_choice`, `demo_gui`, `demo_run`, `demo_viewCode`, `denom`, `derivat`, `derivative`, `des2ss`, `des2tf`, `detectmsifort64tools`, `detectmsvc64tools`, `determ`, `detr`, `detrend`, `devtools_run_builder`, `dhnorm`, `diff`, `diophant`, `dir`, `dirname`, `dispfiles`, `dllinfo`, `dscr`, `dsimul`, `dt_ility`, `dtsi`, `edit`, `edit_error`, `editor`, `eigenmarkov`, `eigs`, `ell1mag`, `enlarge_shape`, `entropy`, `eomday`, `epred`, `eqfir`, `eqiir`, `equil`, `equil1`, `erfinv`, `etime`, `eval`, `evans`, `evstr`, `example_run`, `expression2code`, `extract_help_examples`, `factor`, `factorial`, `factors`, `faurre`, `ffilt`, `fft2`, `fftshift`, `fieldnames`, `filt_sinc`, `filter`, `findABCD`, `findAC`, `findBDK`, `findR`, `find_freq`, `find_links`, `find_scicos_version`, `findm`, `findmsifortcompiler`, `findmsvccompiler`, `findx0BD`, `firstnonsingleton`, `fix`, `fixedpointgcd`, `flipdim`, `flts`, `fminsearch`, `formatBlackTip`, `formatBodeMagTip`, `formatBodePhaseTip`, `formatGainplotTip`, `formatHallModuleTip`, `formatHallPhaseTip`, `formatNicholsGainTip`, `formatNicholsPhaseTip`, `formatNyquistTip`, `formatPhaseplotTip`, `formatSgridDampingTip`, `formatSgridFreqTip`, `formatZgridDampingTip`, `formatZgridFreqTip`, `format_txt`, `fourplan`, `frep2tf`, `freson`, `frfit`, `frmag`, `fseek_origin`, `fsfirlin`, `fspec`, `fspecg`, `fstabst`, `ftest`, `ftuneq`, `fullfile`, `fullrf`, `fullrfk`, `fun2string`, `g_margin`, `gainplot`, `gamitg`, `gcare`, `gcd`, `gencompilationflags_unix`, `generateBlockImage`, `generateBlockImages`, `generic_i_ce`, `generic_i_h`, `generic_i_hm`, `generic_i_s`, `generic_i_st`, `genlib`, `genmarkov`, `geomean`, `getDiagramVersion`, `getModelicaPath`, `getPreferencesValue`, `get_file_path`, `get_function_path`, `get_param`, `get_profile`, `get_scicos_version`, `getd`, `getscilabkeywords`, `getshell`, `gettklib`, `gfare`, `gfrancis`, `givens`, `glever`, `gmres`, `group`, `gschur`, `gspec`, `gtild`, `h2norm`, `h_cl`, `h_inf`, `h_inf_st`, `h_norm`, `hallchart`, `halt`, `hank`, `hankelsv`, `harmean`, `haveacompiler`, `head_comments`, `help_from_sci`, `help_skeleton`, `hermit`, `hex2dec`, `hilb`, `hilbert`, `histc`, `horner`, `householder`, `hrmt`, `htrianr`, `hypermat`, `idct`, `idst`, `ifft`, `ifftshift`, `iir`, `iirgroup`, `iirlp`, `iirmod`, `ilib_build`, `ilib_build_jar`, `ilib_compile`, `ilib_for_link`, `ilib_gen_Make`, `ilib_gen_Make_unix`, `ilib_gen_cleaner`, `ilib_gen_gateway`, `ilib_gen_loader`, `ilib_include_flag`, `ilib_mex_build`, `im_inv`, `importScicosDiagram`, `importScicosPal`, `importXcosDiagram`, `imrep2ss`, `ind2sub`, `inistate`, `init_ga_default`, `init_param`, `initial_scicos_tables`, `input`, `instruction2code`, `intc`, `intdec`, `integrate`, `interp1`, `interpln`, `intersect`, `intl`, `intsplin`, `inttrap`, `inv_coeff`, `invr`, `invrs`, `invsyslin`, `iqr`, `isLeapYear`, `is_absolute_path`, `is_param`, `iscell`, `iscellstr`, `iscolumn`, `isempty`, `isfield`, `isinf`, `ismatrix`, `isnan`, `isrow`, `isscalar`, `issparse`, `issquare`, `isstruct`, `isvector`, `jmat`, `justify`, `kalm`, `karmarkar`, `kernel`, `kpure`, `krac2`, `kroneck`, `lattn`, `lattp`, `launchtest`, `lcf`, `lcm`, `lcmdiag`, `leastsq`, `leqe`, `leqr`, `lev`, `levin`, `lex_sort`, `lft`, `lin`, `lin2mu`, `lincos`, `lindquist`, `linf`, `linfn`, `linsolve`, `linspace`, `list2vec`, `list_param`, `listfiles`, `listfunctions`, `listvarinfile`, `lmisolver`, `lmitool`, `loadXcosLibs`, `loadmatfile`, `loadwave`, `log10`, `log2`, `logm`, `logspace`, `lqe`, `lqg`, `lqg2stan`, `lqg_ltr`, `lqr`, `ls`, `lyap`, `m2sci_gui`, `m_circle`, `macglov`, `macrovar`, `mad`, `makecell`, `manedit`, `mapsound`, `markp2ss`, `matfile2sci`, `mdelete`, `mean`, `meanf`, `median`, `members`, `mese`, `meshgrid`, `mfft`, `mfile2sci`, `minreal`, `minss`, `mkdir`, `modulo`, `moment`, `mrfit`, `msd`, `mstr2sci`, `mtlb`, `mtlb_0`, `mtlb_a`, `mtlb_all`, `mtlb_any`, `mtlb_axes`, `mtlb_axis`, `mtlb_beta`, `mtlb_box`, `mtlb_choices`, `mtlb_close`, `mtlb_colordef`, `mtlb_cond`, `mtlb_cov`, `mtlb_cumprod`, `mtlb_cumsum`, `mtlb_dec2hex`, `mtlb_delete`, `mtlb_diag`, `mtlb_diff`, `mtlb_dir`, `mtlb_double`, `mtlb_e`, `mtlb_echo`, `mtlb_error`, `mtlb_eval`, `mtlb_exist`, `mtlb_eye`, `mtlb_false`, `mtlb_fft`, `mtlb_fftshift`, `mtlb_filter`, `mtlb_find`, `mtlb_findstr`, `mtlb_fliplr`, `mtlb_fopen`, `mtlb_format`, `mtlb_fprintf`, `mtlb_fread`, `mtlb_fscanf`, `mtlb_full`, `mtlb_fwrite`, `mtlb_get`, `mtlb_grid`, `mtlb_hold`, `mtlb_i`, `mtlb_ifft`, `mtlb_image`, `mtlb_imp`, `mtlb_int16`, `mtlb_int32`, `mtlb_int8`, `mtlb_is`, `mtlb_isa`, `mtlb_isfield`, `mtlb_isletter`, `mtlb_isspace`, `mtlb_l`, `mtlb_legendre`, `mtlb_linspace`, `mtlb_logic`, `mtlb_logical`, `mtlb_loglog`, `mtlb_lower`, `mtlb_max`, `mtlb_mean`, `mtlb_median`, `mtlb_mesh`, `mtlb_meshdom`, `mtlb_min`, `mtlb_more`, `mtlb_num2str`, `mtlb_ones`, `mtlb_pcolor`, `mtlb_plot`, `mtlb_prod`, `mtlb_qr`, `mtlb_qz`, `mtlb_rand`, `mtlb_randn`, `mtlb_rcond`, `mtlb_realmax`, `mtlb_realmin`, `mtlb_s`, `mtlb_semilogx`, `mtlb_semilogy`, `mtlb_setstr`, `mtlb_size`, `mtlb_sort`, `mtlb_sortrows`, `mtlb_sprintf`, `mtlb_sscanf`, `mtlb_std`, `mtlb_strcmp`, `mtlb_strcmpi`, `mtlb_strfind`, `mtlb_strrep`, `mtlb_subplot`, `mtlb_sum`, `mtlb_t`, `mtlb_toeplitz`, `mtlb_tril`, `mtlb_triu`, `mtlb_true`, `mtlb_type`, `mtlb_uint16`, `mtlb_uint32`, `mtlb_uint8`, `mtlb_upper`, `mtlb_var`, `mtlb_zeros`, `mu2lin`, `mutation_ga_binary`, `mutation_ga_default`, `mvcorrel`, `mvvacov`, `nancumsum`, `nand2mean`, `nanmax`, `nanmean`, `nanmeanf`, `nanmedian`, `nanmin`, `nanreglin`, `nanstdev`, `nansum`, `narsimul`, `ndgrid`, `ndims`, `nehari`, `neigh_func_csa`, `neigh_func_default`, `neigh_func_fsa`, `neigh_func_vfsa`, `neldermead_cget`, `neldermead_configure`, `neldermead_costf`, `neldermead_defaultoutput`, `neldermead_destroy`, `neldermead_function`, `neldermead_get`, `neldermead_log`, `neldermead_new`, `neldermead_restart`, `neldermead_search`, `neldermead_updatesimp`, `nextpow2`, `nfreq`, `nicholschart`, `nlev`, `nmplot_cget`, `nmplot_configure`, `nmplot_contour`, `nmplot_destroy`, `nmplot_function`, `nmplot_get`, `nmplot_historyplot`, `nmplot_log`, `nmplot_new`, `nmplot_outputcmd`, `nmplot_restart`, `nmplot_search`, `nmplot_simplexhistory`, `noisegen`, `nonreg_test_run`, `now`, `nthroot`, `null`, `num2cell`, `numderivative`, `numdiff`, `numer`, `nyquist`, `nyquistfrequencybounds`, `obs_gram`, `obscont`, `observer`, `obsv_mat`, `obsvss`, `oct2dec`, `odeoptions`, `optim_ga`, `optim_moga`, `optim_nsga`, `optim_nsga2`, `optim_sa`, `optimbase_cget`, `optimbase_checkbounds`, `optimbase_checkcostfun`, `optimbase_checkx0`, `optimbase_configure`, `optimbase_destroy`, `optimbase_function`, `optimbase_get`, `optimbase_hasbounds`, `optimbase_hasconstraints`, `optimbase_hasnlcons`, `optimbase_histget`, `optimbase_histset`, `optimbase_incriter`, `optimbase_isfeasible`, `optimbase_isinbounds`, `optimbase_isinnonlincons`, `optimbase_log`, `optimbase_logshutdown`, `optimbase_logstartup`, `optimbase_new`, `optimbase_outputcmd`, `optimbase_outstruct`, `optimbase_proj2bnds`, `optimbase_set`, `optimbase_stoplog`, `optimbase_terminate`, `optimget`, `optimplotfunccount`, `optimplotfval`, `optimplotx`, `optimset`, `optimsimplex_center`, `optimsimplex_check`, `optimsimplex_compsomefv`, `optimsimplex_computefv`, `optimsimplex_deltafv`, `optimsimplex_deltafvmax`, `optimsimplex_destroy`, `optimsimplex_dirmat`, `optimsimplex_fvmean`, `optimsimplex_fvstdev`, `optimsimplex_fvvariance`, `optimsimplex_getall`, `optimsimplex_getallfv`, `optimsimplex_getallx`, `optimsimplex_getfv`, `optimsimplex_getn`, `optimsimplex_getnbve`, `optimsimplex_getve`, `optimsimplex_getx`, `optimsimplex_gradientfv`, `optimsimplex_log`, `optimsimplex_new`, `optimsimplex_reflect`, `optimsimplex_setall`, `optimsimplex_setallfv`, `optimsimplex_setallx`, `optimsimplex_setfv`, `optimsimplex_setn`, `optimsimplex_setnbve`, `optimsimplex_setve`, `optimsimplex_setx`, `optimsimplex_shrink`, `optimsimplex_size`, `optimsimplex_sort`, `optimsimplex_xbar`, `orth`, `output_ga_default`, `output_moga_default`, `output_nsga2_default`, `output_nsga_default`, `p_margin`, `pack`, `pareto_filter`, `parrot`, `pbig`, `pca`, `pcg`, `pdiv`, `pen2ea`, `pencan`, `pencost`, `penlaur`, `perctl`, `perl`, `perms`, `permute`, `pertrans`, `pfactors`, `pfss`, `phasemag`, `phaseplot`, `phc`, `pinv`, `playsnd`, `plotprofile`, `plzr`, `pmodulo`, `pol2des`, `pol2str`, `polar`, `polfact`, `prbs_a`, `prettyprint`, `primes`, `princomp`, `profile`, `proj`, `projsl`, `projspec`, `psmall`, `pspect`, `qmr`, `qpsolve`, `quart`, `quaskro`, `rafiter`, `randpencil`, `range`, `rank`, `readxls`, `recompilefunction`, `recons`, `reglin`, `regress`, `remezb`, `remove_param`, `remove_profiling`, `repfreq`, `replace_Ix_by_Fx`, `repmat`, `reset_profiling`, `resize_matrix`, `returntoscilab`, `rhs2code`, `ric_desc`, `riccati`, `rmdir`, `routh_t`, `rowcomp`, `rowcompr`, `rowinout`, `rowregul`, `rowshuff`, `rref`, `sample`, `samplef`, `samwr`, `savematfile`, `savewave`, `scanf`, `sci2exp`, `sciGUI_init`, `sci_sparse`, `scicos_getvalue`, `scicos_simulate`, `scicos_workspace_init`, `scisptdemo`, `scitest`, `sdiff`, `sec`, `secd`, `sech`, `selection_ga_elitist`, `selection_ga_random`, `sensi`, `setPreferencesValue`, `set_param`, `setdiff`, `sgrid`, `show_margins`, `show_pca`, `showprofile`, `signm`, `sinc`, `sincd`, `sind`, `sinh`, `sinhm`, `sinm`, `sm2des`, `sm2ss`, `smga`, `smooth`, `solve`, `sound`, `soundsec`, `sp2adj`, `spaninter`, `spanplus`, `spantwo`, `specfact`, `speye`, `sprand`, `spzeros`, `sqroot`, `sqrtm`, `squarewave`, `squeeze`, `srfaur`, `srkf`, `ss2des`, `ss2ss`, `ss2tf`, `sskf`, `ssprint`, `ssrand`, `st_deviation`, `st_i_generic`, `st_ility`, `stabil`, `statgain`, `stdev`, `stdevf`, `steadycos`, `strange`, `strcmpi`, `struct`, `sub2ind`, `sva`, `svplot`, `sylm`, `sylv`, `sysconv`, `sysdiag`, `sysfact`, `syslin`, `syssize`, `system`, `systmat`, `tabul`, `tand`, `tanh`, `tanhm`, `tanm`, `tbx_build_blocks`, `tbx_build_cleaner`, `tbx_build_gateway`, `tbx_build_gateway_clean`, `tbx_build_gateway_loader`, `tbx_build_help`, `tbx_build_help_loader`, `tbx_build_loader`, `tbx_build_localization`, `tbx_build_macros`, `tbx_build_pal_loader`, `tbx_build_src`, `tbx_builder`, `tbx_builder_gateway`, `tbx_builder_gateway_lang`, `tbx_builder_help`, `tbx_builder_help_lang`, `tbx_builder_macros`, `tbx_builder_src`, `tbx_builder_src_lang`, `tbx_generate_pofile`, `temp_law_csa`, `temp_law_default`, `temp_law_fsa`, `temp_law_huang`, `temp_law_vfsa`, `test_clean`, `test_on_columns`, `test_run`, `test_run_level`, `testexamples`, `tf2des`, `tf2ss`, `thrownan`, `tic`, `time_id`, `toc`, `toeplitz`, `tokenpos`, `toolboxes`, `trace`, `trans`, `translatepaths`, `tree2code`, `trfmod`, `trianfml`, `trimmean`, `trisolve`, `trzeros`, `typeof`, `ui_observer`, `union`, `unique`, `unit_test_run`, `unix_g`, `unix_s`, `unix_w`, `unix_x`, `unobs`, `unpack`, `unwrap`, `variance`, `variancef`, `vec2list`, `vectorfind`, `ver`, `warnobsolete`, `wavread`, `wavwrite`, `wcenter`, `weekday`, `wfir`, `wfir_gui`, `whereami`, `who_user`, `whos`, `wiener`, `wigner`, `window`, `winlist`, `with_javasci`, `with_macros_source`, `with_modelica_compiler`, `with_tk`, `xcorr`, `xcosBlockEval`, `xcosBlockInterface`, `xcosCodeGeneration`, `xcosConfigureModelica`, `xcosPal`, `xcosPalAdd`, `xcosPalAddBlock`, `xcosPalExport`, `xcosPalGenerateAllIcons`, `xcosShowBlockWarning`, `xcosValidateBlockSet`, `xcosValidateCompareBlock`, `xcos_compile`, `xcos_debug_gui`, `xcos_run`, `xcos_simulate`, `xcov`, `xmltochm`, `xmltoformat`, `xmltohtml`, `xmltojar`, `xmltopdf`, `xmltops`, `xmltoweb`, `yulewalk`, `zeropen`, `zgrid`, `zpbutt`, `zpch1`, `zpch2`, `zpell`), NameBuiltin, nil}, + {Words(``, `\b`, `$`, `%F`, `%T`, `%e`, `%eps`, `%f`, `%fftw`, `%gui`, `%i`, `%inf`, `%io`, `%modalWarning`, `%nan`, `%pi`, `%s`, `%t`, `%tk`, `%toolboxes`, `%toolboxes_dir`, `%z`, `PWD`, `SCI`, `SCIHOME`, `TMPDIR`, `arnoldilib`, `assertlib`, `atomslib`, `cacsdlib`, `compatibility_functilib`, `corelib`, `data_structureslib`, `demo_toolslib`, `development_toolslib`, `differential_equationlib`, `dynamic_linklib`, `elementary_functionslib`, `enull`, `evoid`, `external_objectslib`, `fd`, `fileiolib`, `functionslib`, `genetic_algorithmslib`, `helptoolslib`, `home`, `integerlib`, `interpolationlib`, `iolib`, `jnull`, `jvoid`, `linear_algebralib`, `m2scilib`, `matiolib`, `modules_managerlib`, `neldermeadlib`, `optimbaselib`, `optimizationlib`, `optimsimplexlib`, `output_streamlib`, `overloadinglib`, `parameterslib`, `polynomialslib`, `preferenceslib`, `randliblib`, `scicos_autolib`, `scicos_utilslib`, `scinoteslib`, `signal_processinglib`, `simulated_annealinglib`, `soundlib`, `sparselib`, `special_functionslib`, `spreadsheetlib`, `statisticslib`, `stringlib`, `tclscilib`, `timelib`, `umfpacklib`, `xcoslib`), NameConstant, nil}, + {`-|==|~=|<|>|<=|>=|&&|&|~|\|\|?`, Operator, nil}, + {`\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\`, Operator, nil}, + {`[\[\](){}@.,=:;]`, Punctuation, nil}, + {`"[^"]*"`, LiteralString, nil}, + {`(?<=[\w)\].])\'+`, Operator, nil}, + {`(?)`, ByGroups(Text, Keyword, Text, Text), nil}, + Include("squeak fileout"), + Include("whitespaces"), + Include("method definition"), + {`(\|)([\w\s]*)(\|)`, ByGroups(Operator, NameVariable, Operator), nil}, + Include("objects"), + {`\^|:=|_`, Operator, nil}, + {`[\]({}.;!]`, Text, nil}, + }, + "method definition": { + {`([a-zA-Z]+\w*:)(\s*)(\w+)`, ByGroups(NameFunction, Text, NameVariable), nil}, + {`^(\b[a-zA-Z]+\w*\b)(\s*)$`, ByGroups(NameFunction, Text), nil}, + {`^([-+*/\\~<>=|&!?,@%]+)(\s*)(\w+)(\s*)$`, ByGroups(NameFunction, Text, NameVariable, Text), nil}, + }, + "blockvariables": { + Include("whitespaces"), + {`(:)(\s*)(\w+)`, ByGroups(Operator, Text, NameVariable), nil}, + {`\|`, Operator, Pop(1)}, + Default(Pop(1)), + }, + "literals": { + {`'(''|[^'])*'`, LiteralString, Push("afterobject")}, + {`\$.`, LiteralStringChar, Push("afterobject")}, + {`#\(`, LiteralStringSymbol, Push("parenth")}, + {`\)`, Text, Push("afterobject")}, + {`(\d+r)?-?\d+(\.\d+)?(e-?\d+)?`, LiteralNumber, Push("afterobject")}, + }, + "_parenth_helper": { + Include("whitespaces"), + {`(\d+r)?-?\d+(\.\d+)?(e-?\d+)?`, LiteralNumber, nil}, + {`[-+*/\\~<>=|&#!?,@%\w:]+`, LiteralStringSymbol, nil}, + {`'(''|[^'])*'`, LiteralString, nil}, + {`\$.`, LiteralStringChar, nil}, + {`#*\(`, LiteralStringSymbol, Push("inner_parenth")}, + }, + "parenth": { + {`\)`, LiteralStringSymbol, Push("root", "afterobject")}, + Include("_parenth_helper"), + }, + "inner_parenth": { + {`\)`, LiteralStringSymbol, Pop(1)}, + Include("_parenth_helper"), + }, + "whitespaces": { + {`\s+`, Text, nil}, + {`"(""|[^"])*"`, Comment, nil}, + }, + "objects": { + {`\[`, Text, Push("blockvariables")}, + {`\]`, Text, Push("afterobject")}, + {`\b(self|super|true|false|nil|thisContext)\b`, NameBuiltinPseudo, Push("afterobject")}, + {`\b[A-Z]\w*(?!:)\b`, NameClass, Push("afterobject")}, + {`\b[a-z]\w*(?!:)\b`, NameVariable, Push("afterobject")}, + {`#("(""|[^"])*"|[-+*/\\~<>=|&!?,@%]+|[\w:]+)`, LiteralStringSymbol, Push("afterobject")}, + Include("literals"), + }, + "afterobject": { + {`! !$`, Keyword, Pop(1)}, + Include("whitespaces"), + {`\b(ifTrue:|ifFalse:|whileTrue:|whileFalse:|timesRepeat:)`, NameBuiltin, Pop(1)}, + {`\b(new\b(?!:))`, NameBuiltin, nil}, + {`:=|_`, Operator, Pop(1)}, + {`\b[a-zA-Z]+\w*:`, NameFunction, Pop(1)}, + {`\b[a-zA-Z]+\w*`, NameFunction, nil}, + {`\w+:?|[-+*/\\~<>=|&!?,@%]+`, NameFunction, Pop(1)}, + {`\.`, Punctuation, Pop(1)}, + {`;`, Punctuation, nil}, + {`[\])}]`, Text, nil}, + {`[\[({]`, Text, Pop(1)}, + }, + "squeak fileout": { + {`^"(""|[^"])*"!`, Keyword, nil}, + {`^'(''|[^'])*'!`, Keyword, nil}, + {`^(!)(\w+)( commentStamp: )(.*?)( prior: .*?!\n)(.*?)(!)`, ByGroups(Keyword, NameClass, Keyword, LiteralString, Keyword, Text, Keyword), nil}, + {`^(!)(\w+(?: class)?)( methodsFor: )('(?:''|[^'])*')(.*?!)`, ByGroups(Keyword, NameClass, Keyword, LiteralString, Keyword), nil}, + {`^(\w+)( subclass: )(#\w+)(\s+instanceVariableNames: )(.*?)(\s+classVariableNames: )(.*?)(\s+poolDictionaries: )(.*?)(\s+category: )(.*?)(!)`, ByGroups(NameClass, Keyword, LiteralStringSymbol, Keyword, LiteralString, Keyword, LiteralString, Keyword, LiteralString, Keyword, LiteralString, Keyword), nil}, + {`^(\w+(?: class)?)(\s+instanceVariableNames: )(.*?)(!)`, ByGroups(NameClass, Keyword, LiteralString, Keyword), nil}, + {`(!\n)(\].*)(! !)$`, ByGroups(Keyword, Text, Keyword), nil}, + {`! !$`, Keyword, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/smarty.go b/vendor/github.com/alecthomas/chroma/lexers/smarty.go new file mode 100644 index 0000000..1e3f044 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/smarty.go @@ -0,0 +1,38 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Smarty lexer. +var Smarty = Register(MustNewLexer( + &Config{ + Name: "Smarty", + Aliases: []string{"smarty"}, + Filenames: []string{"*.tpl"}, + MimeTypes: []string{"application/x-smarty"}, + DotAll: true, + }, + Rules{ + "root": { + {`[^{]+`, Other, nil}, + {`(\{)(\*.*?\*)(\})`, ByGroups(CommentPreproc, Comment, CommentPreproc), nil}, + {`(\{php\})(.*?)(\{/php\})`, ByGroups(CommentPreproc, Using(PHP, nil), CommentPreproc), nil}, + {`(\{)(/?[a-zA-Z_]\w*)(\s*)`, ByGroups(CommentPreproc, NameFunction, Text), Push("smarty")}, + {`\{`, CommentPreproc, Push("smarty")}, + }, + "smarty": { + {`\s+`, Text, nil}, + {`\{`, CommentPreproc, Push()}, + {`\}`, CommentPreproc, Pop(1)}, + {`#[a-zA-Z_]\w*#`, NameVariable, nil}, + {`\$[a-zA-Z_]\w*(\.\w+)*`, NameVariable, nil}, + {`[~!%^&*()+=|\[\]:;,.<>/?@-]`, Operator, nil}, + {`(true|false|null)\b`, KeywordConstant, nil}, + {`[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`[a-zA-Z_]\w*`, NameAttribute, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/snobol.go b/vendor/github.com/alecthomas/chroma/lexers/snobol.go new file mode 100644 index 0000000..698e1e6 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/snobol.go @@ -0,0 +1,47 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Snobol lexer. +var Snobol = Register(MustNewLexer( + &Config{ + Name: "Snobol", + Aliases: []string{"snobol"}, + Filenames: []string{"*.snobol"}, + MimeTypes: []string{"text/x-snobol"}, + }, + Rules{ + "root": { + {`\*.*\n`, Comment, nil}, + {`[+.] `, Punctuation, Push("statement")}, + {`-.*\n`, Comment, nil}, + {`END\s*\n`, NameLabel, Push("heredoc")}, + {`[A-Za-z$][\w$]*`, NameLabel, Push("statement")}, + {`\s+`, Text, Push("statement")}, + }, + "statement": { + {`\s*\n`, Text, Pop(1)}, + {`\s+`, Text, nil}, + {`(?<=[^\w.])(LT|LE|EQ|NE|GE|GT|INTEGER|IDENT|DIFFER|LGT|SIZE|REPLACE|TRIM|DUPL|REMDR|DATE|TIME|EVAL|APPLY|OPSYN|LOAD|UNLOAD|LEN|SPAN|BREAK|ANY|NOTANY|TAB|RTAB|REM|POS|RPOS|FAIL|FENCE|ABORT|ARB|ARBNO|BAL|SUCCEED|INPUT|OUTPUT|TERMINAL)(?=[^\w.])`, NameBuiltin, nil}, + {`[A-Za-z][\w.]*`, Name, nil}, + {`\*\*|[?$.!%*/#+\-@|&\\=]`, Operator, nil}, + {`"[^"]*"`, LiteralString, nil}, + {`'[^']*'`, LiteralString, nil}, + {`[0-9]+(?=[^.EeDd])`, LiteralNumberInteger, nil}, + {`[0-9]+(\.[0-9]*)?([EDed][-+]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`:`, Punctuation, Push("goto")}, + {`[()<>,;]`, Punctuation, nil}, + }, + "goto": { + {`\s*\n`, Text, Pop(2)}, + {`\s+`, Text, nil}, + {`F|S`, Keyword, nil}, + {`(\()([A-Za-z][\w.]*)(\))`, ByGroups(Punctuation, NameLabel, Punctuation), nil}, + }, + "heredoc": { + {`.*\n`, LiteralStringHeredoc, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/sparql.go b/vendor/github.com/alecthomas/chroma/lexers/sparql.go new file mode 100644 index 0000000..97c1a3c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/sparql.go @@ -0,0 +1,68 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Sparql lexer. +var Sparql = Register(MustNewLexer( + &Config{ + Name: "SPARQL", + Aliases: []string{"sparql"}, + Filenames: []string{"*.rq", "*.sparql"}, + MimeTypes: []string{"application/sparql-query"}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`((?i)select|construct|describe|ask|where|filter|group\s+by|minus|distinct|reduced|from\s+named|from|order\s+by|desc|asc|limit|offset|bindings|load|clear|drop|create|add|move|copy|insert\s+data|delete\s+data|delete\s+where|delete|insert|using\s+named|using|graph|default|named|all|optional|service|silent|bind|union|not\s+in|in|as|having|to|prefix|base)\b`, Keyword, nil}, + {`(a)\b`, Keyword, nil}, + {"(<(?:[^<>\"{}|^`\\\\\\x00-\\x20])*>)", NameLabel, nil}, + {`(_:[0-9a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_](?:[a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_\-0-9·̀-ͯ‿-⁀.]*[a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_\-0-9·̀-ͯ‿-⁀])?)`, NameLabel, nil}, + {`[?$][0-9a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_][a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9·̀-ͯ‿-⁀]*`, NameVariable, nil}, + {`([a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�](?:[a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_\-0-9·̀-ͯ‿-⁀.]*[a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_\-0-9·̀-ͯ‿-⁀])?)?(\:)((?:[a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_:0-9]|(?:%[0-9A-Fa-f][0-9A-Fa-f])|(?:\\[ _~.\-!$&"()*+,;=/?#@%]))(?:(?:[a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_\-0-9·̀-ͯ‿-⁀.:]|(?:%[0-9A-Fa-f][0-9A-Fa-f])|(?:\\[ _~.\-!$&"()*+,;=/?#@%]))*(?:[a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_\-0-9·̀-ͯ‿-⁀:]|(?:%[0-9A-Fa-f][0-9A-Fa-f])|(?:\\[ _~.\-!$&"()*+,;=/?#@%])))?)?`, ByGroups(NameNamespace, Punctuation, NameTag), nil}, + {`((?i)str|lang|langmatches|datatype|bound|iri|uri|bnode|rand|abs|ceil|floor|round|concat|strlen|ucase|lcase|encode_for_uri|contains|strstarts|strends|strbefore|strafter|year|month|day|hours|minutes|seconds|timezone|tz|now|md5|sha1|sha256|sha384|sha512|coalesce|if|strlang|strdt|sameterm|isiri|isuri|isblank|isliteral|isnumeric|regex|substr|replace|exists|not\s+exists|count|sum|min|max|avg|sample|group_concat|separator)\b`, NameFunction, nil}, + {`(true|false)`, KeywordConstant, nil}, + {`[+\-]?(\d+\.\d*[eE][+-]?\d+|\.?\d+[eE][+-]?\d+)`, LiteralNumberFloat, nil}, + {`[+\-]?(\d+\.\d*|\.\d+)`, LiteralNumberFloat, nil}, + {`[+\-]?\d+`, LiteralNumberInteger, nil}, + {`(\|\||&&|=|\*|\-|\+|/|!=|<=|>=|!|<|>)`, Operator, nil}, + {`[(){}.;,:^\[\]]`, Punctuation, nil}, + {`#[^\n]*`, Comment, nil}, + {`"""`, LiteralString, Push("triple-double-quoted-string")}, + {`"`, LiteralString, Push("single-double-quoted-string")}, + {`'''`, LiteralString, Push("triple-single-quoted-string")}, + {`'`, LiteralString, Push("single-single-quoted-string")}, + }, + "triple-double-quoted-string": { + {`"""`, LiteralString, Push("end-of-string")}, + {`[^\\]+`, LiteralString, nil}, + {`\\`, LiteralString, Push("string-escape")}, + }, + "single-double-quoted-string": { + {`"`, LiteralString, Push("end-of-string")}, + {`[^"\\\n]+`, LiteralString, nil}, + {`\\`, LiteralString, Push("string-escape")}, + }, + "triple-single-quoted-string": { + {`'''`, LiteralString, Push("end-of-string")}, + {`[^\\]+`, LiteralString, nil}, + {`\\`, LiteralStringEscape, Push("string-escape")}, + }, + "single-single-quoted-string": { + {`'`, LiteralString, Push("end-of-string")}, + {`[^'\\\n]+`, LiteralString, nil}, + {`\\`, LiteralString, Push("string-escape")}, + }, + "string-escape": { + {`u[0-9A-Fa-f]{4}`, LiteralStringEscape, Pop(1)}, + {`U[0-9A-Fa-f]{8}`, LiteralStringEscape, Pop(1)}, + {`.`, LiteralStringEscape, Pop(1)}, + }, + "end-of-string": { + {`(@)([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)`, ByGroups(Operator, NameFunction), Pop(2)}, + {`\^\^`, Operator, Pop(2)}, + Default(Pop(2)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/sql.go b/vendor/github.com/alecthomas/chroma/lexers/sql.go new file mode 100644 index 0000000..645bf7d --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/sql.go @@ -0,0 +1,38 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Sql lexer. +var Sql = Register(MustNewLexer( + &Config{ + Name: "SQL", + Aliases: []string{"sql"}, + Filenames: []string{"*.sql"}, + MimeTypes: []string{"text/x-sql"}, + NotMultiline: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`--.*\n?`, CommentSingle, nil}, + {`/\*`, CommentMultiline, Push("multiline-comments")}, + {Words(``, `\b`, `ABORT`, `ABS`, `ABSOLUTE`, `ACCESS`, `ADA`, `ADD`, `ADMIN`, `AFTER`, `AGGREGATE`, `ALIAS`, `ALL`, `ALLOCATE`, `ALTER`, `ANALYSE`, `ANALYZE`, `AND`, `ANY`, `ARE`, `AS`, `ASC`, `ASENSITIVE`, `ASSERTION`, `ASSIGNMENT`, `ASYMMETRIC`, `AT`, `ATOMIC`, `AUTHORIZATION`, `AVG`, `BACKWARD`, `BEFORE`, `BEGIN`, `BETWEEN`, `BITVAR`, `BIT_LENGTH`, `BOTH`, `BREADTH`, `BY`, `C`, `CACHE`, `CALL`, `CALLED`, `CARDINALITY`, `CASCADE`, `CASCADED`, `CASE`, `CAST`, `CATALOG`, `CATALOG_NAME`, `CHAIN`, `CHARACTERISTICS`, `CHARACTER_LENGTH`, `CHARACTER_SET_CATALOG`, `CHARACTER_SET_NAME`, `CHARACTER_SET_SCHEMA`, `CHAR_LENGTH`, `CHECK`, `CHECKED`, `CHECKPOINT`, `CLASS`, `CLASS_ORIGIN`, `CLOB`, `CLOSE`, `CLUSTER`, `COALSECE`, `COBOL`, `COLLATE`, `COLLATION`, `COLLATION_CATALOG`, `COLLATION_NAME`, `COLLATION_SCHEMA`, `COLUMN`, `COLUMN_NAME`, `COMMAND_FUNCTION`, `COMMAND_FUNCTION_CODE`, `COMMENT`, `COMMIT`, `COMMITTED`, `COMPLETION`, `CONDITION_NUMBER`, `CONNECT`, `CONNECTION`, `CONNECTION_NAME`, `CONSTRAINT`, `CONSTRAINTS`, `CONSTRAINT_CATALOG`, `CONSTRAINT_NAME`, `CONSTRAINT_SCHEMA`, `CONSTRUCTOR`, `CONTAINS`, `CONTINUE`, `CONVERSION`, `CONVERT`, `COPY`, `CORRESPONTING`, `COUNT`, `CREATE`, `CREATEDB`, `CREATEUSER`, `CROSS`, `CUBE`, `CURRENT`, `CURRENT_DATE`, `CURRENT_PATH`, `CURRENT_ROLE`, `CURRENT_TIME`, `CURRENT_TIMESTAMP`, `CURRENT_USER`, `CURSOR`, `CURSOR_NAME`, `CYCLE`, `DATA`, `DATABASE`, `DATETIME_INTERVAL_CODE`, `DATETIME_INTERVAL_PRECISION`, `DAY`, `DEALLOCATE`, `DECLARE`, `DEFAULT`, `DEFAULTS`, `DEFERRABLE`, `DEFERRED`, `DEFINED`, `DEFINER`, `DELETE`, `DELIMITER`, `DELIMITERS`, `DEREF`, `DESC`, `DESCRIBE`, `DESCRIPTOR`, `DESTROY`, `DESTRUCTOR`, `DETERMINISTIC`, `DIAGNOSTICS`, `DICTIONARY`, `DISCONNECT`, `DISPATCH`, `DISTINCT`, `DO`, `DOMAIN`, `DROP`, `DYNAMIC`, `DYNAMIC_FUNCTION`, `DYNAMIC_FUNCTION_CODE`, `EACH`, `ELSE`, `ELSIF`, `ENCODING`, `ENCRYPTED`, `END`, `END-EXEC`, `EQUALS`, `ESCAPE`, `EVERY`, `EXCEPTION`, `EXCEPT`, `EXCLUDING`, `EXCLUSIVE`, `EXEC`, `EXECUTE`, `EXISTING`, `EXISTS`, `EXPLAIN`, `EXTERNAL`, `EXTRACT`, `FALSE`, `FETCH`, `FINAL`, `FIRST`, `FOR`, `FORCE`, `FOREIGN`, `FORTRAN`, `FORWARD`, `FOUND`, `FREE`, `FREEZE`, `FROM`, `FULL`, `FUNCTION`, `G`, `GENERAL`, `GENERATED`, `GET`, `GLOBAL`, `GO`, `GOTO`, `GRANT`, `GRANTED`, `GROUP`, `GROUPING`, `HANDLER`, `HAVING`, `HIERARCHY`, `HOLD`, `HOST`, `IDENTITY`, `IF`, `IGNORE`, `ILIKE`, `IMMEDIATE`, `IMMUTABLE`, `IMPLEMENTATION`, `IMPLICIT`, `IN`, `INCLUDING`, `INCREMENT`, `INDEX`, `INDITCATOR`, `INFIX`, `INHERITS`, `INITIALIZE`, `INITIALLY`, `INNER`, `INOUT`, `INPUT`, `INSENSITIVE`, `INSERT`, `INSTANTIABLE`, `INSTEAD`, `INTERSECT`, `INTO`, `INVOKER`, `IS`, `ISNULL`, `ISOLATION`, `ITERATE`, `JOIN`, `KEY`, `KEY_MEMBER`, `KEY_TYPE`, `LANCOMPILER`, `LANGUAGE`, `LARGE`, `LAST`, `LATERAL`, `LEADING`, `LEFT`, `LENGTH`, `LESS`, `LEVEL`, `LIKE`, `LIMIT`, `LISTEN`, `LOAD`, `LOCAL`, `LOCALTIME`, `LOCALTIMESTAMP`, `LOCATION`, `LOCATOR`, `LOCK`, `LOWER`, `MAP`, `MATCH`, `MAX`, `MAXVALUE`, `MESSAGE_LENGTH`, `MESSAGE_OCTET_LENGTH`, `MESSAGE_TEXT`, `METHOD`, `MIN`, `MINUTE`, `MINVALUE`, `MOD`, `MODE`, `MODIFIES`, `MODIFY`, `MONTH`, `MORE`, `MOVE`, `MUMPS`, `NAMES`, `NATIONAL`, `NATURAL`, `NCHAR`, `NCLOB`, `NEW`, `NEXT`, `NO`, `NOCREATEDB`, `NOCREATEUSER`, `NONE`, `NOT`, `NOTHING`, `NOTIFY`, `NOTNULL`, `NULL`, `NULLABLE`, `NULLIF`, `OBJECT`, `OCTET_LENGTH`, `OF`, `OFF`, `OFFSET`, `OIDS`, `OLD`, `ON`, `ONLY`, `OPEN`, `OPERATION`, `OPERATOR`, `OPTION`, `OPTIONS`, `OR`, `ORDER`, `ORDINALITY`, `OUT`, `OUTER`, `OUTPUT`, `OVERLAPS`, `OVERLAY`, `OVERRIDING`, `OWNER`, `PAD`, `PARAMETER`, `PARAMETERS`, `PARAMETER_MODE`, `PARAMATER_NAME`, `PARAMATER_ORDINAL_POSITION`, `PARAMETER_SPECIFIC_CATALOG`, `PARAMETER_SPECIFIC_NAME`, `PARAMATER_SPECIFIC_SCHEMA`, `PARTIAL`, `PASCAL`, `PENDANT`, `PLACING`, `PLI`, `POSITION`, `POSTFIX`, `PRECISION`, `PREFIX`, `PREORDER`, `PREPARE`, `PRESERVE`, `PRIMARY`, `PRIOR`, `PRIVILEGES`, `PROCEDURAL`, `PROCEDURE`, `PUBLIC`, `READ`, `READS`, `RECHECK`, `RECURSIVE`, `REF`, `REFERENCES`, `REFERENCING`, `REINDEX`, `RELATIVE`, `RENAME`, `REPEATABLE`, `REPLACE`, `RESET`, `RESTART`, `RESTRICT`, `RESULT`, `RETURN`, `RETURNED_LENGTH`, `RETURNED_OCTET_LENGTH`, `RETURNED_SQLSTATE`, `RETURNS`, `REVOKE`, `RIGHT`, `ROLE`, `ROLLBACK`, `ROLLUP`, `ROUTINE`, `ROUTINE_CATALOG`, `ROUTINE_NAME`, `ROUTINE_SCHEMA`, `ROW`, `ROWS`, `ROW_COUNT`, `RULE`, `SAVE_POINT`, `SCALE`, `SCHEMA`, `SCHEMA_NAME`, `SCOPE`, `SCROLL`, `SEARCH`, `SECOND`, `SECURITY`, `SELECT`, `SELF`, `SENSITIVE`, `SERIALIZABLE`, `SERVER_NAME`, `SESSION`, `SESSION_USER`, `SET`, `SETOF`, `SETS`, `SHARE`, `SHOW`, `SIMILAR`, `SIMPLE`, `SIZE`, `SOME`, `SOURCE`, `SPACE`, `SPECIFIC`, `SPECIFICTYPE`, `SPECIFIC_NAME`, `SQL`, `SQLCODE`, `SQLERROR`, `SQLEXCEPTION`, `SQLSTATE`, `SQLWARNINIG`, `STABLE`, `START`, `STATE`, `STATEMENT`, `STATIC`, `STATISTICS`, `STDIN`, `STDOUT`, `STORAGE`, `STRICT`, `STRUCTURE`, `STYPE`, `SUBCLASS_ORIGIN`, `SUBLIST`, `SUBSTRING`, `SUM`, `SYMMETRIC`, `SYSID`, `SYSTEM`, `SYSTEM_USER`, `TABLE`, `TABLE_NAME`, ` TEMP`, `TEMPLATE`, `TEMPORARY`, `TERMINATE`, `THAN`, `THEN`, `TIMESTAMP`, `TIMEZONE_HOUR`, `TIMEZONE_MINUTE`, `TO`, `TOAST`, `TRAILING`, `TRANSATION`, `TRANSACTIONS_COMMITTED`, `TRANSACTIONS_ROLLED_BACK`, `TRANSATION_ACTIVE`, `TRANSFORM`, `TRANSFORMS`, `TRANSLATE`, `TRANSLATION`, `TREAT`, `TRIGGER`, `TRIGGER_CATALOG`, `TRIGGER_NAME`, `TRIGGER_SCHEMA`, `TRIM`, `TRUE`, `TRUNCATE`, `TRUSTED`, `TYPE`, `UNCOMMITTED`, `UNDER`, `UNENCRYPTED`, `UNION`, `UNIQUE`, `UNKNOWN`, `UNLISTEN`, `UNNAMED`, `UNNEST`, `UNTIL`, `UPDATE`, `UPPER`, `USAGE`, `USER`, `USER_DEFINED_TYPE_CATALOG`, `USER_DEFINED_TYPE_NAME`, `USER_DEFINED_TYPE_SCHEMA`, `USING`, `VACUUM`, `VALID`, `VALIDATOR`, `VALUES`, `VARIABLE`, `VERBOSE`, `VERSION`, `VIEW`, `VOLATILE`, `WHEN`, `WHENEVER`, `WHERE`, `WITH`, `WITHOUT`, `WORK`, `WRITE`, `YEAR`, `ZONE`), Keyword, nil}, + {Words(``, `\b`, `ARRAY`, `BIGINT`, `BINARY`, `BIT`, `BLOB`, `BOOLEAN`, `CHAR`, `CHARACTER`, `DATE`, `DEC`, `DECIMAL`, `FLOAT`, `INT`, `INTEGER`, `INTERVAL`, `NUMBER`, `NUMERIC`, `REAL`, `SERIAL`, `SMALLINT`, `VARCHAR`, `VARYING`, `INT8`, `SERIAL8`, `TEXT`), NameBuiltin, nil}, + {"[+*/<>=~!@#%^&|`?-]", Operator, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`'(''|[^'])*'`, LiteralStringSingle, nil}, + {`"(""|[^"])*"`, LiteralStringSymbol, nil}, + {`[a-z_][\w$]*`, Name, nil}, + {`[;:()\[\],.]`, Punctuation, nil}, + }, + "multiline-comments": { + {`/\*`, CommentMultiline, Push("multiline-comments")}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[^/*]+`, CommentMultiline, nil}, + {`[/*]`, CommentMultiline, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/squid.go b/vendor/github.com/alecthomas/chroma/lexers/squid.go new file mode 100644 index 0000000..a3003eb --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/squid.go @@ -0,0 +1,37 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Squidconf lexer. +var Squidconf = Register(MustNewLexer( + &Config{ + Name: "SquidConf", + Aliases: []string{"squidconf", "squid.conf", "squid"}, + Filenames: []string{"squid.conf"}, + MimeTypes: []string{"text/x-squidconf"}, + NotMultiline: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\s+`, TextWhitespace, nil}, + {`#`, Comment, Push("comment")}, + {Words(`\b`, `\b`, `access_log`, `acl`, `always_direct`, `announce_host`, `announce_period`, `announce_port`, `announce_to`, `anonymize_headers`, `append_domain`, `as_whois_server`, `auth_param_basic`, `authenticate_children`, `authenticate_program`, `authenticate_ttl`, `broken_posts`, `buffered_logs`, `cache_access_log`, `cache_announce`, `cache_dir`, `cache_dns_program`, `cache_effective_group`, `cache_effective_user`, `cache_host`, `cache_host_acl`, `cache_host_domain`, `cache_log`, `cache_mem`, `cache_mem_high`, `cache_mem_low`, `cache_mgr`, `cachemgr_passwd`, `cache_peer`, `cache_peer_access`, `cahce_replacement_policy`, `cache_stoplist`, `cache_stoplist_pattern`, `cache_store_log`, `cache_swap`, `cache_swap_high`, `cache_swap_log`, `cache_swap_low`, `client_db`, `client_lifetime`, `client_netmask`, `connect_timeout`, `coredump_dir`, `dead_peer_timeout`, `debug_options`, `delay_access`, `delay_class`, `delay_initial_bucket_level`, `delay_parameters`, `delay_pools`, `deny_info`, `dns_children`, `dns_defnames`, `dns_nameservers`, `dns_testnames`, `emulate_httpd_log`, `err_html_text`, `fake_user_agent`, `firewall_ip`, `forwarded_for`, `forward_snmpd_port`, `fqdncache_size`, `ftpget_options`, `ftpget_program`, `ftp_list_width`, `ftp_passive`, `ftp_user`, `half_closed_clients`, `header_access`, `header_replace`, `hierarchy_stoplist`, `high_response_time_warning`, `high_page_fault_warning`, `hosts_file`, `htcp_port`, `http_access`, `http_anonymizer`, `httpd_accel`, `httpd_accel_host`, `httpd_accel_port`, `httpd_accel_uses_host_header`, `httpd_accel_with_proxy`, `http_port`, `http_reply_access`, `icp_access`, `icp_hit_stale`, `icp_port`, `icp_query_timeout`, `ident_lookup`, `ident_lookup_access`, `ident_timeout`, `incoming_http_average`, `incoming_icp_average`, `inside_firewall`, `ipcache_high`, `ipcache_low`, `ipcache_size`, `local_domain`, `local_ip`, `logfile_rotate`, `log_fqdn`, `log_icp_queries`, `log_mime_hdrs`, `maximum_object_size`, `maximum_single_addr_tries`, `mcast_groups`, `mcast_icp_query_timeout`, `mcast_miss_addr`, `mcast_miss_encode_key`, `mcast_miss_port`, `memory_pools`, `memory_pools_limit`, `memory_replacement_policy`, `mime_table`, `min_http_poll_cnt`, `min_icp_poll_cnt`, `minimum_direct_hops`, `minimum_object_size`, `minimum_retry_timeout`, `miss_access`, `negative_dns_ttl`, `negative_ttl`, `neighbor_timeout`, `neighbor_type_domain`, `netdb_high`, `netdb_low`, `netdb_ping_period`, `netdb_ping_rate`, `never_direct`, `no_cache`, `passthrough_proxy`, `pconn_timeout`, `pid_filename`, `pinger_program`, `positive_dns_ttl`, `prefer_direct`, `proxy_auth`, `proxy_auth_realm`, `query_icmp`, `quick_abort`, `quick_abort_max`, `quick_abort_min`, `quick_abort_pct`, `range_offset_limit`, `read_timeout`, `redirect_children`, `redirect_program`, `redirect_rewrites_host_header`, `reference_age`, `refresh_pattern`, `reload_into_ims`, `request_body_max_size`, `request_size`, `request_timeout`, `shutdown_lifetime`, `single_parent_bypass`, `siteselect_timeout`, `snmp_access`, `snmp_incoming_address`, `snmp_port`, `source_ping`, `ssl_proxy`, `store_avg_object_size`, `store_objects_per_bucket`, `strip_query_terms`, `swap_level1_dirs`, `swap_level2_dirs`, `tcp_incoming_address`, `tcp_outgoing_address`, `tcp_recv_bufsize`, `test_reachability`, `udp_hit_obj`, `udp_hit_obj_size`, `udp_incoming_address`, `udp_outgoing_address`, `unique_hostname`, `unlinkd_program`, `uri_whitespace`, `useragent_log`, `visible_hostname`, `wais_relay`, `wais_relay_host`, `wais_relay_port`), Keyword, nil}, + {Words(`\b`, `\b`, `proxy-only`, `weight`, `ttl`, `no-query`, `default`, `round-robin`, `multicast-responder`, `on`, `off`, `all`, `deny`, `allow`, `via`, `parent`, `no-digest`, `heap`, `lru`, `realm`, `children`, `q1`, `q2`, `credentialsttl`, `none`, `disable`, `offline_toggle`, `diskd`), NameConstant, nil}, + {Words(`\b`, `\b`, `shutdown`, `info`, `parameter`, `server_list`, `client_list`, `squid.conf`), LiteralString, nil}, + {Words(`stats/`, `\b`, `objects`, `vm_objects`, `utilization`, `ipcache`, `fqdncache`, `dns`, `redirector`, `io`, `reply_headers`, `filedescriptors`, `netdb`), LiteralString, nil}, + {Words(`log/`, `=`, `status`, `enable`, `disable`, `clear`), LiteralString, nil}, + {Words(`\b`, `\b`, `url_regex`, `urlpath_regex`, `referer_regex`, `port`, `proto`, `req_mime_type`, `rep_mime_type`, `method`, `browser`, `user`, `src`, `dst`, `time`, `dstdomain`, `ident`, `snmp_community`), Keyword, nil}, + {`(?:(?:(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})(?:\.(?:[3-9]\d?|2(?:5[0-5]|[0-4]?\d)?|1\d{0,2}|0x0*[0-9a-f]{1,2}|0+[1-3]?[0-7]{0,2})){3})|(?!.*::.*::)(?:(?!:)|:(?=:))(?:[0-9a-f]{0,4}(?:(?<=::)|(?|[<&?](?=\\w)|(?<=\\w)[>!?]", Punctuation, nil}, + {`[/=\-+!*%<>&|^?~]+`, Operator, nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + }, + "keywords": { + {Words(``, `\b`, `as`, `break`, `case`, `catch`, `continue`, `default`, `defer`, `do`, `else`, `fallthrough`, `for`, `guard`, `if`, `in`, `is`, `repeat`, `return`, `#selector`, `switch`, `throw`, `try`, `where`, `while`), Keyword, nil}, + {`@availability\([^)]+\)`, KeywordReserved, nil}, + {Words(``, `\b`, `associativity`, `convenience`, `dynamic`, `didSet`, `final`, `get`, `indirect`, `infix`, `inout`, `lazy`, `left`, `mutating`, `none`, `nonmutating`, `optional`, `override`, `postfix`, `precedence`, `prefix`, `Protocol`, `required`, `rethrows`, `right`, `set`, `throws`, `Type`, `unowned`, `weak`, `willSet`, `@availability`, `@autoclosure`, `@noreturn`, `@NSApplicationMain`, `@NSCopying`, `@NSManaged`, `@objc`, `@UIApplicationMain`, `@IBAction`, `@IBDesignable`, `@IBInspectable`, `@IBOutlet`), KeywordReserved, nil}, + {`(as|dynamicType|false|is|nil|self|Self|super|true|__COLUMN__|__FILE__|__FUNCTION__|__LINE__|_|#(?:file|line|column|function))\b`, KeywordConstant, nil}, + {`import\b`, KeywordDeclaration, Push("module")}, + {`(class|enum|extension|struct|protocol)(\s+)([a-zA-Z_]\w*)`, ByGroups(KeywordDeclaration, Text, NameClass), nil}, + {`(func)(\s+)([a-zA-Z_]\w*)`, ByGroups(KeywordDeclaration, Text, NameFunction), nil}, + {`(var|let)(\s+)([a-zA-Z_]\w*)`, ByGroups(KeywordDeclaration, Text, NameVariable), nil}, + {Words(``, `\b`, `class`, `deinit`, `enum`, `extension`, `func`, `import`, `init`, `internal`, `let`, `operator`, `private`, `protocol`, `public`, `static`, `struct`, `subscript`, `typealias`, `var`), KeywordDeclaration, nil}, + }, + "comment": { + {`:param: [a-zA-Z_]\w*|:returns?:|(FIXME|MARK|TODO):`, CommentSpecial, nil}, + }, + "comment-single": { + {`\n`, Text, Pop(1)}, + Include("comment"), + {`[^\n]`, CommentSingle, nil}, + }, + "comment-multi": { + Include("comment"), + {`[^*/]`, CommentMultiline, nil}, + {`/\*`, CommentMultiline, Push()}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[*/]`, CommentMultiline, nil}, + }, + "module": { + {`\n`, Text, Pop(1)}, + {`[a-zA-Z_]\w*`, NameClass, nil}, + Include("root"), + }, + "preproc": { + {`\n`, Text, Pop(1)}, + Include("keywords"), + {`[A-Za-z]\w*`, CommentPreproc, nil}, + Include("root"), + }, + "string": { + {`\\\(`, LiteralStringInterpol, Push("string-intp")}, + {`"`, LiteralString, Pop(1)}, + {`\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}`, LiteralStringEscape, nil}, + {`[^\\"]+`, LiteralString, nil}, + {`\\`, LiteralString, nil}, + }, + "string-intp": { + {`\(`, LiteralStringInterpol, Push()}, + {`\)`, LiteralStringInterpol, Pop(1)}, + Include("root"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/systemverilog.go b/vendor/github.com/alecthomas/chroma/lexers/systemverilog.go new file mode 100644 index 0000000..3da676c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/systemverilog.go @@ -0,0 +1,71 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Systemverilog lexer. +var Systemverilog = Register(MustNewLexer( + &Config{ + Name: "systemverilog", + Aliases: []string{"systemverilog", "sv"}, + Filenames: []string{"*.sv", "*.svh"}, + MimeTypes: []string{"text/x-systemverilog"}, + EnsureNL: true, + }, + Rules{ + "root": { + {"^\\s*`define", CommentPreproc, Push("macro")}, + {`^(\s*)(package)(\s+)`, ByGroups(Text, KeywordNamespace, Text), nil}, + {`^(\s*)(import)(\s+)`, ByGroups(Text, KeywordNamespace, Text), Push("import")}, + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`\\\n`, Text, nil}, + {`/(\\\n)?/(\n|(.|\n)*?[^\\]\n)`, CommentSingle, nil}, + {`/(\\\n)?[*](.|\n)*?[*](\\\n)?/`, CommentMultiline, nil}, + {`[{}#@]`, Punctuation, nil}, + {`L?"`, LiteralString, Push("string")}, + {`L?'(\\.|\\[0-7]{1,3}|\\x[a-fA-F0-9]{1,2}|[^\\\'\n])'`, LiteralStringChar, nil}, + {`(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?`, LiteralNumberFloat, nil}, + {`(\d+\.\d*|\.\d+|\d+[fF])[fF]?`, LiteralNumberFloat, nil}, + {`([0-9]+)|(\'h)[0-9a-fA-F]+`, LiteralNumberHex, nil}, + {`([0-9]+)|(\'b)[01]+`, LiteralNumberBin, nil}, + {`([0-9]+)|(\'d)[0-9]+`, LiteralNumberInteger, nil}, + {`([0-9]+)|(\'o)[0-7]+`, LiteralNumberOct, nil}, + {`\'[01xz]`, LiteralNumber, nil}, + {`\d+[Ll]?`, LiteralNumberInteger, nil}, + {`\*/`, Error, nil}, + {`[~!%^&*+=|?:<>/-]`, Operator, nil}, + {`[()\[\],.;\']`, Punctuation, nil}, + {"`[a-zA-Z_]\\w*", NameConstant, nil}, + {Words(``, `\b`, `accept_on`, `alias`, `always`, `always_comb`, `always_ff`, `always_latch`, `and`, `assert`, `assign`, `assume`, `automatic`, `before`, `begin`, `bind`, `bins`, `binsof`, `bit`, `break`, `buf`, `bufif0`, `bufif1`, `byte`, `case`, `casex`, `casez`, `cell`, `chandle`, `checker`, `class`, `clocking`, `cmos`, `config`, `const`, `constraint`, `context`, `continue`, `cover`, `covergroup`, `coverpoint`, `cross`, `deassign`, `default`, `defparam`, `design`, `disable`, `dist`, `do`, `edge`, `else`, `end`, `endcase`, `endchecker`, `endclass`, `endclocking`, `endconfig`, `endfunction`, `endgenerate`, `endgroup`, `endinterface`, `endmodule`, `endpackage`, `endprimitive`, `endprogram`, `endproperty`, `endsequence`, `endspecify`, `endtable`, `endtask`, `enum`, `event`, `eventually`, `expect`, `export`, `extends`, `extern`, `final`, `first_match`, `for`, `force`, `foreach`, `forever`, `fork`, `forkjoin`, `function`, `generate`, `genvar`, `global`, `highz0`, `highz1`, `if`, `iff`, `ifnone`, `ignore_bins`, `illegal_bins`, `implies`, `import`, `incdir`, `include`, `initial`, `inout`, `input`, `inside`, `instance`, `int`, `integer`, `interface`, `intersect`, `join`, `join_any`, `join_none`, `large`, `let`, `liblist`, `library`, `local`, `localparam`, `logic`, `longint`, `macromodule`, `matches`, `medium`, `modport`, `module`, `nand`, `negedge`, `new`, `nexttime`, `nmos`, `nor`, `noshowcancelled`, `not`, `notif0`, `notif1`, `null`, `or`, `output`, `package`, `packed`, `parameter`, `pmos`, `posedge`, `primitive`, `priority`, `program`, `property`, `protected`, `pull0`, `pull1`, `pulldown`, `pullup`, `pulsestyle_ondetect`, `pulsestyle_onevent`, `pure`, `rand`, `randc`, `randcase`, `randsequence`, `rcmos`, `real`, `realtime`, `ref`, `reg`, `reject_on`, `release`, `repeat`, `restrict`, `return`, `rnmos`, `rpmos`, `rtran`, `rtranif0`, `rtranif1`, `s_always`, `s_eventually`, `s_nexttime`, `s_until`, `s_until_with`, `scalared`, `sequence`, `shortint`, `shortreal`, `showcancelled`, `signed`, `small`, `solve`, `specify`, `specparam`, `static`, `string`, `strong`, `strong0`, `strong1`, `struct`, `super`, `supply0`, `supply1`, `sync_accept_on`, `sync_reject_on`, `table`, `tagged`, `task`, `this`, `throughout`, `time`, `timeprecision`, `timeunit`, `tran`, `tranif0`, `tranif1`, `tri`, `tri0`, `tri1`, `triand`, `trior`, `trireg`, `type`, `typedef`, `union`, `unique`, `unique0`, `unsigned`, `until`, `until_with`, `untyped`, `use`, `uwire`, `var`, `vectored`, `virtual`, `void`, `wait`, `wait_order`, `wand`, `weak`, `weak0`, `weak1`, `while`, `wildcard`, `wire`, `with`, `within`, `wor`, `xnor`, `xor`), Keyword, nil}, + {Words(``, `\b`, "`__FILE__", "`__LINE__", "`begin_keywords", "`celldefine", "`default_nettype", "`define", "`else", "`elsif", "`end_keywords", "`endcelldefine", "`endif", "`ifdef", "`ifndef", "`include", "`line", "`nounconnected_drive", "`pragma", "`resetall", "`timescale", "`unconnected_drive", "`undef", "`undefineall"), CommentPreproc, nil}, + {Words(``, `\b`, `$display`, `$displayb`, `$displayh`, `$displayo`, `$dumpall`, `$dumpfile`, `$dumpflush`, `$dumplimit`, `$dumpoff`, `$dumpon`, `$dumpports`, `$dumpportsall`, `$dumpportsflush`, `$dumpportslimit`, `$dumpportsoff`, `$dumpportson`, `$dumpvars`, `$fclose`, `$fdisplay`, `$fdisplayb`, `$fdisplayh`, `$fdisplayo`, `$feof`, `$ferror`, `$fflush`, `$fgetc`, `$fgets`, `$finish`, `$fmonitor`, `$fmonitorb`, `$fmonitorh`, `$fmonitoro`, `$fopen`, `$fread`, `$fscanf`, `$fseek`, `$fstrobe`, `$fstrobeb`, `$fstrobeh`, `$fstrobeo`, `$ftell`, `$fwrite`, `$fwriteb`, `$fwriteh`, `$fwriteo`, `$monitor`, `$monitorb`, `$monitorh`, `$monitoro`, `$monitoroff`, `$monitoron`, `$plusargs`, `$random`, `$readmemb`, `$readmemh`, `$rewind`, `$sformat`, `$sformatf`, `$sscanf`, `$strobe`, `$strobeb`, `$strobeh`, `$strobeo`, `$swrite`, `$swriteb`, `$swriteh`, `$swriteo`, `$test`, `$ungetc`, `$value$plusargs`, `$write`, `$writeb`, `$writeh`, `$writememb`, `$writememh`, `$writeo`), NameBuiltin, nil}, + {`(class)(\s+)`, ByGroups(Keyword, Text), Push("classname")}, + {Words(``, `\b`, `byte`, `shortint`, `int`, `longint`, `integer`, `time`, `bit`, `logic`, `reg`, `supply0`, `supply1`, `tri`, `triand`, `trior`, `tri0`, `tri1`, `trireg`, `uwire`, `wire`, `wand`, `woshortreal`, `real`, `realtime`), KeywordType, nil}, + {`[a-zA-Z_]\w*:(?!:)`, NameLabel, nil}, + {`\$?[a-zA-Z_]\w*`, Name, nil}, + }, + "classname": { + {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + }, + "string": { + {`"`, LiteralString, Pop(1)}, + {`\\([\\abfnrtv"\']|x[a-fA-F0-9]{2,4}|[0-7]{1,3})`, LiteralStringEscape, nil}, + {`[^\\"\n]+`, LiteralString, nil}, + {`\\\n`, LiteralString, nil}, + {`\\`, LiteralString, nil}, + }, + "macro": { + {`[^/\n]+`, CommentPreproc, nil}, + {`/[*](.|\n)*?[*]/`, CommentMultiline, nil}, + {`//.*?\n`, CommentSingle, Pop(1)}, + {`/`, CommentPreproc, nil}, + {`(?<=\\)\n`, CommentPreproc, nil}, + {`\n`, CommentPreproc, Pop(1)}, + }, + "import": { + {`[\w:]+\*?`, NameNamespace, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/tasm.go b/vendor/github.com/alecthomas/chroma/lexers/tasm.go new file mode 100644 index 0000000..92f40c9 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/tasm.go @@ -0,0 +1,60 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Tasm lexer. +var Tasm = Register(MustNewLexer( + &Config{ + Name: "TASM", + Aliases: []string{"tasm"}, + Filenames: []string{"*.asm", "*.ASM", "*.tasm"}, + MimeTypes: []string{"text/x-tasm"}, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`^\s*%`, CommentPreproc, Push("preproc")}, + Include("whitespace"), + {`[@a-z$._?][\w$.?#@~]*:`, NameLabel, nil}, + {`BITS|USE16|USE32|SECTION|SEGMENT|ABSOLUTE|EXTERN|GLOBAL|ORG|ALIGN|STRUC|ENDSTRUC|ENDS|COMMON|CPU|GROUP|UPPERCASE|INCLUDE|EXPORT|LIBRARY|MODULE|PROC|ENDP|USES|ARG|DATASEG|UDATASEG|END|IDEAL|P386|MODEL|ASSUME|CODESEG|SIZE`, Keyword, Push("instruction-args")}, + {`([@a-z$._?][\w$.?#@~]*)(\s+)(db|dd|dw|T[A-Z][a-z]+)`, ByGroups(NameConstant, KeywordDeclaration, KeywordDeclaration), Push("instruction-args")}, + {`(?:res|d)[bwdqt]|times`, KeywordDeclaration, Push("instruction-args")}, + {`[@a-z$._?][\w$.?#@~]*`, NameFunction, Push("instruction-args")}, + {`[\r\n]+`, Text, nil}, + }, + "instruction-args": { + {"\"(\\\\\"|[^\"\\n])*\"|'(\\\\'|[^'\\n])*'|`(\\\\`|[^`\\n])*`", LiteralString, nil}, + {`(?:0x[0-9a-f]+|$0[0-9a-f]*|[0-9]+[0-9a-f]*h)`, LiteralNumberHex, nil}, + {`[0-7]+q`, LiteralNumberOct, nil}, + {`[01]+b`, LiteralNumberBin, nil}, + {`[0-9]+\.e?[0-9]+`, LiteralNumberFloat, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + Include("punctuation"), + {`r[0-9][0-5]?[bwd]|[a-d][lh]|[er]?[a-d]x|[er]?[sb]p|[er]?[sd]i|[c-gs]s|st[0-7]|mm[0-7]|cr[0-4]|dr[0-367]|tr[3-7]`, NameBuiltin, nil}, + {`[@a-z$._?][\w$.?#@~]*`, NameVariable, nil}, + {`(\\\s*)(;.*)([\r\n])`, ByGroups(Text, CommentSingle, Text), nil}, + {`[\r\n]+`, Text, Pop(1)}, + Include("whitespace"), + }, + "preproc": { + {`[^;\n]+`, CommentPreproc, nil}, + {`;.*?\n`, CommentSingle, Pop(1)}, + {`\n`, CommentPreproc, Pop(1)}, + }, + "whitespace": { + {`[\n\r]`, Text, nil}, + {`\\[\n\r]`, Text, nil}, + {`[ \t]+`, Text, nil}, + {`;.*`, CommentSingle, nil}, + }, + "punctuation": { + {`[,():\[\]]+`, Punctuation, nil}, + {`[&|^<>+*=/%~-]+`, Operator, nil}, + {`[$]+`, KeywordConstant, nil}, + {`seg|wrt|strict`, OperatorWord, nil}, + {`byte|[dq]?word`, KeywordType, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/tcl.go b/vendor/github.com/alecthomas/chroma/lexers/tcl.go new file mode 100644 index 0000000..103eebb --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/tcl.go @@ -0,0 +1,115 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Tcl lexer. +var Tcl = Register(MustNewLexer( + &Config{ + Name: "Tcl", + Aliases: []string{"tcl"}, + Filenames: []string{"*.tcl", "*.rvt"}, + MimeTypes: []string{"text/x-tcl", "text/x-script.tcl", "application/x-tcl"}, + }, + Rules{ + "root": { + Include("command"), + Include("basic"), + Include("data"), + {`\}`, Keyword, nil}, + }, + "command": { + {Words(`\b`, `\b`, `after`, `apply`, `array`, `break`, `catch`, `continue`, `elseif`, `else`, `error`, `eval`, `expr`, `for`, `foreach`, `global`, `if`, `namespace`, `proc`, `rename`, `return`, `set`, `switch`, `then`, `trace`, `unset`, `update`, `uplevel`, `upvar`, `variable`, `vwait`, `while`), Keyword, Push("params")}, + {Words(`\b`, `\b`, `append`, `bgerror`, `binary`, `cd`, `chan`, `clock`, `close`, `concat`, `dde`, `dict`, `encoding`, `eof`, `exec`, `exit`, `fblocked`, `fconfigure`, `fcopy`, `file`, `fileevent`, `flush`, `format`, `gets`, `glob`, `history`, `http`, `incr`, `info`, `interp`, `join`, `lappend`, `lassign`, `lindex`, `linsert`, `list`, `llength`, `load`, `loadTk`, `lrange`, `lrepeat`, `lreplace`, `lreverse`, `lsearch`, `lset`, `lsort`, `mathfunc`, `mathop`, `memory`, `msgcat`, `open`, `package`, `pid`, `pkg::create`, `pkg_mkIndex`, `platform`, `platform::shell`, `puts`, `pwd`, `re_syntax`, `read`, `refchan`, `regexp`, `registry`, `regsub`, `scan`, `seek`, `socket`, `source`, `split`, `string`, `subst`, `tell`, `time`, `tm`, `unknown`, `unload`), NameBuiltin, Push("params")}, + {`([\w.-]+)`, NameVariable, Push("params")}, + {`#`, Comment, Push("comment")}, + }, + "command-in-brace": { + {Words(`\b`, `\b`, `after`, `apply`, `array`, `break`, `catch`, `continue`, `elseif`, `else`, `error`, `eval`, `expr`, `for`, `foreach`, `global`, `if`, `namespace`, `proc`, `rename`, `return`, `set`, `switch`, `then`, `trace`, `unset`, `update`, `uplevel`, `upvar`, `variable`, `vwait`, `while`), Keyword, Push("params-in-brace")}, + {Words(`\b`, `\b`, `append`, `bgerror`, `binary`, `cd`, `chan`, `clock`, `close`, `concat`, `dde`, `dict`, `encoding`, `eof`, `exec`, `exit`, `fblocked`, `fconfigure`, `fcopy`, `file`, `fileevent`, `flush`, `format`, `gets`, `glob`, `history`, `http`, `incr`, `info`, `interp`, `join`, `lappend`, `lassign`, `lindex`, `linsert`, `list`, `llength`, `load`, `loadTk`, `lrange`, `lrepeat`, `lreplace`, `lreverse`, `lsearch`, `lset`, `lsort`, `mathfunc`, `mathop`, `memory`, `msgcat`, `open`, `package`, `pid`, `pkg::create`, `pkg_mkIndex`, `platform`, `platform::shell`, `puts`, `pwd`, `re_syntax`, `read`, `refchan`, `regexp`, `registry`, `regsub`, `scan`, `seek`, `socket`, `source`, `split`, `string`, `subst`, `tell`, `time`, `tm`, `unknown`, `unload`), NameBuiltin, Push("params-in-brace")}, + {`([\w.-]+)`, NameVariable, Push("params-in-brace")}, + {`#`, Comment, Push("comment")}, + }, + "command-in-bracket": { + {Words(`\b`, `\b`, `after`, `apply`, `array`, `break`, `catch`, `continue`, `elseif`, `else`, `error`, `eval`, `expr`, `for`, `foreach`, `global`, `if`, `namespace`, `proc`, `rename`, `return`, `set`, `switch`, `then`, `trace`, `unset`, `update`, `uplevel`, `upvar`, `variable`, `vwait`, `while`), Keyword, Push("params-in-bracket")}, + {Words(`\b`, `\b`, `append`, `bgerror`, `binary`, `cd`, `chan`, `clock`, `close`, `concat`, `dde`, `dict`, `encoding`, `eof`, `exec`, `exit`, `fblocked`, `fconfigure`, `fcopy`, `file`, `fileevent`, `flush`, `format`, `gets`, `glob`, `history`, `http`, `incr`, `info`, `interp`, `join`, `lappend`, `lassign`, `lindex`, `linsert`, `list`, `llength`, `load`, `loadTk`, `lrange`, `lrepeat`, `lreplace`, `lreverse`, `lsearch`, `lset`, `lsort`, `mathfunc`, `mathop`, `memory`, `msgcat`, `open`, `package`, `pid`, `pkg::create`, `pkg_mkIndex`, `platform`, `platform::shell`, `puts`, `pwd`, `re_syntax`, `read`, `refchan`, `regexp`, `registry`, `regsub`, `scan`, `seek`, `socket`, `source`, `split`, `string`, `subst`, `tell`, `time`, `tm`, `unknown`, `unload`), NameBuiltin, Push("params-in-bracket")}, + {`([\w.-]+)`, NameVariable, Push("params-in-bracket")}, + {`#`, Comment, Push("comment")}, + }, + "command-in-paren": { + {Words(`\b`, `\b`, `after`, `apply`, `array`, `break`, `catch`, `continue`, `elseif`, `else`, `error`, `eval`, `expr`, `for`, `foreach`, `global`, `if`, `namespace`, `proc`, `rename`, `return`, `set`, `switch`, `then`, `trace`, `unset`, `update`, `uplevel`, `upvar`, `variable`, `vwait`, `while`), Keyword, Push("params-in-paren")}, + {Words(`\b`, `\b`, `append`, `bgerror`, `binary`, `cd`, `chan`, `clock`, `close`, `concat`, `dde`, `dict`, `encoding`, `eof`, `exec`, `exit`, `fblocked`, `fconfigure`, `fcopy`, `file`, `fileevent`, `flush`, `format`, `gets`, `glob`, `history`, `http`, `incr`, `info`, `interp`, `join`, `lappend`, `lassign`, `lindex`, `linsert`, `list`, `llength`, `load`, `loadTk`, `lrange`, `lrepeat`, `lreplace`, `lreverse`, `lsearch`, `lset`, `lsort`, `mathfunc`, `mathop`, `memory`, `msgcat`, `open`, `package`, `pid`, `pkg::create`, `pkg_mkIndex`, `platform`, `platform::shell`, `puts`, `pwd`, `re_syntax`, `read`, `refchan`, `regexp`, `registry`, `regsub`, `scan`, `seek`, `socket`, `source`, `split`, `string`, `subst`, `tell`, `time`, `tm`, `unknown`, `unload`), NameBuiltin, Push("params-in-paren")}, + {`([\w.-]+)`, NameVariable, Push("params-in-paren")}, + {`#`, Comment, Push("comment")}, + }, + "basic": { + {`\(`, Keyword, Push("paren")}, + {`\[`, Keyword, Push("bracket")}, + {`\{`, Keyword, Push("brace")}, + {`"`, LiteralStringDouble, Push("string")}, + {`(eq|ne|in|ni)\b`, OperatorWord, nil}, + {`!=|==|<<|>>|<=|>=|&&|\|\||\*\*|[-+~!*/%<>&^|?:]`, Operator, nil}, + }, + "data": { + {`\s+`, Text, nil}, + {`0x[a-fA-F0-9]+`, LiteralNumberHex, nil}, + {`0[0-7]+`, LiteralNumberOct, nil}, + {`\d+\.\d+`, LiteralNumberFloat, nil}, + {`\d+`, LiteralNumberInteger, nil}, + {`\$([\w.:-]+)`, NameVariable, nil}, + {`([\w.:-]+)`, Text, nil}, + }, + "params": { + {`;`, Keyword, Pop(1)}, + {`\n`, Text, Pop(1)}, + {`(else|elseif|then)\b`, Keyword, nil}, + Include("basic"), + Include("data"), + }, + "params-in-brace": { + {`\}`, Keyword, Push("#pop", "#pop")}, + Include("params"), + }, + "params-in-paren": { + {`\)`, Keyword, Push("#pop", "#pop")}, + Include("params"), + }, + "params-in-bracket": { + {`\]`, Keyword, Push("#pop", "#pop")}, + Include("params"), + }, + "string": { + {`\[`, LiteralStringDouble, Push("string-square")}, + {`(?s)(\\\\|\\[0-7]+|\\.|[^"\\])`, LiteralStringDouble, nil}, + {`"`, LiteralStringDouble, Pop(1)}, + }, + "string-square": { + {`\[`, LiteralStringDouble, Push("string-square")}, + {`(?s)(\\\\|\\[0-7]+|\\.|\\\n|[^\]\\])`, LiteralStringDouble, nil}, + {`\]`, LiteralStringDouble, Pop(1)}, + }, + "brace": { + {`\}`, Keyword, Pop(1)}, + Include("command-in-brace"), + Include("basic"), + Include("data"), + }, + "paren": { + {`\)`, Keyword, Pop(1)}, + Include("command-in-paren"), + Include("basic"), + Include("data"), + }, + "bracket": { + {`\]`, Keyword, Pop(1)}, + Include("command-in-bracket"), + Include("basic"), + Include("data"), + }, + "comment": { + {`.*[^\\]\n`, Comment, Pop(1)}, + {`.*\\\n`, Comment, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/tcsh.go b/vendor/github.com/alecthomas/chroma/lexers/tcsh.go new file mode 100644 index 0000000..ceb1b85 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/tcsh.go @@ -0,0 +1,58 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Tcsh lexer. +var Tcsh = Register(MustNewLexer( + &Config{ + Name: "Tcsh", + Aliases: []string{"tcsh", "csh"}, + Filenames: []string{"*.tcsh", "*.csh"}, + MimeTypes: []string{"application/x-csh"}, + }, + Rules{ + "root": { + Include("basic"), + {`\$\(`, Keyword, Push("paren")}, + {`\$\{#?`, Keyword, Push("curly")}, + {"`", LiteralStringBacktick, Push("backticks")}, + Include("data"), + }, + "basic": { + {`\b(if|endif|else|while|then|foreach|case|default|continue|goto|breaksw|end|switch|endsw)\s*\b`, Keyword, nil}, + {`\b(alias|alloc|bg|bindkey|break|builtins|bye|caller|cd|chdir|complete|dirs|echo|echotc|eval|exec|exit|fg|filetest|getxvers|glob|getspath|hashstat|history|hup|inlib|jobs|kill|limit|log|login|logout|ls-F|migrate|newgrp|nice|nohup|notify|onintr|popd|printenv|pushd|rehash|repeat|rootnode|popd|pushd|set|shift|sched|setenv|setpath|settc|setty|setxvers|shift|source|stop|suspend|source|suspend|telltc|time|umask|unalias|uncomplete|unhash|universe|unlimit|unset|unsetenv|ver|wait|warp|watchlog|where|which)\s*\b`, NameBuiltin, nil}, + {`#.*`, Comment, nil}, + {`\\[\w\W]`, LiteralStringEscape, nil}, + {`(\b\w+)(\s*)(=)`, ByGroups(NameVariable, Text, Operator), nil}, + {`[\[\]{}()=]+`, Operator, nil}, + {`<<\s*(\'?)\\?(\w+)[\w\W]+?\2`, LiteralString, nil}, + {`;`, Punctuation, nil}, + }, + "data": { + {`(?s)"(\\\\|\\[0-7]+|\\.|[^"\\])*"`, LiteralStringDouble, nil}, + {`(?s)'(\\\\|\\[0-7]+|\\.|[^'\\])*'`, LiteralStringSingle, nil}, + {`\s+`, Text, nil}, + {"[^=\\s\\[\\]{}()$\"\\'`\\\\;#]+", Text, nil}, + {`\d+(?= |\Z)`, LiteralNumber, nil}, + {`\$#?(\w+|.)`, NameVariable, nil}, + }, + "curly": { + {`\}`, Keyword, Pop(1)}, + {`:-`, Keyword, nil}, + {`\w+`, NameVariable, nil}, + {"[^}:\"\\'`$]+", Punctuation, nil}, + {`:`, Punctuation, nil}, + Include("root"), + }, + "paren": { + {`\)`, Keyword, Pop(1)}, + Include("root"), + }, + "backticks": { + {"`", LiteralStringBacktick, Pop(1)}, + Include("root"), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/termcap.go b/vendor/github.com/alecthomas/chroma/lexers/termcap.go new file mode 100644 index 0000000..93cb899 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/termcap.go @@ -0,0 +1,41 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Termcap lexer. +var Termcap = Register(MustNewLexer( + &Config{ + Name: "Termcap", + Aliases: []string{"termcap"}, + Filenames: []string{"termcap", "termcap.src"}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`^#.*$`, Comment, nil}, + {`^[^\s#:|]+`, NameTag, Push("names")}, + }, + "names": { + {`\n`, Text, Pop(1)}, + {`:`, Punctuation, Push("defs")}, + {`\|`, Punctuation, nil}, + {`[^:|]+`, NameAttribute, nil}, + }, + "defs": { + {`\\\n[ \t]*`, Text, nil}, + {`\n[ \t]*`, Text, Pop(2)}, + {`(#)([0-9]+)`, ByGroups(Operator, LiteralNumber), nil}, + {`=`, Operator, Push("data")}, + {`:`, Punctuation, nil}, + {`[^\s:=#]+`, NameClass, nil}, + }, + "data": { + {`\\072`, Literal, nil}, + {`:`, Punctuation, Pop(1)}, + {`[^:\\]+`, Literal, nil}, + {`.`, Literal, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/terminfo.go b/vendor/github.com/alecthomas/chroma/lexers/terminfo.go new file mode 100644 index 0000000..2447f08 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/terminfo.go @@ -0,0 +1,41 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Terminfo lexer. +var Terminfo = Register(MustNewLexer( + &Config{ + Name: "Terminfo", + Aliases: []string{"terminfo"}, + Filenames: []string{"terminfo", "terminfo.src"}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`^#.*$`, Comment, nil}, + {`^[^\s#,|]+`, NameTag, Push("names")}, + }, + "names": { + {`\n`, Text, Pop(1)}, + {`(,)([ \t]*)`, ByGroups(Punctuation, Text), Push("defs")}, + {`\|`, Punctuation, nil}, + {`[^,|]+`, NameAttribute, nil}, + }, + "defs": { + {`\n[ \t]+`, Text, nil}, + {`\n`, Text, Pop(2)}, + {`(#)([0-9]+)`, ByGroups(Operator, LiteralNumber), nil}, + {`=`, Operator, Push("data")}, + {`(,)([ \t]*)`, ByGroups(Punctuation, Text), nil}, + {`[^\s,=#]+`, NameClass, nil}, + }, + "data": { + {`\\[,\\]`, Literal, nil}, + {`(,)([ \t]*)`, ByGroups(Punctuation, Text), Pop(1)}, + {`[^\\,]+`, Literal, nil}, + {`.`, Literal, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/terraform.go b/vendor/github.com/alecthomas/chroma/lexers/terraform.go new file mode 100644 index 0000000..98c3a32 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/terraform.go @@ -0,0 +1,68 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Terraform lexer. +var Terraform = Register(MustNewLexer( + &Config{ + Name: "Terraform", + Aliases: []string{"terraform", "tf"}, + Filenames: []string{"*.tf"}, + MimeTypes: []string{"application/x-tf", "application/x-terraform"}, + }, + Rules{ + "root": { + Include("string"), + Include("punctuation"), + Include("curly"), + Include("basic"), + Include("whitespace"), + {`[0-9]+`, LiteralNumber, nil}, + }, + "basic": { + {Words(`\b`, `\b`, `true`, `false`), KeywordType, nil}, + {`\s*/\*`, CommentMultiline, Push("comment")}, + {`\s*#.*\n`, CommentSingle, nil}, + {`(.*?)(\s*)(=)`, ByGroups(NameAttribute, Text, Operator), nil}, + {Words(`\b`, `\b`, `variable`, `resource`, `provider`, `provisioner`, `module`), KeywordReserved, Push("function")}, + {Words(`\b`, `\b`, `ingress`, `egress`, `listener`, `default`, `connection`, `alias`), KeywordDeclaration, nil}, + {`\$\{`, LiteralStringInterpol, Push("var_builtin")}, + }, + "function": { + {`(\s+)(".*")(\s+)`, ByGroups(Text, LiteralString, Text), nil}, + Include("punctuation"), + Include("curly"), + }, + "var_builtin": { + {`\$\{`, LiteralStringInterpol, Push()}, + {Words(`\b`, `\b`, `concat`, `file`, `join`, `lookup`, `element`), NameBuiltin, nil}, + Include("string"), + Include("punctuation"), + {`\s+`, Text, nil}, + {`\}`, LiteralStringInterpol, Pop(1)}, + }, + "string": { + {`(".*")`, ByGroups(LiteralStringDouble), nil}, + }, + "punctuation": { + {`[\[\](),.]`, Punctuation, nil}, + }, + "curly": { + {`\{`, TextPunctuation, nil}, + {`\}`, TextPunctuation, nil}, + }, + "comment": { + {`[^*/]`, CommentMultiline, nil}, + {`/\*`, CommentMultiline, Push()}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[*/]`, CommentMultiline, nil}, + }, + "whitespace": { + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`\\\n`, Text, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/thrift.go b/vendor/github.com/alecthomas/chroma/lexers/thrift.go new file mode 100644 index 0000000..84062dc --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/thrift.go @@ -0,0 +1,72 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Thrift lexer. +var Thrift = Register(MustNewLexer( + &Config{ + Name: "Thrift", + Aliases: []string{"thrift"}, + Filenames: []string{"*.thrift"}, + MimeTypes: []string{"application/x-thrift"}, + }, + Rules{ + "root": { + Include("whitespace"), + Include("comments"), + {`"`, LiteralStringDouble, Combined("stringescape", "dqs")}, + {`\'`, LiteralStringSingle, Combined("stringescape", "sqs")}, + {`(namespace)(\s+)`, ByGroups(KeywordNamespace, TextWhitespace), Push("namespace")}, + {`(enum|union|struct|service|exception)(\s+)`, ByGroups(KeywordDeclaration, TextWhitespace), Push("class")}, + {`((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)((?:[^\W\d]|\$)[\w$]*)(\s*)(\()`, ByGroups(UsingSelf("root"), NameFunction, Text, Operator), nil}, + Include("keywords"), + Include("numbers"), + {`[&=]`, Operator, nil}, + {`[:;,{}()<>\[\]]`, Punctuation, nil}, + {`[a-zA-Z_](\.\w|\w)*`, Name, nil}, + }, + "whitespace": { + {`\n`, TextWhitespace, nil}, + {`\s+`, TextWhitespace, nil}, + }, + "comments": { + {`#.*$`, Comment, nil}, + {`//.*?\n`, Comment, nil}, + {`/\*[\w\W]*?\*/`, CommentMultiline, nil}, + }, + "stringescape": { + {`\\([\\nrt"\'])`, LiteralStringEscape, nil}, + }, + "dqs": { + {`"`, LiteralStringDouble, Pop(1)}, + {`[^\\"\n]+`, LiteralStringDouble, nil}, + }, + "sqs": { + {`'`, LiteralStringSingle, Pop(1)}, + {`[^\\\'\n]+`, LiteralStringSingle, nil}, + }, + "namespace": { + {`[a-z*](\.\w|\w)*`, NameNamespace, Pop(1)}, + Default(Pop(1)), + }, + "class": { + {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + Default(Pop(1)), + }, + "keywords": { + {`(async|oneway|extends|throws|required|optional)\b`, Keyword, nil}, + {`(true|false)\b`, KeywordConstant, nil}, + {`(const|typedef)\b`, KeywordDeclaration, nil}, + {Words(``, `\b`, `cpp_namespace`, `cpp_include`, `cpp_type`, `java_package`, `cocoa_prefix`, `csharp_namespace`, `delphi_namespace`, `php_namespace`, `py_module`, `perl_package`, `ruby_namespace`, `smalltalk_category`, `smalltalk_prefix`, `xsd_all`, `xsd_optional`, `xsd_nillable`, `xsd_namespace`, `xsd_attrs`, `include`), KeywordNamespace, nil}, + {Words(``, `\b`, `void`, `bool`, `byte`, `i16`, `i32`, `i64`, `double`, `string`, `binary`, `map`, `list`, `set`, `slist`, `senum`), KeywordType, nil}, + {Words(`\b`, `\b`, `BEGIN`, `END`, `__CLASS__`, `__DIR__`, `__FILE__`, `__FUNCTION__`, `__LINE__`, `__METHOD__`, `__NAMESPACE__`, `abstract`, `alias`, `and`, `args`, `as`, `assert`, `begin`, `break`, `case`, `catch`, `class`, `clone`, `continue`, `declare`, `def`, `default`, `del`, `delete`, `do`, `dynamic`, `elif`, `else`, `elseif`, `elsif`, `end`, `enddeclare`, `endfor`, `endforeach`, `endif`, `endswitch`, `endwhile`, `ensure`, `except`, `exec`, `finally`, `float`, `for`, `foreach`, `function`, `global`, `goto`, `if`, `implements`, `import`, `in`, `inline`, `instanceof`, `interface`, `is`, `lambda`, `module`, `native`, `new`, `next`, `nil`, `not`, `or`, `pass`, `public`, `print`, `private`, `protected`, `raise`, `redo`, `rescue`, `retry`, `register`, `return`, `self`, `sizeof`, `static`, `super`, `switch`, `synchronized`, `then`, `this`, `throw`, `transient`, `try`, `undef`, `unless`, `unsigned`, `until`, `use`, `var`, `virtual`, `volatile`, `when`, `while`, `with`, `xor`, `yield`), KeywordReserved, nil}, + }, + "numbers": { + {`[+-]?(\d+\.\d+([eE][+-]?\d+)?|\.?\d+[eE][+-]?\d+)`, LiteralNumberFloat, nil}, + {`[+-]?0x[0-9A-Fa-f]+`, LiteralNumberHex, nil}, + {`[+-]?[0-9]+`, LiteralNumberInteger, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/toml.go b/vendor/github.com/alecthomas/chroma/lexers/toml.go new file mode 100644 index 0000000..1b9c621 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/toml.go @@ -0,0 +1,28 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +var TOML = Register(MustNewLexer( + &Config{ + Name: "TOML", + Aliases: []string{"toml"}, + Filenames: []string{"*.toml"}, + MimeTypes: []string{"text/x-toml"}, + }, + Rules{ + "root": { + {`\s+`, Text, nil}, + {`#.*`, Comment, nil}, + {Words(``, `\b`, `true`, `false`), KeywordConstant, nil}, + {`\d\d\d\d-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d\+)?(Z|[+-]\d{2}:\d{2})`, LiteralDate, nil}, + {`[+-]?[0-9](_?\d)*\.\d+`, LiteralNumberFloat, nil}, + {`[+-]?[0-9](_?\d)*`, LiteralNumberInteger, nil}, + {`"(\\\\|\\"|[^"])*"`, StringDouble, nil}, + {`'(\\\\|\\'|[^'])*'`, StringSingle, nil}, + {`[.,=\[\]]`, Punctuation, nil}, + {`[^\W\d]\w*`, NameOther, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/transactsql.go b/vendor/github.com/alecthomas/chroma/lexers/transactsql.go new file mode 100644 index 0000000..91acdac --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/transactsql.go @@ -0,0 +1,49 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// TransactSQL lexer. +var TransactSQL = Register(MustNewLexer( + &Config{ + Name: "Transact-SQL", + Aliases: []string{"tsql", "t-sql"}, + MimeTypes: []string{"text/x-tsql"}, + NotMultiline: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\s+`, TextWhitespace, nil}, + {`--(?m).*?$\n?`, CommentSingle, nil}, + {`/\*`, CommentMultiline, Push("multiline-comments")}, + {Words(``, ``, `!<`, `!=`, `!>`, `<`, `<=`, `<>`, `=`, `>`, `>=`, `+`, `+=`, `-`, `-=`, `*`, `*=`, `/`, `/=`, `%`, `%=`, `&`, `&=`, `|`, `|=`, `^`, `^=`, `~`, `::`), Operator, nil}, + {Words(``, `\b`, `all`, `and`, `any`, `between`, `except`, `exists`, `in`, `intersect`, `like`, `not`, `or`, `some`, `union`), OperatorWord, nil}, + {Words(``, `\b`, `bigint`, `binary`, `bit`, `char`, `cursor`, `date`, `datetime`, `datetime2`, `datetimeoffset`, `decimal`, `float`, `hierarchyid`, `image`, `int`, `money`, `nchar`, `ntext`, `numeric`, `nvarchar`, `real`, `smalldatetime`, `smallint`, `smallmoney`, `sql_variant`, `table`, `text`, `time`, `timestamp`, `tinyint`, `uniqueidentifier`, `varbinary`, `varchar`, `xml`), NameClass, nil}, + {Words(``, `\b`, `$partition`, `abs`, `acos`, `app_name`, `applock_mode`, `applock_test`, `ascii`, `asin`, `assemblyproperty`, `atan`, `atn2`, `avg`, `binary_checksum`, `cast`, `ceiling`, `certencoded`, `certprivatekey`, `char`, `charindex`, `checksum`, `checksum_agg`, `choose`, `col_length`, `col_name`, `columnproperty`, `compress`, `concat`, `connectionproperty`, `context_info`, `convert`, `cos`, `cot`, `count`, `count_big`, `current_request_id`, `current_timestamp`, `current_transaction_id`, `current_user`, `cursor_status`, `database_principal_id`, `databasepropertyex`, `dateadd`, `datediff`, `datediff_big`, `datefromparts`, `datename`, `datepart`, `datetime2fromparts`, `datetimefromparts`, `datetimeoffsetfromparts`, `day`, `db_id`, `db_name`, `decompress`, `degrees`, `dense_rank`, `difference`, `eomonth`, `error_line`, `error_message`, `error_number`, `error_procedure`, `error_severity`, `error_state`, `exp`, `file_id`, `file_idex`, `file_name`, `filegroup_id`, `filegroup_name`, `filegroupproperty`, `fileproperty`, `floor`, `format`, `formatmessage`, `fulltextcatalogproperty`, `fulltextserviceproperty`, `get_filestream_transaction_context`, `getansinull`, `getdate`, `getutcdate`, `grouping`, `grouping_id`, `has_perms_by_name`, `host_id`, `host_name`, `iif`, `index_col`, `indexkey_property`, `indexproperty`, `is_member`, `is_rolemember`, `is_srvrolemember`, `isdate`, `isjson`, `isnull`, `isnumeric`, `json_modify`, `json_query`, `json_value`, `left`, `len`, `log`, `log10`, `lower`, `ltrim`, `max`, `min`, `min_active_rowversion`, `month`, `nchar`, `newid`, `newsequentialid`, `ntile`, `object_definition`, `object_id`, `object_name`, `object_schema_name`, `objectproperty`, `objectpropertyex`, `opendatasource`, `openjson`, `openquery`, `openrowset`, `openxml`, `original_db_name`, `original_login`, `parse`, `parsename`, `patindex`, `permissions`, `pi`, `power`, `pwdcompare`, `pwdencrypt`, `quotename`, `radians`, `rand`, `rank`, `replace`, `replicate`, `reverse`, `right`, `round`, `row_number`, `rowcount_big`, `rtrim`, `schema_id`, `schema_name`, `scope_identity`, `serverproperty`, `session_context`, `session_user`, `sign`, `sin`, `smalldatetimefromparts`, `soundex`, `sp_helplanguage`, `space`, `sqrt`, `square`, `stats_date`, `stdev`, `stdevp`, `str`, `string_escape`, `string_split`, `stuff`, `substring`, `sum`, `suser_id`, `suser_name`, `suser_sid`, `suser_sname`, `switchoffset`, `sysdatetime`, `sysdatetimeoffset`, `system_user`, `sysutcdatetime`, `tan`, `textptr`, `textvalid`, `timefromparts`, `todatetimeoffset`, `try_cast`, `try_convert`, `try_parse`, `type_id`, `type_name`, `typeproperty`, `unicode`, `upper`, `user_id`, `user_name`, `var`, `varp`, `xact_state`, `year`), NameFunction, nil}, + {`(goto)(\s+)(\w+\b)`, ByGroups(Keyword, TextWhitespace, NameLabel), nil}, + {Words(``, `\b`, `absolute`, `action`, `ada`, `add`, `admin`, `after`, `aggregate`, `alias`, `all`, `allocate`, `alter`, `and`, `any`, `are`, `array`, `as`, `asc`, `asensitive`, `assertion`, `asymmetric`, `at`, `atomic`, `authorization`, `avg`, `backup`, `before`, `begin`, `between`, `binary`, `bit`, `bit_length`, `blob`, `boolean`, `both`, `breadth`, `break`, `browse`, `bulk`, `by`, `call`, `called`, `cardinality`, `cascade`, `cascaded`, `case`, `cast`, `catalog`, `catch`, `char`, `char_length`, `character`, `character_length`, `check`, `checkpoint`, `class`, `clob`, `close`, `clustered`, `coalesce`, `collate`, `collation`, `collect`, `column`, `commit`, `completion`, `compute`, `condition`, `connect`, `connection`, `constraint`, `constraints`, `constructor`, `contains`, `containstable`, `continue`, `convert`, `corr`, `corresponding`, `count`, `covar_pop`, `covar_samp`, `create`, `cross`, `cube`, `cume_dist`, `current`, `current_catalog`, `current_date`, `current_default_transform_group`, `current_path`, `current_role`, `current_schema`, `current_time`, `current_timestamp`, `current_transform_group_for_type`, `current_user`, `cursor`, `cycle`, `data`, `database`, `date`, `day`, `dbcc`, `deallocate`, `dec`, `decimal`, `declare`, `default`, `deferrable`, `deferred`, `delete`, `deny`, `depth`, `deref`, `desc`, `describe`, `descriptor`, `destroy`, `destructor`, `deterministic`, `diagnostics`, `dictionary`, `disconnect`, `disk`, `distinct`, `distributed`, `domain`, `double`, `drop`, `dump`, `dynamic`, `each`, `element`, `else`, `end`, `end-exec`, `equals`, `errlvl`, `escape`, `every`, `except`, `exception`, `exec`, `execute`, `exists`, `exit`, `external`, `extract`, `false`, `fetch`, `file`, `fillfactor`, `filter`, `first`, `float`, `for`, `foreign`, `fortran`, `found`, `free`, `freetext`, `freetexttable`, `from`, `full`, `fulltexttable`, `function`, `fusion`, `general`, `get`, `global`, `go`, `goto`, `grant`, `group`, `grouping`, `having`, `hold`, `holdlock`, `host`, `hour`, `identity`, `identity_insert`, `identitycol`, `if`, `ignore`, `immediate`, `in`, `include`, `index`, `indicator`, `initialize`, `initially`, `inner`, `inout`, `input`, `insensitive`, `insert`, `int`, `integer`, `intersect`, `intersection`, `interval`, `into`, `is`, `isolation`, `iterate`, `join`, `key`, `kill`, `language`, `large`, `last`, `lateral`, `leading`, `left`, `less`, `level`, `like`, `like_regex`, `limit`, `lineno`, `ln`, `load`, `local`, `localtime`, `localtimestamp`, `locator`, `lower`, `map`, `match`, `max`, `member`, `merge`, `method`, `min`, `minute`, `mod`, `modifies`, `modify`, `module`, `month`, `multiset`, `names`, `national`, `natural`, `nchar`, `nclob`, `new`, `next`, `no`, `nocheck`, `nonclustered`, `none`, `normalize`, `not`, `null`, `nullif`, `numeric`, `object`, `occurrences_regex`, `octet_length`, `of`, `off`, `offsets`, `old`, `on`, `only`, `open`, `opendatasource`, `openquery`, `openrowset`, `openxml`, `operation`, `option`, `or`, `order`, `ordinality`, `out`, `outer`, `output`, `over`, `overlaps`, `overlay`, `pad`, `parameter`, `parameters`, `partial`, `partition`, `pascal`, `path`, `percent`, `percent_rank`, `percentile_cont`, `percentile_disc`, `pivot`, `plan`, `position`, `position_regex`, `postfix`, `precision`, `prefix`, `preorder`, `prepare`, `preserve`, `primary`, `print`, `prior`, `privileges`, `proc`, `procedure`, `public`, `raiserror`, `range`, `read`, `reads`, `readtext`, `real`, `reconfigure`, `recursive`, `ref`, `references`, `referencing`, `regr_avgx`, `regr_avgy`, `regr_count`, `regr_intercept`, `regr_r2`, `regr_slope`, `regr_sxx`, `regr_sxy`, `regr_syy`, `relative`, `release`, `replication`, `restore`, `restrict`, `result`, `return`, `returns`, `revert`, `revoke`, `right`, `role`, `rollback`, `rollup`, `routine`, `row`, `rowcount`, `rowguidcol`, `rows`, `rule`, `save`, `savepoint`, `schema`, `scope`, `scroll`, `search`, `second`, `section`, `securityaudit`, `select`, `semantickeyphrasetable`, `semanticsimilaritydetailstable`, `semanticsimilaritytable`, `sensitive`, `sequence`, `session`, `session_user`, `set`, `sets`, `setuser`, `shutdown`, `similar`, `size`, `smallint`, `some`, `space`, `specific`, `specifictype`, `sql`, `sqlca`, `sqlcode`, `sqlerror`, `sqlexception`, `sqlstate`, `sqlwarning`, `start`, `state`, `statement`, `static`, `statistics`, `stddev_pop`, `stddev_samp`, `structure`, `submultiset`, `substring`, `substring_regex`, `sum`, `symmetric`, `system`, `system_user`, `table`, `tablesample`, `temporary`, `terminate`, `textsize`, `than`, `then`, `throw`, `time`, `timestamp`, `timezone_hour`, `timezone_minute`, `to`, `top`, `trailing`, `tran`, `transaction`, `translate`, `translate_regex`, `translation`, `treat`, `trigger`, `trim`, `true`, `truncate`, `try`, `try_convert`, `tsequal`, `uescape`, `under`, `union`, `unique`, `unknown`, `unnest`, `unpivot`, `update`, `updatetext`, `upper`, `usage`, `use`, `user`, `using`, `value`, `values`, `var_pop`, `var_samp`, `varchar`, `variable`, `varying`, `view`, `waitfor`, `when`, `whenever`, `where`, `while`, `width_bucket`, `window`, `with`, `within`, `without`, `work`, `write`, `writetext`, `xmlagg`, `xmlattributes`, `xmlbinary`, `xmlcast`, `xmlcomment`, `xmlconcat`, `xmldocument`, `xmlelement`, `xmlexists`, `xmlforest`, `xmliterate`, `xmlnamespaces`, `xmlparse`, `xmlpi`, `xmlquery`, `xmlserialize`, `xmltable`, `xmltext`, `xmlvalidate`, `year`, `zone`), Keyword, nil}, + {`(\[)([^]]+)(\])`, ByGroups(Operator, Name, Operator), nil}, + {`0x[0-9a-f]+`, LiteralNumberHex, nil}, + {`[0-9]+\.[0-9]*(e[+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`\.[0-9]+(e[+-]?[0-9]+)?`, LiteralNumberFloat, nil}, + {`[0-9]+e[+-]?[0-9]+`, LiteralNumberFloat, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`'(''|[^'])*'`, LiteralStringSingle, nil}, + {`"(""|[^"])*"`, LiteralStringSymbol, nil}, + {`[;(),.]`, Punctuation, nil}, + {`@@\w+`, NameBuiltin, nil}, + {`@\w+`, NameVariable, nil}, + {`(\w+)(:)`, ByGroups(NameLabel, Punctuation), nil}, + {`#?#?\w+`, Name, nil}, + {`\?`, NameVariableMagic, nil}, + }, + "multiline-comments": { + {`/\*`, CommentMultiline, Push("multiline-comments")}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[^/*]+`, CommentMultiline, nil}, + {`[/*]`, CommentMultiline, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/turtle.go b/vendor/github.com/alecthomas/chroma/lexers/turtle.go new file mode 100644 index 0000000..7cc0c3f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/turtle.go @@ -0,0 +1,66 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Turtle lexer. +var Turtle = Register(MustNewLexer( + &Config{ + Name: "Turtle", + Aliases: []string{"turtle"}, + Filenames: []string{"*.ttl"}, + MimeTypes: []string{"text/turtle", "application/x-turtle"}, + NotMultiline: true, + CaseInsensitive: true, + }, + Rules{ + "root": { + {`\s+`, TextWhitespace, nil}, + {"(@base|BASE)(\\s+)(<[^<>\"{}|^`\\\\\\x00-\\x20]*>)(\\s*)(\\.?)", ByGroups(Keyword, TextWhitespace, NameVariable, TextWhitespace, Punctuation), nil}, + {"(@prefix|PREFIX)(\\s+)((?:[a-z][\\w-]*)?\\:)(\\s+)(<[^<>\"{}|^`\\\\\\x00-\\x20]*>)(\\s*)(\\.?)", ByGroups(Keyword, TextWhitespace, NameNamespace, TextWhitespace, NameVariable, TextWhitespace, Punctuation), nil}, + {`(?<=\s)a(?=\s)`, KeywordType, nil}, + {"(<[^<>\"{}|^`\\\\\\x00-\\x20]*>)", NameVariable, nil}, + {`((?:[a-z][\w-]*)?\:)([a-z][\w-]*)`, ByGroups(NameNamespace, NameTag), nil}, + {`#[^\n]+`, Comment, nil}, + {`\b(true|false)\b`, Literal, nil}, + {`[+\-]?\d*\.\d+`, LiteralNumberFloat, nil}, + {`[+\-]?\d*(:?\.\d+)?E[+\-]?\d+`, LiteralNumberFloat, nil}, + {`[+\-]?\d+`, LiteralNumberInteger, nil}, + {`[\[\](){}.;,:^]`, Punctuation, nil}, + {`"""`, LiteralString, Push("triple-double-quoted-string")}, + {`"`, LiteralString, Push("single-double-quoted-string")}, + {`'''`, LiteralString, Push("triple-single-quoted-string")}, + {`'`, LiteralString, Push("single-single-quoted-string")}, + }, + "triple-double-quoted-string": { + {`"""`, LiteralString, Push("end-of-string")}, + {`[^\\]+`, LiteralString, nil}, + {`\\`, LiteralString, Push("string-escape")}, + }, + "single-double-quoted-string": { + {`"`, LiteralString, Push("end-of-string")}, + {`[^"\\\n]+`, LiteralString, nil}, + {`\\`, LiteralString, Push("string-escape")}, + }, + "triple-single-quoted-string": { + {`'''`, LiteralString, Push("end-of-string")}, + {`[^\\]+`, LiteralString, nil}, + {`\\`, LiteralString, Push("string-escape")}, + }, + "single-single-quoted-string": { + {`'`, LiteralString, Push("end-of-string")}, + {`[^'\\\n]+`, LiteralString, nil}, + {`\\`, LiteralString, Push("string-escape")}, + }, + "string-escape": { + {`.`, LiteralString, Pop(1)}, + }, + "end-of-string": { + {`(@)([a-z]+(:?-[a-z0-9]+)*)`, ByGroups(Operator, GenericEmph, GenericEmph), Pop(2)}, + {"(\\^\\^)(<[^<>\"{}|^`\\\\\\x00-\\x20]*>)", ByGroups(Operator, GenericEmph), Pop(2)}, + {`(\^\^)((?:[a-z][\w-]*)?\:)([a-z][\w-]*)`, ByGroups(Operator, GenericEmph, GenericEmph), Pop(2)}, + Default(Pop(2)), + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/twig.go b/vendor/github.com/alecthomas/chroma/lexers/twig.go new file mode 100644 index 0000000..753e5af --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/twig.go @@ -0,0 +1,53 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Twig lexer. +var Twig = Register(MustNewLexer( + &Config{ + Name: "Twig", + Aliases: []string{"twig"}, + Filenames: []string{}, + MimeTypes: []string{"application/x-twig"}, + DotAll: true, + }, + Rules{ + "root": { + {`[^{]+`, Other, nil}, + {`\{\{`, CommentPreproc, Push("var")}, + {`\{\#.*?\#\}`, Comment, nil}, + {`(\{%)(-?\s*)(raw)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endraw)(\s*-?)(%\})`, ByGroups(CommentPreproc, Text, Keyword, Text, CommentPreproc, Other, CommentPreproc, Text, Keyword, Text, CommentPreproc), nil}, + {`(\{%)(-?\s*)(verbatim)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endverbatim)(\s*-?)(%\})`, ByGroups(CommentPreproc, Text, Keyword, Text, CommentPreproc, Other, CommentPreproc, Text, Keyword, Text, CommentPreproc), nil}, + {`(\{%)(-?\s*)(filter)(\s+)((?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w-]|[^\x00-\x7f])*)`, ByGroups(CommentPreproc, Text, Keyword, Text, NameFunction), Push("tag")}, + {`(\{%)(-?\s*)([a-zA-Z_]\w*)`, ByGroups(CommentPreproc, Text, Keyword), Push("tag")}, + {`\{`, Other, nil}, + }, + "varnames": { + {`(\|)(\s*)((?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w-]|[^\x00-\x7f])*)`, ByGroups(Operator, Text, NameFunction), nil}, + {`(is)(\s+)(not)?(\s*)((?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w-]|[^\x00-\x7f])*)`, ByGroups(Keyword, Text, Keyword, Text, NameFunction), nil}, + {`(?i)(true|false|none|null)\b`, KeywordPseudo, nil}, + {`(in|not|and|b-and|or|b-or|b-xor|isif|elseif|else|importconstant|defined|divisibleby|empty|even|iterable|odd|sameasmatches|starts\s+with|ends\s+with)\b`, Keyword, nil}, + {`(loop|block|parent)\b`, NameBuiltin, nil}, + {`(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w-]|[^\x00-\x7f])*`, NameVariable, nil}, + {`\.(?:[\\_a-z]|[^\x00-\x7f])(?:[\\\w-]|[^\x00-\x7f])*`, NameVariable, nil}, + {`\.[0-9]+`, LiteralNumber, nil}, + {`:?"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`:?'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil}, + {`([{}()\[\]+\-*/,:~%]|\.\.|\?|:|\*\*|\/\/|!=|[><=]=?)`, Operator, nil}, + {`[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?`, LiteralNumber, nil}, + }, + "var": { + {`\s+`, Text, nil}, + {`(-?)(\}\})`, ByGroups(Text, CommentPreproc), Pop(1)}, + Include("varnames"), + }, + "tag": { + {`\s+`, Text, nil}, + {`(-?)(%\})`, ByGroups(Text, CommentPreproc), Pop(1)}, + Include("varnames"), + {`.`, Punctuation, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/typescript.go b/vendor/github.com/alecthomas/chroma/lexers/typescript.go new file mode 100644 index 0000000..bcd8d52 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/typescript.go @@ -0,0 +1,71 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// TypeScript lexer. +var TypeScript = Register(MustNewLexer( + &Config{ + Name: "TypeScript", + Aliases: []string{"ts", "typescript"}, + Filenames: []string{"*.ts", "*.tsx"}, + MimeTypes: []string{"text/x-typescript"}, + DotAll: true, + }, + Rules{ + "commentsandwhitespace": { + {`\s+`, Text, nil}, + {``, Comment, Pop(1)}, + {`-`, Comment, nil}, + }, + "tag": { + {`\s+`, Text, nil}, + {`[\w.:-]+\s*=`, NameAttribute, Push("attr")}, + {`/?\s*>`, NameTag, Pop(1)}, + }, + "attr": { + {`\s+`, Text, nil}, + {`".*?"`, LiteralString, Pop(1)}, + {`'.*?'`, LiteralString, Pop(1)}, + {`[^\s>]+`, LiteralString, Pop(1)}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/xorg.go b/vendor/github.com/alecthomas/chroma/lexers/xorg.go new file mode 100644 index 0000000..4e8d6ea --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/xorg.go @@ -0,0 +1,24 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +// Xorg lexer. +var Xorg = Register(MustNewLexer( + &Config{ + Name: "Xorg", + Aliases: []string{"xorg.conf"}, + Filenames: []string{"xorg.conf"}, + MimeTypes: []string{}, + }, + Rules{ + "root": { + {`\s+`, TextWhitespace, nil}, + {`#.*$`, Comment, nil}, + {`((|Sub)Section)(\s+)("\w+")`, ByGroups(KeywordNamespace, LiteralStringEscape, TextWhitespace, LiteralStringEscape), nil}, + {`(End(|Sub)Section)`, KeywordNamespace, nil}, + {`(\w+)(\s+)([^\n#]+)`, ByGroups(NameKeyword, TextWhitespace, LiteralString), nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/yaml.go b/vendor/github.com/alecthomas/chroma/lexers/yaml.go new file mode 100644 index 0000000..7a7a9ea --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/yaml.go @@ -0,0 +1,38 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma" // nolint +) + +var YAML = Register(MustNewLexer( + &Config{ + Name: "YAML", + Aliases: []string{"yaml"}, + Filenames: []string{"*.yaml", "*.yml"}, + MimeTypes: []string{"text/x-yaml"}, + }, + Rules{ + "root": { + Include("whitespace"), + {`#.*`, Comment, nil}, + {`![^\s]+`, CommentPreproc, nil}, + {`\s&[^\s]+`, CommentPreproc, nil}, + {`\s\*[^\s]+`, CommentPreproc, nil}, + {`^%include\s+[^\n\r]+`, CommentPreproc, nil}, + {`([>|])(\s+)((?:(?:.*?$)(?:[\n\r]*?\2)?)*)`, ByGroups(StringDoc, StringDoc, StringDoc), nil}, + Include("value"), + {`[?:,\[\]]`, Punctuation, nil}, + {`.`, Text, nil}, + }, + "value": { + {Words(``, `\b`, "true", "false", "null"), KeywordConstant, nil}, + {`"(?:\\.|[^"])*"`, StringDouble, nil}, + {`'(?:\\.|[^'])*'`, StringSingle, nil}, + {`\d\d\d\d-\d\d-\d\d([T ]\d\d:\d\d:\d\d(\.\d+)?(Z|\s+[-+]\d+)?)?`, LiteralDate, nil}, + {`\b[+\-]?(0x[\da-f]+|0o[0-7]+|(\d+\.?\d*|\.?\d+)(e[\+\-]?\d+)?|\.inf|\.nan)\b`, Number, nil}, + }, + "whitespace": { + {`\s+`, Whitespace, nil}, + }, + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/mutators.go b/vendor/github.com/alecthomas/chroma/mutators.go new file mode 100644 index 0000000..e4d1f84 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/mutators.go @@ -0,0 +1,122 @@ +package chroma + +import ( + "fmt" + "strings" +) + +// A Mutator modifies the behaviour of the lexer. +type Mutator interface { + // Mutate the lexer state machine as it is processing. + Mutate(state *LexerState) error +} + +// A LexerMutator is an additional interface that a Mutator can implement +// to modify the lexer when it is compiled. +type LexerMutator interface { + // Rules are the lexer rules, state is the state key for the rule the mutator is associated with. + MutateLexer(rules CompiledRules, state string, rule int) error +} + +// A MutatorFunc is a Mutator that mutates the lexer state machine as it is processing. +type MutatorFunc func(state *LexerState) error + +func (m MutatorFunc) Mutate(state *LexerState) error { return m(state) } + +// Mutators applies a set of Mutators in order. +func Mutators(modifiers ...Mutator) MutatorFunc { + return func(state *LexerState) error { + for _, modifier := range modifiers { + if err := modifier.Mutate(state); err != nil { + return err + } + } + return nil + } +} + +type includeMutator struct { + state string +} + +// Include the given state. +func Include(state string) Rule { + return Rule{Mutator: &includeMutator{state}} +} + +func (i *includeMutator) Mutate(s *LexerState) error { + return fmt.Errorf("should never reach here Include(%q)", i.state) +} + +func (i *includeMutator) MutateLexer(rules CompiledRules, state string, rule int) error { + includedRules, ok := rules[i.state] + if !ok { + return fmt.Errorf("invalid include state %q", i.state) + } + rules[state] = append(rules[state][:rule], append(includedRules, rules[state][rule+1:]...)...) + return nil +} + +type combinedMutator struct { + states []string +} + +// Combined creates a new anonymous state from the given states, and pushes that state. +func Combined(states ...string) Mutator { + return &combinedMutator{states} +} + +func (c *combinedMutator) Mutate(s *LexerState) error { + return fmt.Errorf("should never reach here Combined(%v)", c.states) +} + +func (c *combinedMutator) MutateLexer(rules CompiledRules, state string, rule int) error { + name := "__combined_" + strings.Join(c.states, "__") + if _, ok := rules[name]; !ok { + combined := []*CompiledRule{} + for _, state := range c.states { + rules, ok := rules[state] + if !ok { + return fmt.Errorf("invalid combine state %q", state) + } + combined = append(combined, rules...) + } + rules[name] = combined + } + rules[state][rule].Mutator = Push(name) + return nil +} + +// Push states onto the stack. +func Push(states ...string) MutatorFunc { + return func(s *LexerState) error { + if len(states) == 0 { + s.Stack = append(s.Stack, s.State) + } else { + for _, state := range states { + if state == "#pop" { + s.Stack = s.Stack[:len(s.Stack)-1] + } else { + s.Stack = append(s.Stack, state) + } + } + } + return nil + } +} + +// Pop state from the stack when rule matches. +func Pop(n int) MutatorFunc { + return func(state *LexerState) error { + if len(state.Stack) == 0 { + return fmt.Errorf("nothing to pop") + } + state.Stack = state.Stack[:len(state.Stack)-n] + return nil + } +} + +// Default returns a Rule that applies a set of Mutators. +func Default(mutators ...Mutator) Rule { + return Rule{Mutator: Mutators(mutators...)} +} diff --git a/vendor/github.com/alecthomas/chroma/mutators_test.go b/vendor/github.com/alecthomas/chroma/mutators_test.go new file mode 100644 index 0000000..82c43b6 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/mutators_test.go @@ -0,0 +1,57 @@ +package chroma + +import ( + "testing" + + "github.com/alecthomas/assert" +) + +func TestInclude(t *testing.T) { + include := Include("other") + actual := CompiledRules{ + "root": {{Rule: include}}, + "other": { + {Rule: Rule{Pattern: "//.+", Type: Comment}}, + {Rule: Rule{Pattern: `"[^"]*"`, Type: String}}, + }, + } + lexer := &RegexLexer{rules: actual} + err := include.Mutator.(LexerMutator).MutateLexer(lexer.rules, "root", 0) + assert.NoError(t, err) + expected := CompiledRules{ + "root": { + {Rule: Rule{ + Pattern: "//.+", + Type: Comment, + }}, + {Rule: Rule{ + Pattern: `"[^"]*"`, + Type: String, + }}, + }, + "other": { + {Rule: Rule{ + Pattern: "//.+", + Type: Comment, + }}, + {Rule: Rule{ + Pattern: `"[^"]*"`, + Type: String, + }}, + }, + } + assert.Equal(t, expected, actual) +} + +func TestCombine(t *testing.T) { + l := MustNewLexer(nil, Rules{ + "root": {{`hello`, String, Combined("world", "bye", "space")}}, + "world": {{`world`, Name, nil}}, + "bye": {{`bye`, Name, nil}}, + "space": {{`\s+`, Whitespace, nil}}, + }) + it, err := l.Tokenise(nil, "hello world") + assert.NoError(t, err) + expected := []*Token{{String, `hello`}, {Whitespace, ` `}, {Name, `world`}} + assert.Equal(t, expected, it.Tokens()) +} diff --git a/vendor/github.com/alecthomas/chroma/pygments-lexers.txt b/vendor/github.com/alecthomas/chroma/pygments-lexers.txt new file mode 100644 index 0000000..9c9ced2 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/pygments-lexers.txt @@ -0,0 +1,325 @@ +Generated with: + + g 'class.*RegexLexer' | pawk --strict -F: '"pygments.lexers.%s.%s" % (f[0].split(".")[0], f[2].split()[1].split("(")[0])' > lexers.txt + +perl6: + Requires a bunch of helpers that I do not have the time to convert. + +kotlin: + invalid unicode escape sequences + FIXED: Have to disable wide Unicode characters in unistring.py + +pygments.lexers.ambient.AmbientTalkLexer +pygments.lexers.ampl.AmplLexer +pygments.lexers.actionscript.ActionScriptLexer +pygments.lexers.actionscript.ActionScript3Lexer +pygments.lexers.actionscript.MxmlLexer +pygments.lexers.algebra.GAPLexer +pygments.lexers.algebra.MathematicaLexer +pygments.lexers.algebra.MuPADLexer +pygments.lexers.algebra.BCLexer +pygments.lexers.apl.APLLexer +pygments.lexers.bibtex.BibTeXLexer +pygments.lexers.bibtex.BSTLexer +pygments.lexers.basic.BlitzMaxLexer +pygments.lexers.basic.BlitzBasicLexer +pygments.lexers.basic.MonkeyLexer +pygments.lexers.basic.CbmBasicV2Lexer +pygments.lexers.basic.QBasicLexer +pygments.lexers.automation.AutohotkeyLexer +pygments.lexers.automation.AutoItLexer +pygments.lexers.archetype.AtomsLexer +pygments.lexers.c_like.ClayLexer +pygments.lexers.c_like.ValaLexer +pygments.lexers.asm.GasLexer +pygments.lexers.asm.ObjdumpLexer +pygments.lexers.asm.HsailLexer +pygments.lexers.asm.LlvmLexer +pygments.lexers.asm.NasmLexer +pygments.lexers.asm.TasmLexer +pygments.lexers.asm.Ca65Lexer +pygments.lexers.business.CobolLexer +pygments.lexers.business.ABAPLexer +pygments.lexers.business.OpenEdgeLexer +pygments.lexers.business.GoodDataCLLexer +pygments.lexers.business.MaqlLexer +pygments.lexers.capnproto.CapnProtoLexer +pygments.lexers.chapel.ChapelLexer +pygments.lexers.clean.CleanLexer +pygments.lexers.c_cpp.CFamilyLexer +pygments.lexers.console.VCTreeStatusLexer +pygments.lexers.console.PyPyLogLexer +pygments.lexers.csound.CsoundLexer +pygments.lexers.csound.CsoundDocumentLexer +pygments.lexers.csound.CsoundDocumentLexer +pygments.lexers.crystal.CrystalLexer +pygments.lexers.dalvik.SmaliLexer +pygments.lexers.css.CssLexer +pygments.lexers.css.SassLexer +pygments.lexers.css.ScssLexer +pygments.lexers.configs.IniLexer +pygments.lexers.configs.RegeditLexer +pygments.lexers.configs.PropertiesLexer +pygments.lexers.configs.KconfigLexer +pygments.lexers.configs.Cfengine3Lexer +pygments.lexers.configs.ApacheConfLexer +pygments.lexers.configs.SquidConfLexer +pygments.lexers.configs.NginxConfLexer +pygments.lexers.configs.LighttpdConfLexer +pygments.lexers.configs.DockerLexer +pygments.lexers.configs.TerraformLexer +pygments.lexers.configs.TermcapLexer +pygments.lexers.configs.TerminfoLexer +pygments.lexers.configs.PkgConfigLexer +pygments.lexers.configs.PacmanConfLexer +pygments.lexers.data.YamlLexer +pygments.lexers.data.JsonLexer +pygments.lexers.diff.DiffLexer +pygments.lexers.diff.DarcsPatchLexer +pygments.lexers.diff.WDiffLexer +pygments.lexers.dotnet.CSharpLexer +pygments.lexers.dotnet.NemerleLexer +pygments.lexers.dotnet.BooLexer +pygments.lexers.dotnet.VbNetLexer +pygments.lexers.dotnet.GenericAspxLexer +pygments.lexers.dotnet.FSharpLexer +pygments.lexers.dylan.DylanLexer +pygments.lexers.dylan.DylanLidLexer +pygments.lexers.ecl.ECLLexer +pygments.lexers.eiffel.EiffelLexer +pygments.lexers.dsls.ProtoBufLexer +pygments.lexers.dsls.ThriftLexer +pygments.lexers.dsls.BroLexer +pygments.lexers.dsls.PuppetLexer +pygments.lexers.dsls.RslLexer +pygments.lexers.dsls.MscgenLexer +pygments.lexers.dsls.VGLLexer +pygments.lexers.dsls.AlloyLexer +pygments.lexers.dsls.PanLexer +pygments.lexers.dsls.CrmshLexer +pygments.lexers.dsls.FlatlineLexer +pygments.lexers.dsls.SnowballLexer +pygments.lexers.elm.ElmLexer +pygments.lexers.erlang.ErlangLexer +pygments.lexers.erlang.ElixirLexer +pygments.lexers.ezhil.EzhilLexer +pygments.lexers.esoteric.BrainfuckLexer +pygments.lexers.esoteric.BefungeLexer +pygments.lexers.esoteric.CAmkESLexer +pygments.lexers.esoteric.CapDLLexer +pygments.lexers.esoteric.RedcodeLexer +pygments.lexers.esoteric.AheuiLexer +pygments.lexers.factor.FactorLexer +pygments.lexers.fantom.FantomLexer +pygments.lexers.felix.FelixLexer +pygments.lexers.forth.ForthLexer +pygments.lexers.fortran.FortranLexer +pygments.lexers.fortran.FortranFixedLexer +pygments.lexers.go.GoLexer +pygments.lexers.foxpro.FoxProLexer +pygments.lexers.graph.CypherLexer +pygments.lexers.grammar_notation.BnfLexer +pygments.lexers.grammar_notation.AbnfLexer +pygments.lexers.grammar_notation.JsgfLexer +pygments.lexers.graphics.GLShaderLexer +pygments.lexers.graphics.PostScriptLexer +pygments.lexers.graphics.AsymptoteLexer +pygments.lexers.graphics.GnuplotLexer +pygments.lexers.graphics.PovrayLexer +pygments.lexers.hexdump.HexdumpLexer +pygments.lexers.haskell.HaskellLexer +pygments.lexers.haskell.IdrisLexer +pygments.lexers.haskell.AgdaLexer +pygments.lexers.haskell.CryptolLexer +pygments.lexers.haskell.KokaLexer +pygments.lexers.haxe.HaxeLexer +pygments.lexers.haxe.HxmlLexer +pygments.lexers.hdl.VerilogLexer +pygments.lexers.hdl.SystemVerilogLexer +pygments.lexers.hdl.VhdlLexer +pygments.lexers.idl.IDLLexer +pygments.lexers.inferno.LimboLexer +pygments.lexers.igor.IgorLexer +pygments.lexers.html.HtmlLexer +pygments.lexers.html.DtdLexer +pygments.lexers.html.XmlLexer +pygments.lexers.html.HamlLexer +pygments.lexers.html.ScamlLexer +pygments.lexers.html.PugLexer +pygments.lexers.installers.NSISLexer +pygments.lexers.installers.RPMSpecLexer +pygments.lexers.installers.SourcesListLexer +pygments.lexers.installers.DebianControlLexer +pygments.lexers.iolang.IoLexer +pygments.lexers.julia.JuliaLexer +pygments.lexers.int_fiction.Inform6Lexer +pygments.lexers.int_fiction.Inform7Lexer +pygments.lexers.int_fiction.Tads3Lexer +pygments.lexers.make.BaseMakefileLexer +pygments.lexers.make.CMakeLexer +pygments.lexers.javascript.JavascriptLexer +pygments.lexers.javascript.KalLexer +pygments.lexers.javascript.LiveScriptLexer +pygments.lexers.javascript.DartLexer +pygments.lexers.javascript.TypeScriptLexer +pygments.lexers.javascript.LassoLexer +pygments.lexers.javascript.ObjectiveJLexer +pygments.lexers.javascript.CoffeeScriptLexer +pygments.lexers.javascript.MaskLexer +pygments.lexers.javascript.EarlGreyLexer +pygments.lexers.javascript.JuttleLexer +pygments.lexers.jvm.JavaLexer +pygments.lexers.jvm.ScalaLexer +pygments.lexers.jvm.GosuLexer +pygments.lexers.jvm.GroovyLexer +pygments.lexers.jvm.IokeLexer +pygments.lexers.jvm.ClojureLexer +pygments.lexers.jvm.TeaLangLexer +pygments.lexers.jvm.CeylonLexer +pygments.lexers.jvm.KotlinLexer +pygments.lexers.jvm.XtendLexer +pygments.lexers.jvm.PigLexer +pygments.lexers.jvm.GoloLexer +pygments.lexers.jvm.JasminLexer +pygments.lexers.markup.BBCodeLexer +pygments.lexers.markup.MoinWikiLexer +pygments.lexers.markup.RstLexer +pygments.lexers.markup.TexLexer +pygments.lexers.markup.GroffLexer +pygments.lexers.markup.MozPreprocHashLexer +pygments.lexers.markup.MarkdownLexer +pygments.lexers.ml.SMLLexer +pygments.lexers.ml.OcamlLexer +pygments.lexers.ml.OpaLexer +pygments.lexers.modeling.ModelicaLexer +pygments.lexers.modeling.BugsLexer +pygments.lexers.modeling.JagsLexer +pygments.lexers.modeling.StanLexer +pygments.lexers.matlab.MatlabLexer +pygments.lexers.matlab.OctaveLexer +pygments.lexers.matlab.ScilabLexer +pygments.lexers.monte.MonteLexer +pygments.lexers.lisp.SchemeLexer +pygments.lexers.lisp.CommonLispLexer +pygments.lexers.lisp.HyLexer +pygments.lexers.lisp.RacketLexer +pygments.lexers.lisp.NewLispLexer +pygments.lexers.lisp.EmacsLispLexer +pygments.lexers.lisp.ShenLexer +pygments.lexers.lisp.XtlangLexer +pygments.lexers.modula2.Modula2Lexer +pygments.lexers.ncl.NCLLexer +pygments.lexers.nim.NimLexer +pygments.lexers.nit.NitLexer +pygments.lexers.nix.NixLexer +pygments.lexers.oberon.ComponentPascalLexer +pygments.lexers.ooc.OocLexer +pygments.lexers.objective.SwiftLexer +pygments.lexers.parasail.ParaSailLexer +pygments.lexers.pawn.SourcePawnLexer +pygments.lexers.pawn.PawnLexer +pygments.lexers.pascal.AdaLexer +pygments.lexers.parsers.RagelLexer +pygments.lexers.parsers.RagelEmbeddedLexer +pygments.lexers.parsers.AntlrLexer +pygments.lexers.parsers.TreetopBaseLexer +pygments.lexers.parsers.EbnfLexer +pygments.lexers.php.ZephirLexer +pygments.lexers.php.PhpLexer +pygments.lexers.perl.PerlLexer +pygments.lexers.perl.Perl6Lexer +pygments.lexers.praat.PraatLexer +pygments.lexers.prolog.PrologLexer +pygments.lexers.prolog.LogtalkLexer +pygments.lexers.qvt.QVToLexer +pygments.lexers.rdf.SparqlLexer +pygments.lexers.rdf.TurtleLexer +pygments.lexers.python.PythonLexer +pygments.lexers.python.Python3Lexer +pygments.lexers.python.PythonTracebackLexer +pygments.lexers.python.Python3TracebackLexer +pygments.lexers.python.CythonLexer +pygments.lexers.python.DgLexer +pygments.lexers.rebol.RebolLexer +pygments.lexers.rebol.RedLexer +pygments.lexers.resource.ResourceLexer +pygments.lexers.rnc.RNCCompactLexer +pygments.lexers.roboconf.RoboconfGraphLexer +pygments.lexers.roboconf.RoboconfInstancesLexer +pygments.lexers.rust.RustLexer +pygments.lexers.ruby.RubyLexer +pygments.lexers.ruby.FancyLexer +pygments.lexers.sas.SASLexer +pygments.lexers.smalltalk.SmalltalkLexer +pygments.lexers.smalltalk.NewspeakLexer +pygments.lexers.smv.NuSMVLexer +pygments.lexers.shell.BashLexer +pygments.lexers.shell.BatchLexer +pygments.lexers.shell.TcshLexer +pygments.lexers.shell.PowerShellLexer +pygments.lexers.shell.FishShellLexer +pygments.lexers.snobol.SnobolLexer +pygments.lexers.scripting.LuaLexer +pygments.lexers.scripting.ChaiscriptLexer +pygments.lexers.scripting.LSLLexer +pygments.lexers.scripting.AppleScriptLexer +pygments.lexers.scripting.RexxLexer +pygments.lexers.scripting.MOOCodeLexer +pygments.lexers.scripting.HybrisLexer +pygments.lexers.scripting.EasytrieveLexer +pygments.lexers.scripting.JclLexer +pygments.lexers.supercollider.SuperColliderLexer +pygments.lexers.stata.StataLexer +pygments.lexers.tcl.TclLexer +pygments.lexers.sql.PostgresLexer +pygments.lexers.sql.PlPgsqlLexer +pygments.lexers.sql.PsqlRegexLexer +pygments.lexers.sql.SqlLexer +pygments.lexers.sql.TransactSqlLexer +pygments.lexers.sql.MySqlLexer +pygments.lexers.sql.RqlLexer +pygments.lexers.testing.GherkinLexer +pygments.lexers.testing.TAPLexer +pygments.lexers.textedit.AwkLexer +pygments.lexers.textedit.VimLexer +pygments.lexers.textfmts.IrcLogsLexer +pygments.lexers.textfmts.GettextLexer +pygments.lexers.textfmts.HttpLexer +pygments.lexers.textfmts.TodotxtLexer +pygments.lexers.trafficscript.RtsLexer +pygments.lexers.theorem.CoqLexer +pygments.lexers.theorem.IsabelleLexer +pygments.lexers.theorem.LeanLexer +pygments.lexers.templates.SmartyLexer +pygments.lexers.templates.VelocityLexer +pygments.lexers.templates.DjangoLexer +pygments.lexers.templates.MyghtyLexer +pygments.lexers.templates.MasonLexer +pygments.lexers.templates.MakoLexer +pygments.lexers.templates.CheetahLexer +pygments.lexers.templates.GenshiTextLexer +pygments.lexers.templates.GenshiMarkupLexer +pygments.lexers.templates.JspRootLexer +pygments.lexers.templates.EvoqueLexer +pygments.lexers.templates.ColdfusionLexer +pygments.lexers.templates.ColdfusionMarkupLexer +pygments.lexers.templates.TeaTemplateRootLexer +pygments.lexers.templates.HandlebarsLexer +pygments.lexers.templates.LiquidLexer +pygments.lexers.templates.TwigLexer +pygments.lexers.templates.Angular2Lexer +pygments.lexers.urbi.UrbiscriptLexer +pygments.lexers.typoscript.TypoScriptCssDataLexer +pygments.lexers.typoscript.TypoScriptHtmlDataLexer +pygments.lexers.typoscript.TypoScriptLexer +pygments.lexers.varnish.VCLLexer +pygments.lexers.verification.BoogieLexer +pygments.lexers.verification.SilverLexer +pygments.lexers.x10.X10Lexer +pygments.lexers.whiley.WhileyLexer +pygments.lexers.xorg.XorgLexer +pygments.lexers.webmisc.DuelLexer +pygments.lexers.webmisc.XQueryLexer +pygments.lexers.webmisc.QmlLexer +pygments.lexers.webmisc.CirruLexer +pygments.lexers.webmisc.SlimLexer diff --git a/vendor/github.com/alecthomas/chroma/regexp.go b/vendor/github.com/alecthomas/chroma/regexp.go new file mode 100644 index 0000000..0500d22 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/regexp.go @@ -0,0 +1,328 @@ +package chroma + +import ( + "fmt" + "os" + "regexp" + "strings" + "sync" + "unicode/utf8" + + "github.com/dlclark/regexp2" +) + +type Rule struct { + Pattern string + Type Emitter + Mutator Mutator +} + +// An Emitter takes group matches and returns tokens. +type Emitter interface { + // Emit tokens for the given regex groups. + Emit(groups []string, lexer Lexer) Iterator +} + +// EmitterFunc is a function that is an Emitter. +type EmitterFunc func(groups []string, lexer Lexer) Iterator + +// Emit tokens for groups. +func (e EmitterFunc) Emit(groups []string, lexer Lexer) Iterator { return e(groups, lexer) } + +// ByGroups emits a token for each matching group in the rule's regex. +func ByGroups(emitters ...Emitter) Emitter { + return EmitterFunc(func(groups []string, lexer Lexer) Iterator { + iterators := make([]Iterator, 0, len(groups)-1) + // NOTE: If this panics, there is a mismatch with groups. Uncomment the following line to debug. + for i, group := range groups[1:] { + iterators = append(iterators, emitters[i].Emit([]string{group}, lexer)) + } + return Concaterator(iterators...) + }) +} + +// Using returns an Emitter that uses a given Lexer for parsing and emitting. +func Using(lexer Lexer, options *TokeniseOptions) Emitter { + return EmitterFunc(func(groups []string, _ Lexer) Iterator { + it, err := lexer.Tokenise(options, groups[0]) + if err != nil { + panic(err) + } + return it + }) +} + +// UsingSelf is like Using, but uses the current Lexer. +func UsingSelf(state string) Emitter { + return EmitterFunc(func(groups []string, lexer Lexer) Iterator { + it, err := lexer.Tokenise(&TokeniseOptions{State: state}, groups[0]) + if err != nil { + panic(err) + } + return it + }) +} + +// Words creates a regex that matches any of the given literal words. +func Words(prefix, suffix string, words ...string) string { + for i, word := range words { + words[i] = regexp.QuoteMeta(word) + } + return prefix + `(` + strings.Join(words, `|`) + `)` + suffix +} + +// Tokenise text using lexer, returning tokens as a slice. +func Tokenise(lexer Lexer, options *TokeniseOptions, text string) ([]*Token, error) { + out := []*Token{} + it, err := lexer.Tokenise(options, text) + if err != nil { + return nil, err + } + for t := it(); t != nil; t = it() { + out = append(out, t) + } + return out, nil +} + +// Rules maps from state to a sequence of Rules. +type Rules map[string][]Rule + +// MustNewLexer creates a new Lexer or panics. +func MustNewLexer(config *Config, rules Rules) *RegexLexer { + lexer, err := NewLexer(config, rules) + if err != nil { + panic(err) + } + return lexer +} + +// NewLexer creates a new regex-based Lexer. +// +// "rules" is a state machine transitition map. Each key is a state. Values are sets of rules +// that match input, optionally modify lexer state, and output tokens. +func NewLexer(config *Config, rules Rules) (*RegexLexer, error) { + if config == nil { + config = &Config{} + } + if _, ok := rules["root"]; !ok { + return nil, fmt.Errorf("no \"root\" state") + } + compiledRules := map[string][]*CompiledRule{} + for state, rules := range rules { + compiledRules[state] = nil + for _, rule := range rules { + flags := "" + if !config.NotMultiline { + flags += "m" + } + if config.CaseInsensitive { + flags += "i" + } + if config.DotAll { + flags += "s" + } + compiledRules[state] = append(compiledRules[state], &CompiledRule{Rule: rule, flags: flags}) + } + } + return &RegexLexer{ + config: config, + rules: compiledRules, + }, nil +} + +func (r *RegexLexer) Trace(trace bool) *RegexLexer { + r.trace = trace + return r +} + +// A CompiledRule is a Rule with a pre-compiled regex. +// +// Note that regular expressions are lazily compiled on first use of the lexer. +type CompiledRule struct { + Rule + Regexp *regexp2.Regexp + flags string +} + +type CompiledRules map[string][]*CompiledRule + +type LexerState struct { + Lexer *RegexLexer + Text []rune + Pos int + Rules CompiledRules + Stack []string + State string + Rule int + // Group matches. + Groups []string + // Custum context for mutators. + MutatorContext map[interface{}]interface{} + iteratorStack []Iterator +} + +func (l *LexerState) Set(key interface{}, value interface{}) { + l.MutatorContext[key] = value +} + +func (l *LexerState) Get(key interface{}) interface{} { + return l.MutatorContext[key] +} + +func (l *LexerState) Iterator() *Token { + for l.Pos < len(l.Text) && len(l.Stack) > 0 { + // Exhaust the iterator stack, if any. + for len(l.iteratorStack) > 0 { + n := len(l.iteratorStack) - 1 + t := l.iteratorStack[n]() + if t == nil { + l.iteratorStack = l.iteratorStack[:n] + continue + } + return t + } + + l.State = l.Stack[len(l.Stack)-1] + if l.Lexer.trace { + fmt.Fprintf(os.Stderr, "%s: pos=%d, text=%q\n", l.State, l.Pos, string(l.Text[l.Pos:])) + } + ruleIndex, rule, groups := matchRules(l.Text[l.Pos:], l.Rules[l.State]) + // No match. + if groups == nil { + l.Pos++ + return &Token{Error, string(l.Text[l.Pos-1 : l.Pos])} + } + l.Rule = ruleIndex + l.Groups = groups + l.Pos += utf8.RuneCountInString(groups[0]) + if rule.Mutator != nil { + if err := rule.Mutator.Mutate(l); err != nil { + panic(err) + } + } + if rule.Type != nil { + l.iteratorStack = append(l.iteratorStack, rule.Type.Emit(l.Groups, l.Lexer)) + } + } + // Exhaust the IteratorStack, if any. + // Duplicate code, but eh. + for len(l.iteratorStack) > 0 { + n := len(l.iteratorStack) - 1 + t := l.iteratorStack[n]() + if t == nil { + l.iteratorStack = l.iteratorStack[:n] + continue + } + return t + } + + // If we get to here and we still have text, return it as an error. + if l.Pos != len(l.Text) && len(l.Stack) == 0 { + value := string(l.Text[l.Pos:]) + l.Pos = len(l.Text) + return &Token{Type: Error, Value: value} + } + return nil +} + +type RegexLexer struct { + config *Config + analyser func(text string) float32 + trace bool + + mu sync.Mutex + compiled bool + rules map[string][]*CompiledRule +} + +// SetAnalyser sets the analyser function used to perform content inspection. +func (r *RegexLexer) SetAnalyser(analyser func(text string) float32) *RegexLexer { + r.analyser = analyser + return r +} + +func (r *RegexLexer) AnalyseText(text string) float32 { + if r.analyser != nil { + return r.analyser(text) + } + return 0.0 +} + +func (r *RegexLexer) Config() *Config { + return r.config +} + +// Regex compilation is deferred until the lexer is used. This is to avoid significant init() time costs. +func (r *RegexLexer) maybeCompile() (err error) { + r.mu.Lock() + defer r.mu.Unlock() + if r.compiled { + return nil + } + for state, rules := range r.rules { + for i, rule := range rules { + if rule.Regexp == nil { + rule.Regexp, err = regexp2.Compile("^(?"+rule.flags+")(?:"+rule.Pattern+")", 0) + if err != nil { + return fmt.Errorf("failed to compile rule %s.%d: %s", state, i, err) + } + } + } + } +restart: + seen := map[LexerMutator]bool{} + for state := range r.rules { + for i := 0; i < len(r.rules[state]); i++ { + rule := r.rules[state][i] + if compile, ok := rule.Mutator.(LexerMutator); ok { + if seen[compile] { + return fmt.Errorf("saw mutator %T twice; this should not happen", compile) + } + seen[compile] = true + if err := compile.MutateLexer(r.rules, state, i); err != nil { + return err + } + // Process the rules again in case the mutator added/removed rules. + // + // This sounds bad, but shouldn't be significant in practice. + goto restart + } + } + } + r.compiled = true + return nil +} + +func (r *RegexLexer) Tokenise(options *TokeniseOptions, text string) (Iterator, error) { + if err := r.maybeCompile(); err != nil { + return nil, err + } + if options == nil { + options = defaultOptions + } + if r.config.EnsureNL && !strings.HasSuffix(text, "\n") { + text += "\n" + } + state := &LexerState{ + Lexer: r, + Text: []rune(text), + Stack: []string{options.State}, + Rules: r.rules, + MutatorContext: map[interface{}]interface{}{}, + } + return state.Iterator, nil +} + +func matchRules(text []rune, rules []*CompiledRule) (int, *CompiledRule, []string) { + for i, rule := range rules { + match, err := rule.Regexp.FindRunesMatch(text) + if match != nil && err == nil { + groups := []string{} + for _, g := range match.Groups() { + groups = append(groups, g.String()) + } + return i, rule, groups + } + } + return 0, &CompiledRule{}, nil +} diff --git a/vendor/github.com/alecthomas/chroma/regexp_test.go b/vendor/github.com/alecthomas/chroma/regexp_test.go new file mode 100644 index 0000000..21ee13f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/regexp_test.go @@ -0,0 +1,27 @@ +package chroma + +import ( + "testing" + + "github.com/alecthomas/assert" +) + +func TestNewlineAtEndOfFile(t *testing.T) { + l := Coalesce(MustNewLexer(&Config{EnsureNL: true}, Rules{ + "root": { + {`(\w+)(\n)`, ByGroups(Keyword, Whitespace), nil}, + }, + })) + it, err := l.Tokenise(nil, `hello`) + assert.NoError(t, err) + assert.Equal(t, []*Token{{Keyword, "hello"}, {Whitespace, "\n"}}, it.Tokens()) + + l = Coalesce(MustNewLexer(nil, Rules{ + "root": { + {`(\w+)(\n)`, ByGroups(Keyword, Whitespace), nil}, + }, + })) + it, err = l.Tokenise(nil, `hello`) + assert.NoError(t, err) + assert.Equal(t, []*Token{{Error, "hello"}}, it.Tokens()) +} diff --git a/vendor/github.com/alecthomas/chroma/remap.go b/vendor/github.com/alecthomas/chroma/remap.go new file mode 100644 index 0000000..15237b6 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/remap.go @@ -0,0 +1,74 @@ +package chroma + +type remappingLexer struct { + lexer Lexer + mapper func(*Token) []*Token +} + +// RemappingLexer remaps a token to a set of, potentially empty, tokens. +func RemappingLexer(lexer Lexer, mapper func(*Token) []*Token) Lexer { + return &remappingLexer{lexer, mapper} +} + +func (r *remappingLexer) Config() *Config { + return r.lexer.Config() +} + +func (r *remappingLexer) Tokenise(options *TokeniseOptions, text string) (Iterator, error) { + it, err := r.lexer.Tokenise(options, text) + if err != nil { + return nil, err + } + buffer := []*Token{} + return func() *Token { + for { + if len(buffer) > 0 { + t := buffer[0] + buffer = buffer[1:] + return t + } + t := it() + if t == nil { + return t + } + buffer = r.mapper(t) + } + }, nil +} + +type TypeMapping []struct { + From, To TokenType + Words []string +} + +// TypeRemappingLexer remaps types of tokens coming from a parent Lexer. +// +// eg. Map "defvaralias" tokens of type NameVariable to NameFunction: +// +// mapping := TypeMapping{ +// {NameVariable, NameFunction, []string{"defvaralias"}, +// } +// lexer = TypeRemappingLexer(lexer, mapping) +func TypeRemappingLexer(lexer Lexer, mapping TypeMapping) Lexer { + // Lookup table for fast remapping. + lut := map[TokenType]map[string]TokenType{} + for _, rt := range mapping { + km, ok := lut[rt.From] + if !ok { + km = map[string]TokenType{} + lut[rt.From] = km + } + for _, k := range rt.Words { + km[k] = rt.To + } + + } + return RemappingLexer(lexer, func(t *Token) []*Token { + if k, ok := lut[t.Type]; ok { + if tt, ok := k[t.Value]; ok { + t.Type = tt + } + } + return []*Token{t} + }) +} diff --git a/vendor/github.com/alecthomas/chroma/remap_test.go b/vendor/github.com/alecthomas/chroma/remap_test.go new file mode 100644 index 0000000..460a371 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/remap_test.go @@ -0,0 +1,29 @@ +package chroma + +import ( + "testing" + + "github.com/alecthomas/assert" +) + +func TestRemappingLexer(t *testing.T) { + var lexer Lexer = MustNewLexer(nil, Rules{ + "root": { + {`\s+`, Whitespace, nil}, + {`\w+`, Name, nil}, + }, + }) + lexer = TypeRemappingLexer(lexer, TypeMapping{ + {Name, Keyword, []string{"if", "else"}}, + }) + + it, err := lexer.Tokenise(nil, `if true then print else end`) + assert.NoError(t, err) + expected := []*Token{ + {Keyword, "if"}, {TextWhitespace, " "}, {Name, "true"}, {TextWhitespace, " "}, {Name, "then"}, + {TextWhitespace, " "}, {Name, "print"}, {TextWhitespace, " "}, {Keyword, "else"}, + {TextWhitespace, " "}, {Name, "end"}, + } + actual := it.Tokens() + assert.Equal(t, expected, actual) +} diff --git a/vendor/github.com/alecthomas/chroma/style.go b/vendor/github.com/alecthomas/chroma/style.go new file mode 100644 index 0000000..c768293 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/style.go @@ -0,0 +1,315 @@ +package chroma + +import ( + "fmt" + "strings" +) + +// Trilean value for StyleEntry value inheritance. +type Trilean uint8 + +const ( + Pass Trilean = iota + Yes + No +) + +func (t Trilean) String() string { + switch t { + case Yes: + return "Yes" + case No: + return "No" + default: + return "Pass" + } +} + +func (t Trilean) Prefix(s string) string { + if t == Yes { + return s + } else if t == No { + return "no" + s + } + return "" +} + +// A StyleEntry in the Style map. +type StyleEntry struct { + // Hex colours. + Colour Colour + Background Colour + Border Colour + + Bold Trilean + Italic Trilean + Underline Trilean + NoInherit bool +} + +func (s StyleEntry) String() string { + out := []string{} + if s.Bold != Pass { + out = append(out, s.Bold.Prefix("bold")) + } + if s.Italic != Pass { + out = append(out, s.Italic.Prefix("italic")) + } + if s.Underline != Pass { + out = append(out, s.Underline.Prefix("underline")) + } + if s.NoInherit { + out = append(out, "noinherit") + } + if s.Colour.IsSet() { + out = append(out, s.Colour.String()) + } + if s.Background.IsSet() { + out = append(out, "bg:"+s.Background.String()) + } + if s.Border.IsSet() { + out = append(out, "border:"+s.Border.String()) + } + return strings.Join(out, " ") +} + +func (s StyleEntry) Sub(e StyleEntry) StyleEntry { + out := StyleEntry{} + if e.Colour != s.Colour { + out.Colour = s.Colour + } + if e.Background != s.Background { + out.Background = s.Background + } + if e.Bold != s.Bold { + out.Bold = s.Bold + } + if e.Italic != s.Italic { + out.Italic = s.Italic + } + if e.Underline != s.Underline { + out.Underline = s.Underline + } + if e.Border != s.Border { + out.Border = s.Border + } + return out +} + +// Inherit styles from ancestors. +// +// Ancestors should be provided from oldest to newest. +func (s StyleEntry) Inherit(ancestors ...StyleEntry) StyleEntry { + out := s + for i := len(ancestors) - 1; i >= 0; i-- { + if out.NoInherit { + return out + } + ancestor := ancestors[i] + if !out.Colour.IsSet() { + out.Colour = ancestor.Colour + } + if !out.Background.IsSet() { + out.Background = ancestor.Background + } + if !out.Border.IsSet() { + out.Border = ancestor.Border + } + if out.Bold == Pass { + out.Bold = ancestor.Bold + } + if out.Italic == Pass { + out.Italic = ancestor.Italic + } + if out.Underline == Pass { + out.Underline = ancestor.Underline + } + } + return out +} + +func (s StyleEntry) IsZero() bool { + return s.Colour == 0 && s.Background == 0 && s.Border == 0 && s.Bold == Pass && s.Italic == Pass && + s.Underline == Pass && !s.NoInherit +} + +// A StyleBuilder is a mutable structure for building styles. +// +// Once built, a Style is immutable. +type StyleBuilder struct { + entries map[TokenType]string + name string + parent *Style +} + +func NewStyleBuilder(name string) *StyleBuilder { + return &StyleBuilder{name: name, entries: map[TokenType]string{}} +} + +func (s *StyleBuilder) AddAll(entries StyleEntries) *StyleBuilder { + for ttype, entry := range entries { + s.entries[ttype] = entry + } + return s +} + +func (s *StyleBuilder) Get(ttype TokenType) StyleEntry { + // This is less than ideal, but it's the price for having to check errors on each Add(). + entry, _ := ParseStyleEntry(s.entries[ttype]) + return entry.Inherit(s.parent.Get(ttype)) +} + +// Add an entry to the Style map. +// +// See http://pygments.org/docs/styles/#style-rules for details. +func (s *StyleBuilder) Add(ttype TokenType, entry string) *StyleBuilder { // nolint: gocyclo + s.entries[ttype] = entry + return s +} + +func (s *StyleBuilder) AddEntry(ttype TokenType, entry StyleEntry) *StyleBuilder { + s.entries[ttype] = entry.String() + return s +} + +func (s *StyleBuilder) Build() (*Style, error) { + style := &Style{ + Name: s.name, + entries: map[TokenType]StyleEntry{}, + parent: s.parent, + } + for ttype, descriptor := range s.entries { + entry, err := ParseStyleEntry(descriptor) + if err != nil { + return nil, fmt.Errorf("invalid entry for %s: %s", ttype, err) + } + style.entries[ttype] = entry + } + return style, nil +} + +// StyleEntries mapping TokenType to colour definition. +type StyleEntries map[TokenType]string + +// NewStyle creates a new style definition. +func NewStyle(name string, entries StyleEntries) (*Style, error) { + return NewStyleBuilder(name).AddAll(entries).Build() +} + +// MustNewStyle creates a new style or panics. +func MustNewStyle(name string, entries StyleEntries) *Style { + style, err := NewStyle(name, entries) + if err != nil { + panic(err) + } + return style +} + +// A Style definition. +// +// See http://pygments.org/docs/styles/ for details. Semantics are intended to be identical. +type Style struct { + Name string + entries map[TokenType]StyleEntry + parent *Style +} + +// Types that are styled. +func (s *Style) Types() []TokenType { + dedupe := map[TokenType]bool{} + for tt := range s.entries { + dedupe[tt] = true + } + if s.parent != nil { + for _, tt := range s.parent.Types() { + dedupe[tt] = true + } + } + out := make([]TokenType, 0, len(dedupe)) + for tt := range dedupe { + out = append(out, tt) + } + return out +} + +// Builder creates a mutable builder from this Style. +// +// The builder can then be safely modified. This is a cheap operation. +func (s *Style) Builder() *StyleBuilder { + return &StyleBuilder{ + name: s.Name, + entries: map[TokenType]string{}, + parent: s, + } +} + +// Has checks if an exact style entry match exists for a token type. +// +// This is distinct from Get() which will merge parent tokens. +func (s *Style) Has(ttype TokenType) bool { + return !s.get(ttype).IsZero() +} + +func (s *Style) get(ttype TokenType) StyleEntry { + out := s.entries[ttype] + if out.IsZero() && s.parent != nil { + return s.parent.get(ttype) + } + return out +} + +// Get a style entry. Will try sub-category or category if an exact match is not found, and +// finally return the Background. +func (s *Style) Get(ttype TokenType) StyleEntry { + return s.get(ttype).Inherit( + s.get(Background), + s.get(Text), + s.get(ttype.Category()), + s.get(ttype.SubCategory())) +} + +// ParseStyleEntry parses a Pygments style entry. +func ParseStyleEntry(entry string) (StyleEntry, error) { // nolint: gocyclo + out := StyleEntry{} + parts := strings.Fields(entry) + for _, part := range parts { + switch { + case part == "italic": + out.Italic = Yes + case part == "noitalic": + out.Italic = No + case part == "bold": + out.Bold = Yes + case part == "nobold": + out.Bold = No + case part == "underline": + out.Underline = Yes + case part == "nounderline": + out.Underline = No + case part == "inherit": + out.NoInherit = false + case part == "noinherit": + out.NoInherit = true + case part == "bg:": + out.Background = 0 + case strings.HasPrefix(part, "bg:#"): + out.Background = ParseColour(part[3:]) + if !out.Background.IsSet() { + return StyleEntry{}, fmt.Errorf("invalid background colour %q", part) + } + case strings.HasPrefix(part, "border:#"): + out.Border = ParseColour(part[7:]) + if !out.Border.IsSet() { + return StyleEntry{}, fmt.Errorf("invalid border colour %q", part) + } + case strings.HasPrefix(part, "#"): + out.Colour = ParseColour(part) + if !out.Colour.IsSet() { + return StyleEntry{}, fmt.Errorf("invalid colour %q", part) + } + default: + return StyleEntry{}, fmt.Errorf("unknown style element %q", part) + } + } + return out, nil +} diff --git a/vendor/github.com/alecthomas/chroma/style_test.go b/vendor/github.com/alecthomas/chroma/style_test.go new file mode 100644 index 0000000..f3b5f60 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/style_test.go @@ -0,0 +1,37 @@ +package chroma + +import ( + "testing" + + "github.com/alecthomas/assert" +) + +func TestStyleInherit(t *testing.T) { + s, err := NewStyle("test", StyleEntries{ + Name: "bold #f00", + NameVariable: "#fff", + }) + assert.NoError(t, err) + assert.Equal(t, StyleEntry{Colour: 0x1000000, Bold: Yes}, s.Get(NameVariable)) +} + +func TestStyleColours(t *testing.T) { + s, err := NewStyle("test", StyleEntries{ + Name: "#f00 bg:#001 border:#ansiblue", + }) + assert.NoError(t, err) + assert.Equal(t, StyleEntry{Colour: 0xff0001, Background: 0x000012, Border: 0x000100}, s.Get(Name)) +} + +func TestStyleClone(t *testing.T) { + parent, err := NewStyle("test", StyleEntries{ + Background: "bg:#ffffff", + }) + assert.NoError(t, err) + clone, err := parent.Builder().Add(Comment, "#0f0").Build() + assert.NoError(t, err) + + assert.Equal(t, "bg:#ffffff", clone.Get(Background).String()) + assert.Equal(t, "#00ff00 bg:#ffffff", clone.Get(Comment).String()) + assert.Equal(t, "bg:#ffffff", parent.Get(Comment).String()) +} diff --git a/vendor/github.com/alecthomas/chroma/styles/abap.go b/vendor/github.com/alecthomas/chroma/styles/abap.go new file mode 100644 index 0000000..b6d07fb --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/abap.go @@ -0,0 +1,18 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Abap style. +var Abap = Register(chroma.MustNewStyle("abap", chroma.StyleEntries{ + chroma.Comment: "italic #888", + chroma.CommentSpecial: "#888", + chroma.Keyword: "#00f", + chroma.OperatorWord: "#00f", + chroma.Name: "#000", + chroma.LiteralNumber: "#3af", + chroma.LiteralString: "#5a2", + chroma.Error: "#F00", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/algol.go b/vendor/github.com/alecthomas/chroma/styles/algol.go new file mode 100644 index 0000000..1e8a7b4 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/algol.go @@ -0,0 +1,25 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Algol style. +var Algol = Register(chroma.MustNewStyle("algol", chroma.StyleEntries{ + chroma.Comment: "italic #888", + chroma.CommentPreproc: "bold noitalic #888", + chroma.CommentSpecial: "bold noitalic #888", + chroma.Keyword: "underline bold", + chroma.KeywordDeclaration: "italic", + chroma.NameBuiltin: "bold italic", + chroma.NameBuiltinPseudo: "bold italic", + chroma.NameNamespace: "bold italic #666", + chroma.NameClass: "bold italic #666", + chroma.NameFunction: "bold italic #666", + chroma.NameVariable: "bold italic #666", + chroma.NameConstant: "bold italic #666", + chroma.OperatorWord: "bold", + chroma.LiteralString: "italic #666", + chroma.Error: "border:#FF0000", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/algol_nu.go b/vendor/github.com/alecthomas/chroma/styles/algol_nu.go new file mode 100644 index 0000000..3d27873 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/algol_nu.go @@ -0,0 +1,25 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Algol_Nu style. +var Algol_Nu = Register(chroma.MustNewStyle("algol_nu", chroma.StyleEntries{ + chroma.Comment: "italic #888", + chroma.CommentPreproc: "bold noitalic #888", + chroma.CommentSpecial: "bold noitalic #888", + chroma.Keyword: "bold", + chroma.KeywordDeclaration: "italic", + chroma.NameBuiltin: "bold italic", + chroma.NameBuiltinPseudo: "bold italic", + chroma.NameNamespace: "bold italic #666", + chroma.NameClass: "bold italic #666", + chroma.NameFunction: "bold italic #666", + chroma.NameVariable: "bold italic #666", + chroma.NameConstant: "bold italic #666", + chroma.OperatorWord: "bold", + chroma.LiteralString: "italic #666", + chroma.Error: "border:#FF0000", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/api.go b/vendor/github.com/alecthomas/chroma/styles/api.go new file mode 100644 index 0000000..f3ce673 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/api.go @@ -0,0 +1,37 @@ +package styles + +import ( + "sort" + + "github.com/alecthomas/chroma" +) + +// Registry of Styles. +var Registry = map[string]*chroma.Style{} + +// Fallback style. Reassign to change the default fallback style. +var Fallback = SwapOff + +// Register a chroma.Style. +func Register(style *chroma.Style) *chroma.Style { + Registry[style.Name] = style + return style +} + +// Names of all available styles. +func Names() []string { + out := []string{} + for name := range Registry { + out = append(out, name) + } + sort.Strings(out) + return out +} + +// Get named style, or Fallback. +func Get(name string) *chroma.Style { + if style, ok := Registry[name]; ok { + return style + } + return Fallback +} diff --git a/vendor/github.com/alecthomas/chroma/styles/arduino.go b/vendor/github.com/alecthomas/chroma/styles/arduino.go new file mode 100644 index 0000000..9e48fb4 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/arduino.go @@ -0,0 +1,25 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Arduino style. +var Arduino = Register(chroma.MustNewStyle("arduino", chroma.StyleEntries{ + chroma.Error: "#a61717", + chroma.Comment: "#95a5a6", + chroma.CommentPreproc: "#728E00", + chroma.Keyword: "#728E00", + chroma.KeywordConstant: "#00979D", + chroma.KeywordPseudo: "#00979D", + chroma.KeywordReserved: "#00979D", + chroma.KeywordType: "#00979D", + chroma.Operator: "#728E00", + chroma.Name: "#434f54", + chroma.NameBuiltin: "#728E00", + chroma.NameFunction: "#D35400", + chroma.NameOther: "#728E00", + chroma.LiteralNumber: "#8A7B52", + chroma.LiteralString: "#7F8C8D", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/autumn.go b/vendor/github.com/alecthomas/chroma/styles/autumn.go new file mode 100644 index 0000000..f3552b0 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/autumn.go @@ -0,0 +1,42 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Autumn style. +var Autumn = Register(chroma.MustNewStyle("autumn", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "italic #aaaaaa", + chroma.CommentPreproc: "noitalic #4c8317", + chroma.CommentSpecial: "italic #0000aa", + chroma.Keyword: "#0000aa", + chroma.KeywordType: "#00aaaa", + chroma.OperatorWord: "#0000aa", + chroma.NameBuiltin: "#00aaaa", + chroma.NameFunction: "#00aa00", + chroma.NameClass: "underline #00aa00", + chroma.NameNamespace: "underline #00aaaa", + chroma.NameVariable: "#aa0000", + chroma.NameConstant: "#aa0000", + chroma.NameEntity: "bold #800", + chroma.NameAttribute: "#1e90ff", + chroma.NameTag: "bold #1e90ff", + chroma.NameDecorator: "#888888", + chroma.LiteralString: "#aa5500", + chroma.LiteralStringSymbol: "#0000aa", + chroma.LiteralStringRegex: "#009999", + chroma.LiteralNumber: "#009999", + chroma.GenericHeading: "bold #000080", + chroma.GenericSubheading: "bold #800080", + chroma.GenericDeleted: "#aa0000", + chroma.GenericInserted: "#00aa00", + chroma.GenericError: "#aa0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "#555555", + chroma.GenericOutput: "#888888", + chroma.GenericTraceback: "#aa0000", + chroma.Error: "#F00 bg:#FAA", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/borland.go b/vendor/github.com/alecthomas/chroma/styles/borland.go new file mode 100644 index 0000000..dec88ef --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/borland.go @@ -0,0 +1,32 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Borland style. +var Borland = Register(chroma.MustNewStyle("borland", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "italic #008800", + chroma.CommentPreproc: "noitalic #008080", + chroma.CommentSpecial: "noitalic bold", + chroma.LiteralString: "#0000FF", + chroma.LiteralStringChar: "#800080", + chroma.LiteralNumber: "#0000FF", + chroma.Keyword: "bold #000080", + chroma.OperatorWord: "bold", + chroma.NameTag: "bold #000080", + chroma.NameAttribute: "#FF0000", + chroma.GenericHeading: "#999999", + chroma.GenericSubheading: "#aaaaaa", + chroma.GenericDeleted: "bg:#ffdddd #000000", + chroma.GenericInserted: "bg:#ddffdd #000000", + chroma.GenericError: "#aa0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "#555555", + chroma.GenericOutput: "#888888", + chroma.GenericTraceback: "#aa0000", + chroma.Error: "bg:#e3d2d2 #a61717", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/bw.go b/vendor/github.com/alecthomas/chroma/styles/bw.go new file mode 100644 index 0000000..3e800d5 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/bw.go @@ -0,0 +1,30 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// BlackWhite style. +var BlackWhite = Register(chroma.MustNewStyle("bw", chroma.StyleEntries{ + chroma.Comment: "italic", + chroma.CommentPreproc: "noitalic", + chroma.Keyword: "bold", + chroma.KeywordPseudo: "nobold", + chroma.KeywordType: "nobold", + chroma.OperatorWord: "bold", + chroma.NameClass: "bold", + chroma.NameNamespace: "bold", + chroma.NameException: "bold", + chroma.NameEntity: "bold", + chroma.NameTag: "bold", + chroma.LiteralString: "italic", + chroma.LiteralStringInterpol: "bold", + chroma.LiteralStringEscape: "bold", + chroma.GenericHeading: "bold", + chroma.GenericSubheading: "bold", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "bold", + chroma.Error: "border:#FF0000", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/colorful.go b/vendor/github.com/alecthomas/chroma/styles/colorful.go new file mode 100644 index 0000000..cba58c8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/colorful.go @@ -0,0 +1,58 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Colorful style. +var Colorful = Register(chroma.MustNewStyle("colorful", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "#888", + chroma.CommentPreproc: "#579", + chroma.CommentSpecial: "bold #cc0000", + chroma.Keyword: "bold #080", + chroma.KeywordPseudo: "#038", + chroma.KeywordType: "#339", + chroma.Operator: "#333", + chroma.OperatorWord: "bold #000", + chroma.NameBuiltin: "#007020", + chroma.NameFunction: "bold #06B", + chroma.NameClass: "bold #B06", + chroma.NameNamespace: "bold #0e84b5", + chroma.NameException: "bold #F00", + chroma.NameVariable: "#963", + chroma.NameVariableInstance: "#33B", + chroma.NameVariableClass: "#369", + chroma.NameVariableGlobal: "bold #d70", + chroma.NameConstant: "bold #036", + chroma.NameLabel: "bold #970", + chroma.NameEntity: "bold #800", + chroma.NameAttribute: "#00C", + chroma.NameTag: "#070", + chroma.NameDecorator: "bold #555", + chroma.LiteralString: "bg:#fff0f0", + chroma.LiteralStringChar: "#04D bg:", + chroma.LiteralStringDoc: "#D42 bg:", + chroma.LiteralStringInterpol: "bg:#eee", + chroma.LiteralStringEscape: "bold #666", + chroma.LiteralStringRegex: "bg:#fff0ff #000", + chroma.LiteralStringSymbol: "#A60 bg:", + chroma.LiteralStringOther: "#D20", + chroma.LiteralNumber: "bold #60E", + chroma.LiteralNumberInteger: "bold #00D", + chroma.LiteralNumberFloat: "bold #60E", + chroma.LiteralNumberHex: "bold #058", + chroma.LiteralNumberOct: "bold #40E", + chroma.GenericHeading: "bold #000080", + chroma.GenericSubheading: "bold #800080", + chroma.GenericDeleted: "#A00000", + chroma.GenericInserted: "#00A000", + chroma.GenericError: "#FF0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "bold #c65d09", + chroma.GenericOutput: "#888", + chroma.GenericTraceback: "#04D", + chroma.Error: "#F00 bg:#FAA", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/dracula.go b/vendor/github.com/alecthomas/chroma/styles/dracula.go new file mode 100644 index 0000000..39e0eeb --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/dracula.go @@ -0,0 +1,80 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Dracula Style +var Dracula = Register(chroma.MustNewStyle("dracula", chroma.StyleEntries{ + chroma.Comment: "#6272a4", + chroma.CommentHashbang: "#6272a4", + chroma.CommentMultiline: "#6272a4", + chroma.CommentPreproc: "#ff79c6", + chroma.CommentSingle: "#6272a4", + chroma.CommentSpecial: "#6272a4", + chroma.Generic: "#f8f8f2", + chroma.GenericDeleted: "#8b080b", + chroma.GenericEmph: "#f8f8f2 underline", + chroma.GenericError: "#f8f8f2", + chroma.GenericHeading: "#f8f8f2 bold", + chroma.GenericInserted: "#f8f8f2 bold", + chroma.GenericOutput: "#44475a", + chroma.GenericPrompt: "#f8f8f2", + chroma.GenericStrong: "#f8f8f2", + chroma.GenericSubheading: "#f8f8f2 bold", + chroma.GenericTraceback: "#f8f8f2", + chroma.Error: "#f8f8f2", + chroma.Keyword: "#ff79c6", + chroma.KeywordConstant: "#ff79c6", + chroma.KeywordDeclaration: "#8be9fd italic", + chroma.KeywordNamespace: "#ff79c6", + chroma.KeywordPseudo: "#ff79c6", + chroma.KeywordReserved: "#ff79c6", + chroma.KeywordType: "#8be9fd", + chroma.Literal: "#f8f8f2", + chroma.LiteralDate: "#f8f8f2", + chroma.Name: "#f8f8f2", + chroma.NameAttribute: "#50fa7b", + chroma.NameBuiltin: "#8be9fd italic", + chroma.NameBuiltinPseudo: "#f8f8f2", + chroma.NameClass: "#50fa7b", + chroma.NameConstant: "#f8f8f2", + chroma.NameDecorator: "#f8f8f2", + chroma.NameEntity: "#f8f8f2", + chroma.NameException: "#f8f8f2", + chroma.NameFunction: "#50fa7b", + chroma.NameLabel: "#8be9fd italic", + chroma.NameNamespace: "#f8f8f2", + chroma.NameOther: "#f8f8f2", + chroma.NameTag: "#ff79c6", + chroma.NameVariable: "#8be9fd italic", + chroma.NameVariableClass: "#8be9fd italic", + chroma.NameVariableGlobal: "#8be9fd italic", + chroma.NameVariableInstance: "#8be9fd italic", + chroma.LiteralNumber: "#bd93f9", + chroma.LiteralNumberBin: "#bd93f9", + chroma.LiteralNumberFloat: "#bd93f9", + chroma.LiteralNumberHex: "#bd93f9", + chroma.LiteralNumberInteger: "#bd93f9", + chroma.LiteralNumberIntegerLong: "#bd93f9", + chroma.LiteralNumberOct: "#bd93f9", + chroma.Operator: "#ff79c6", + chroma.OperatorWord: "#ff79c6", + chroma.Other: "#f8f8f2", + chroma.Punctuation: "#f8f8f2", + chroma.LiteralString: "#f1fa8c", + chroma.LiteralStringBacktick: "#f1fa8c", + chroma.LiteralStringChar: "#f1fa8c", + chroma.LiteralStringDoc: "#f1fa8c", + chroma.LiteralStringDouble: "#f1fa8c", + chroma.LiteralStringEscape: "#f1fa8c", + chroma.LiteralStringHeredoc: "#f1fa8c", + chroma.LiteralStringInterpol: "#f1fa8c", + chroma.LiteralStringOther: "#f1fa8c", + chroma.LiteralStringRegex: "#f1fa8c", + chroma.LiteralStringSingle: "#f1fa8c", + chroma.LiteralStringSymbol: "#f1fa8c", + chroma.Text: "#f8f8f2", + chroma.TextWhitespace: "#f8f8f2", + chroma.Background: " bg:#282a36", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/emacs.go b/vendor/github.com/alecthomas/chroma/styles/emacs.go new file mode 100644 index 0000000..b612f37 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/emacs.go @@ -0,0 +1,50 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Emacs style. +var Emacs = Register(chroma.MustNewStyle("emacs", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "italic #008800", + chroma.CommentPreproc: "noitalic", + chroma.CommentSpecial: "noitalic bold", + chroma.Keyword: "bold #AA22FF", + chroma.KeywordPseudo: "nobold", + chroma.KeywordType: "bold #00BB00", + chroma.Operator: "#666666", + chroma.OperatorWord: "bold #AA22FF", + chroma.NameBuiltin: "#AA22FF", + chroma.NameFunction: "#00A000", + chroma.NameClass: "#0000FF", + chroma.NameNamespace: "bold #0000FF", + chroma.NameException: "bold #D2413A", + chroma.NameVariable: "#B8860B", + chroma.NameConstant: "#880000", + chroma.NameLabel: "#A0A000", + chroma.NameEntity: "bold #999999", + chroma.NameAttribute: "#BB4444", + chroma.NameTag: "bold #008000", + chroma.NameDecorator: "#AA22FF", + chroma.LiteralString: "#BB4444", + chroma.LiteralStringDoc: "italic", + chroma.LiteralStringInterpol: "bold #BB6688", + chroma.LiteralStringEscape: "bold #BB6622", + chroma.LiteralStringRegex: "#BB6688", + chroma.LiteralStringSymbol: "#B8860B", + chroma.LiteralStringOther: "#008000", + chroma.LiteralNumber: "#666666", + chroma.GenericHeading: "bold #000080", + chroma.GenericSubheading: "bold #800080", + chroma.GenericDeleted: "#A00000", + chroma.GenericInserted: "#00A000", + chroma.GenericError: "#FF0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "bold #000080", + chroma.GenericOutput: "#888", + chroma.GenericTraceback: "#04D", + chroma.Error: "border:#FF0000", + chroma.Background: " bg:#f8f8f8", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/friendly.go b/vendor/github.com/alecthomas/chroma/styles/friendly.go new file mode 100644 index 0000000..e3d831c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/friendly.go @@ -0,0 +1,50 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Friendly style. +var Friendly = Register(chroma.MustNewStyle("friendly", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "italic #60a0b0", + chroma.CommentPreproc: "noitalic #007020", + chroma.CommentSpecial: "noitalic bg:#fff0f0", + chroma.Keyword: "bold #007020", + chroma.KeywordPseudo: "nobold", + chroma.KeywordType: "nobold #902000", + chroma.Operator: "#666666", + chroma.OperatorWord: "bold #007020", + chroma.NameBuiltin: "#007020", + chroma.NameFunction: "#06287e", + chroma.NameClass: "bold #0e84b5", + chroma.NameNamespace: "bold #0e84b5", + chroma.NameException: "#007020", + chroma.NameVariable: "#bb60d5", + chroma.NameConstant: "#60add5", + chroma.NameLabel: "bold #002070", + chroma.NameEntity: "bold #d55537", + chroma.NameAttribute: "#4070a0", + chroma.NameTag: "bold #062873", + chroma.NameDecorator: "bold #555555", + chroma.LiteralString: "#4070a0", + chroma.LiteralStringDoc: "italic", + chroma.LiteralStringInterpol: "italic #70a0d0", + chroma.LiteralStringEscape: "bold #4070a0", + chroma.LiteralStringRegex: "#235388", + chroma.LiteralStringSymbol: "#517918", + chroma.LiteralStringOther: "#c65d09", + chroma.LiteralNumber: "#40a070", + chroma.GenericHeading: "bold #000080", + chroma.GenericSubheading: "bold #800080", + chroma.GenericDeleted: "#A00000", + chroma.GenericInserted: "#00A000", + chroma.GenericError: "#FF0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "bold #c65d09", + chroma.GenericOutput: "#888", + chroma.GenericTraceback: "#04D", + chroma.Error: "border:#FF0000", + chroma.Background: " bg:#f0f0f0", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/fruity.go b/vendor/github.com/alecthomas/chroma/styles/fruity.go new file mode 100644 index 0000000..c2577fa --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/fruity.go @@ -0,0 +1,26 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Fruity style. +var Fruity = Register(chroma.MustNewStyle("fruity", chroma.StyleEntries{ + chroma.TextWhitespace: "#888888", + chroma.Background: "#ffffff bg:#111111", + chroma.GenericOutput: "#444444 bg:#222222", + chroma.Keyword: "#fb660a bold", + chroma.KeywordPseudo: "nobold", + chroma.LiteralNumber: "#0086f7 bold", + chroma.NameTag: "#fb660a bold", + chroma.NameVariable: "#fb660a", + chroma.Comment: "#008800 bg:#0f140f italic", + chroma.NameAttribute: "#ff0086 bold", + chroma.LiteralString: "#0086d2", + chroma.NameFunction: "#ff0086 bold", + chroma.GenericHeading: "#ffffff bold", + chroma.KeywordType: "#cdcaa9 bold", + chroma.GenericSubheading: "#ffffff bold", + chroma.NameConstant: "#0086d2", + chroma.CommentPreproc: "#ff0007 bold", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/github.go b/vendor/github.com/alecthomas/chroma/styles/github.go new file mode 100644 index 0000000..2e80af3 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/github.go @@ -0,0 +1,50 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// GitHub style. +var GitHub = Register(chroma.MustNewStyle("github", chroma.StyleEntries{ + chroma.CommentMultiline: "italic #999988", + chroma.CommentPreproc: "bold #999999", + chroma.CommentSingle: "italic #999988", + chroma.CommentSpecial: "bold italic #999999", + chroma.Comment: "italic #999988", + chroma.Error: "bg:#e3d2d2 #a61717", + chroma.GenericDeleted: "bg:#ffdddd #000000", + chroma.GenericEmph: "italic #000000", + chroma.GenericError: "#aa0000", + chroma.GenericHeading: "#999999", + chroma.GenericInserted: "bg:#ddffdd #000000", + chroma.GenericOutput: "#888888", + chroma.GenericPrompt: "#555555", + chroma.GenericStrong: "bold", + chroma.GenericSubheading: "#aaaaaa", + chroma.GenericTraceback: "#aa0000", + chroma.KeywordType: "bold #445588", + chroma.Keyword: "bold #000000", + chroma.LiteralNumber: "#009999", + chroma.LiteralStringRegex: "#009926", + chroma.LiteralStringSymbol: "#990073", + chroma.LiteralString: "#d14", + chroma.NameAttribute: "#008080", + chroma.NameBuiltinPseudo: "#999999", + chroma.NameBuiltin: "#0086B3", + chroma.NameClass: "bold #445588", + chroma.NameConstant: "#008080", + chroma.NameDecorator: "bold #3c5d5d", + chroma.NameEntity: "#800080", + chroma.NameException: "bold #990000", + chroma.NameFunction: "bold #990000", + chroma.NameLabel: "bold #990000", + chroma.NameNamespace: "#555555", + chroma.NameTag: "#000080", + chroma.NameVariableClass: "#008080", + chroma.NameVariableGlobal: "#008080", + chroma.NameVariableInstance: "#008080", + chroma.NameVariable: "#008080", + chroma.Operator: "bold #000000", + chroma.TextWhitespace: "#bbbbbb", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/igor.go b/vendor/github.com/alecthomas/chroma/styles/igor.go new file mode 100644 index 0000000..6a6d4cd --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/igor.go @@ -0,0 +1,16 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Igor style. +var Igor = Register(chroma.MustNewStyle("igor", chroma.StyleEntries{ + chroma.Comment: "italic #FF0000", + chroma.Keyword: "#0000FF", + chroma.NameFunction: "#C34E00", + chroma.NameDecorator: "#CC00A3", + chroma.NameClass: "#007575", + chroma.LiteralString: "#009C00", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/lovelace.go b/vendor/github.com/alecthomas/chroma/styles/lovelace.go new file mode 100644 index 0000000..55210d8 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/lovelace.go @@ -0,0 +1,59 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Lovelace style. +var Lovelace = Register(chroma.MustNewStyle("lovelace", chroma.StyleEntries{ + chroma.TextWhitespace: "#a89028", + chroma.Comment: "italic #888888", + chroma.CommentHashbang: "#287088", + chroma.CommentMultiline: "#888888", + chroma.CommentPreproc: "noitalic #289870", + chroma.Keyword: "#2838b0", + chroma.KeywordConstant: "italic #444444", + chroma.KeywordDeclaration: "italic", + chroma.KeywordType: "italic", + chroma.Operator: "#666666", + chroma.OperatorWord: "#a848a8", + chroma.Punctuation: "#888888", + chroma.NameAttribute: "#388038", + chroma.NameBuiltin: "#388038", + chroma.NameBuiltinPseudo: "italic", + chroma.NameClass: "#287088", + chroma.NameConstant: "#b85820", + chroma.NameDecorator: "#287088", + chroma.NameEntity: "#709030", + chroma.NameException: "#908828", + chroma.NameFunction: "#785840", + chroma.NameFunctionMagic: "#b85820", + chroma.NameLabel: "#289870", + chroma.NameNamespace: "#289870", + chroma.NameTag: "#2838b0", + chroma.NameVariable: "#b04040", + chroma.NameVariableGlobal: "#908828", + chroma.NameVariableMagic: "#b85820", + chroma.LiteralString: "#b83838", + chroma.LiteralStringAffix: "#444444", + chroma.LiteralStringChar: "#a848a8", + chroma.LiteralStringDelimiter: "#b85820", + chroma.LiteralStringDoc: "italic #b85820", + chroma.LiteralStringEscape: "#709030", + chroma.LiteralStringInterpol: "underline", + chroma.LiteralStringOther: "#a848a8", + chroma.LiteralStringRegex: "#a848a8", + chroma.LiteralNumber: "#444444", + chroma.GenericDeleted: "#c02828", + chroma.GenericEmph: "italic", + chroma.GenericError: "#c02828", + chroma.GenericHeading: "#666666", + chroma.GenericSubheading: "#444444", + chroma.GenericInserted: "#388038", + chroma.GenericOutput: "#666666", + chroma.GenericPrompt: "#444444", + chroma.GenericStrong: "bold", + chroma.GenericTraceback: "#2838b0", + chroma.Error: "bg:#a848a8", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/manni.go b/vendor/github.com/alecthomas/chroma/styles/manni.go new file mode 100644 index 0000000..c96149c --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/manni.go @@ -0,0 +1,50 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Manni style. +var Manni = Register(chroma.MustNewStyle("manni", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "italic #0099FF", + chroma.CommentPreproc: "noitalic #009999", + chroma.CommentSpecial: "bold", + chroma.Keyword: "bold #006699", + chroma.KeywordPseudo: "nobold", + chroma.KeywordType: "#007788", + chroma.Operator: "#555555", + chroma.OperatorWord: "bold #000000", + chroma.NameBuiltin: "#336666", + chroma.NameFunction: "#CC00FF", + chroma.NameClass: "bold #00AA88", + chroma.NameNamespace: "bold #00CCFF", + chroma.NameException: "bold #CC0000", + chroma.NameVariable: "#003333", + chroma.NameConstant: "#336600", + chroma.NameLabel: "#9999FF", + chroma.NameEntity: "bold #999999", + chroma.NameAttribute: "#330099", + chroma.NameTag: "bold #330099", + chroma.NameDecorator: "#9999FF", + chroma.LiteralString: "#CC3300", + chroma.LiteralStringDoc: "italic", + chroma.LiteralStringInterpol: "#AA0000", + chroma.LiteralStringEscape: "bold #CC3300", + chroma.LiteralStringRegex: "#33AAAA", + chroma.LiteralStringSymbol: "#FFCC33", + chroma.LiteralStringOther: "#CC3300", + chroma.LiteralNumber: "#FF6600", + chroma.GenericHeading: "bold #003300", + chroma.GenericSubheading: "bold #003300", + chroma.GenericDeleted: "border:#CC0000 bg:#FFCCCC", + chroma.GenericInserted: "border:#00CC00 bg:#CCFFCC", + chroma.GenericError: "#FF0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "bold #000099", + chroma.GenericOutput: "#AAAAAA", + chroma.GenericTraceback: "#99CC66", + chroma.Error: "bg:#FFAAAA #AA0000", + chroma.Background: " bg:#f0f3f3", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/monokai.go b/vendor/github.com/alecthomas/chroma/styles/monokai.go new file mode 100644 index 0000000..2586795 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/monokai.go @@ -0,0 +1,36 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Monokai style. +var Monokai = Register(chroma.MustNewStyle("monokai", chroma.StyleEntries{ + chroma.Text: "#f8f8f2", + chroma.Error: "#960050 bg:#1e0010", + chroma.Comment: "#75715e", + chroma.Keyword: "#66d9ef", + chroma.KeywordNamespace: "#f92672", + chroma.Operator: "#f92672", + chroma.Punctuation: "#f8f8f2", + chroma.Name: "#f8f8f2", + chroma.NameAttribute: "#a6e22e", + chroma.NameClass: "#a6e22e", + chroma.NameConstant: "#66d9ef", + chroma.NameDecorator: "#a6e22e", + chroma.NameException: "#a6e22e", + chroma.NameFunction: "#a6e22e", + chroma.NameOther: "#a6e22e", + chroma.NameTag: "#f92672", + chroma.LiteralNumber: "#ae81ff", + chroma.Literal: "#ae81ff", + chroma.LiteralDate: "#e6db74", + chroma.LiteralString: "#e6db74", + chroma.LiteralStringEscape: "#ae81ff", + chroma.GenericDeleted: "#f92672", + chroma.GenericEmph: "italic", + chroma.GenericInserted: "#a6e22e", + chroma.GenericStrong: "bold", + chroma.GenericSubheading: "#75715e", + chroma.Background: "bg:#272822", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/monokailight.go b/vendor/github.com/alecthomas/chroma/styles/monokailight.go new file mode 100644 index 0000000..61818a6 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/monokailight.go @@ -0,0 +1,33 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// MonokaiLight style. +var MonokaiLight = Register(chroma.MustNewStyle("monokailight", chroma.StyleEntries{ + chroma.Text: "#272822", + chroma.Error: "#960050 bg:#1e0010", + chroma.Comment: "#75715e", + chroma.Keyword: "#00a8c8", + chroma.KeywordNamespace: "#f92672", + chroma.Operator: "#f92672", + chroma.Punctuation: "#111111", + chroma.Name: "#111111", + chroma.NameAttribute: "#75af00", + chroma.NameClass: "#75af00", + chroma.NameConstant: "#00a8c8", + chroma.NameDecorator: "#75af00", + chroma.NameException: "#75af00", + chroma.NameFunction: "#75af00", + chroma.NameOther: "#75af00", + chroma.NameTag: "#f92672", + chroma.LiteralNumber: "#ae81ff", + chroma.Literal: "#ae81ff", + chroma.LiteralDate: "#d88200", + chroma.LiteralString: "#d88200", + chroma.LiteralStringEscape: "#8045FF", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.Background: " bg:#fafafa", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/murphy.go b/vendor/github.com/alecthomas/chroma/styles/murphy.go new file mode 100644 index 0000000..3cf8243 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/murphy.go @@ -0,0 +1,58 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Murphy style. +var Murphy = Register(chroma.MustNewStyle("murphy", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "#666 italic", + chroma.CommentPreproc: "#579 noitalic", + chroma.CommentSpecial: "#c00 bold", + chroma.Keyword: "bold #289", + chroma.KeywordPseudo: "#08f", + chroma.KeywordType: "#66f", + chroma.Operator: "#333", + chroma.OperatorWord: "bold #000", + chroma.NameBuiltin: "#072", + chroma.NameFunction: "bold #5ed", + chroma.NameClass: "bold #e9e", + chroma.NameNamespace: "bold #0e84b5", + chroma.NameException: "bold #F00", + chroma.NameVariable: "#036", + chroma.NameVariableInstance: "#aaf", + chroma.NameVariableClass: "#ccf", + chroma.NameVariableGlobal: "#f84", + chroma.NameConstant: "bold #5ed", + chroma.NameLabel: "bold #970", + chroma.NameEntity: "#800", + chroma.NameAttribute: "#007", + chroma.NameTag: "#070", + chroma.NameDecorator: "bold #555", + chroma.LiteralString: "bg:#e0e0ff", + chroma.LiteralStringChar: "#88F bg:", + chroma.LiteralStringDoc: "#D42 bg:", + chroma.LiteralStringInterpol: "bg:#eee", + chroma.LiteralStringEscape: "bold #666", + chroma.LiteralStringRegex: "bg:#e0e0ff #000", + chroma.LiteralStringSymbol: "#fc8 bg:", + chroma.LiteralStringOther: "#f88", + chroma.LiteralNumber: "bold #60E", + chroma.LiteralNumberInteger: "bold #66f", + chroma.LiteralNumberFloat: "bold #60E", + chroma.LiteralNumberHex: "bold #058", + chroma.LiteralNumberOct: "bold #40E", + chroma.GenericHeading: "bold #000080", + chroma.GenericSubheading: "bold #800080", + chroma.GenericDeleted: "#A00000", + chroma.GenericInserted: "#00A000", + chroma.GenericError: "#FF0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "bold #c65d09", + chroma.GenericOutput: "#888", + chroma.GenericTraceback: "#04D", + chroma.Error: "#F00 bg:#FAA", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/native.go b/vendor/github.com/alecthomas/chroma/styles/native.go new file mode 100644 index 0000000..98f23b6 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/native.go @@ -0,0 +1,41 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Native style. +var Native = Register(chroma.MustNewStyle("native", chroma.StyleEntries{ + chroma.Background: "#d0d0d0 bg:#202020", + chroma.TextWhitespace: "#666666", + chroma.Comment: "italic #999999", + chroma.CommentPreproc: "noitalic bold #cd2828", + chroma.CommentSpecial: "noitalic bold #e50808 bg:#520000", + chroma.Keyword: "bold #6ab825", + chroma.KeywordPseudo: "nobold", + chroma.OperatorWord: "bold #6ab825", + chroma.LiteralString: "#ed9d13", + chroma.LiteralStringOther: "#ffa500", + chroma.LiteralNumber: "#3677a9", + chroma.NameBuiltin: "#24909d", + chroma.NameVariable: "#40ffff", + chroma.NameConstant: "#40ffff", + chroma.NameClass: "underline #447fcf", + chroma.NameFunction: "#447fcf", + chroma.NameNamespace: "underline #447fcf", + chroma.NameException: "#bbbbbb", + chroma.NameTag: "bold #6ab825", + chroma.NameAttribute: "#bbbbbb", + chroma.NameDecorator: "#ffa500", + chroma.GenericHeading: "bold #ffffff", + chroma.GenericSubheading: "underline #ffffff", + chroma.GenericDeleted: "#d22323", + chroma.GenericInserted: "#589819", + chroma.GenericError: "#d22323", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "#aaaaaa", + chroma.GenericOutput: "#cccccc", + chroma.GenericTraceback: "#d22323", + chroma.Error: "bg:#e3d2d2 #a61717", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/paraiso-dark.go b/vendor/github.com/alecthomas/chroma/styles/paraiso-dark.go new file mode 100644 index 0000000..c8cf473 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/paraiso-dark.go @@ -0,0 +1,44 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// ParaisoDark style. +var ParaisoDark = Register(chroma.MustNewStyle("paraiso-dark", chroma.StyleEntries{ + chroma.Text: "#e7e9db", + chroma.Error: "#ef6155", + chroma.Comment: "#776e71", + chroma.Keyword: "#815ba4", + chroma.KeywordNamespace: "#5bc4bf", + chroma.KeywordType: "#fec418", + chroma.Operator: "#5bc4bf", + chroma.Punctuation: "#e7e9db", + chroma.Name: "#e7e9db", + chroma.NameAttribute: "#06b6ef", + chroma.NameClass: "#fec418", + chroma.NameConstant: "#ef6155", + chroma.NameDecorator: "#5bc4bf", + chroma.NameException: "#ef6155", + chroma.NameFunction: "#06b6ef", + chroma.NameNamespace: "#fec418", + chroma.NameOther: "#06b6ef", + chroma.NameTag: "#5bc4bf", + chroma.NameVariable: "#ef6155", + chroma.LiteralNumber: "#f99b15", + chroma.Literal: "#f99b15", + chroma.LiteralDate: "#48b685", + chroma.LiteralString: "#48b685", + chroma.LiteralStringChar: "#e7e9db", + chroma.LiteralStringDoc: "#776e71", + chroma.LiteralStringEscape: "#f99b15", + chroma.LiteralStringInterpol: "#f99b15", + chroma.GenericDeleted: "#ef6155", + chroma.GenericEmph: "italic", + chroma.GenericHeading: "bold #e7e9db", + chroma.GenericInserted: "#48b685", + chroma.GenericPrompt: "bold #776e71", + chroma.GenericStrong: "bold", + chroma.GenericSubheading: "bold #5bc4bf", + chroma.Background: "bg:#2f1e2e", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/paraiso-light.go b/vendor/github.com/alecthomas/chroma/styles/paraiso-light.go new file mode 100644 index 0000000..b514dfa --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/paraiso-light.go @@ -0,0 +1,44 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// ParaisoLight style. +var ParaisoLight = Register(chroma.MustNewStyle("paraiso-light", chroma.StyleEntries{ + chroma.Text: "#2f1e2e", + chroma.Error: "#ef6155", + chroma.Comment: "#8d8687", + chroma.Keyword: "#815ba4", + chroma.KeywordNamespace: "#5bc4bf", + chroma.KeywordType: "#fec418", + chroma.Operator: "#5bc4bf", + chroma.Punctuation: "#2f1e2e", + chroma.Name: "#2f1e2e", + chroma.NameAttribute: "#06b6ef", + chroma.NameClass: "#fec418", + chroma.NameConstant: "#ef6155", + chroma.NameDecorator: "#5bc4bf", + chroma.NameException: "#ef6155", + chroma.NameFunction: "#06b6ef", + chroma.NameNamespace: "#fec418", + chroma.NameOther: "#06b6ef", + chroma.NameTag: "#5bc4bf", + chroma.NameVariable: "#ef6155", + chroma.LiteralNumber: "#f99b15", + chroma.Literal: "#f99b15", + chroma.LiteralDate: "#48b685", + chroma.LiteralString: "#48b685", + chroma.LiteralStringChar: "#2f1e2e", + chroma.LiteralStringDoc: "#8d8687", + chroma.LiteralStringEscape: "#f99b15", + chroma.LiteralStringInterpol: "#f99b15", + chroma.GenericDeleted: "#ef6155", + chroma.GenericEmph: "italic", + chroma.GenericHeading: "bold #2f1e2e", + chroma.GenericInserted: "#48b685", + chroma.GenericPrompt: "bold #8d8687", + chroma.GenericStrong: "bold", + chroma.GenericSubheading: "bold #5bc4bf", + chroma.Background: "bg:#e7e9db", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/pastie.go b/vendor/github.com/alecthomas/chroma/styles/pastie.go new file mode 100644 index 0000000..0570a8e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/pastie.go @@ -0,0 +1,51 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Pastie style. +var Pastie = Register(chroma.MustNewStyle("pastie", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "#888888", + chroma.CommentPreproc: "bold #cc0000", + chroma.CommentSpecial: "bg:#fff0f0 bold #cc0000", + chroma.LiteralString: "bg:#fff0f0 #dd2200", + chroma.LiteralStringRegex: "bg:#fff0ff #008800", + chroma.LiteralStringOther: "bg:#f0fff0 #22bb22", + chroma.LiteralStringSymbol: "#aa6600", + chroma.LiteralStringInterpol: "#3333bb", + chroma.LiteralStringEscape: "#0044dd", + chroma.OperatorWord: "#008800", + chroma.Keyword: "bold #008800", + chroma.KeywordPseudo: "nobold", + chroma.KeywordType: "#888888", + chroma.NameClass: "bold #bb0066", + chroma.NameException: "bold #bb0066", + chroma.NameFunction: "bold #0066bb", + chroma.NameProperty: "bold #336699", + chroma.NameNamespace: "bold #bb0066", + chroma.NameBuiltin: "#003388", + chroma.NameVariable: "#336699", + chroma.NameVariableClass: "#336699", + chroma.NameVariableInstance: "#3333bb", + chroma.NameVariableGlobal: "#dd7700", + chroma.NameConstant: "bold #003366", + chroma.NameTag: "bold #bb0066", + chroma.NameAttribute: "#336699", + chroma.NameDecorator: "#555555", + chroma.NameLabel: "italic #336699", + chroma.LiteralNumber: "bold #0000DD", + chroma.GenericHeading: "#333", + chroma.GenericSubheading: "#666", + chroma.GenericDeleted: "bg:#ffdddd #000000", + chroma.GenericInserted: "bg:#ddffdd #000000", + chroma.GenericError: "#aa0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "#555555", + chroma.GenericOutput: "#888888", + chroma.GenericTraceback: "#aa0000", + chroma.Error: "bg:#e3d2d2 #a61717", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/perldoc.go b/vendor/github.com/alecthomas/chroma/styles/perldoc.go new file mode 100644 index 0000000..8c216e9 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/perldoc.go @@ -0,0 +1,43 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Perldoc style. +var Perldoc = Register(chroma.MustNewStyle("perldoc", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "#228B22", + chroma.CommentPreproc: "#1e889b", + chroma.CommentSpecial: "#8B008B bold", + chroma.LiteralString: "#CD5555", + chroma.LiteralStringHeredoc: "#1c7e71 italic", + chroma.LiteralStringRegex: "#1c7e71", + chroma.LiteralStringOther: "#cb6c20", + chroma.LiteralNumber: "#B452CD", + chroma.OperatorWord: "#8B008B", + chroma.Keyword: "#8B008B bold", + chroma.KeywordType: "#00688B", + chroma.NameClass: "#008b45 bold", + chroma.NameException: "#008b45 bold", + chroma.NameFunction: "#008b45", + chroma.NameNamespace: "#008b45 underline", + chroma.NameVariable: "#00688B", + chroma.NameConstant: "#00688B", + chroma.NameDecorator: "#707a7c", + chroma.NameTag: "#8B008B bold", + chroma.NameAttribute: "#658b00", + chroma.NameBuiltin: "#658b00", + chroma.GenericHeading: "bold #000080", + chroma.GenericSubheading: "bold #800080", + chroma.GenericDeleted: "#aa0000", + chroma.GenericInserted: "#00aa00", + chroma.GenericError: "#aa0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "#555555", + chroma.GenericOutput: "#888888", + chroma.GenericTraceback: "#aa0000", + chroma.Error: "bg:#e3d2d2 #a61717", + chroma.Background: " bg:#eeeedd", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/pygments.go b/vendor/github.com/alecthomas/chroma/styles/pygments.go new file mode 100644 index 0000000..07011b4 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/pygments.go @@ -0,0 +1,54 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Pygments default theme. +var Pygments = Register(chroma.MustNewStyle("pygments", map[chroma.TokenType]string{ + chroma.Whitespace: "#bbbbbb", + chroma.Comment: "italic #408080", + chroma.CommentPreproc: "noitalic #BC7A00", + + chroma.Keyword: "bold #008000", + chroma.KeywordPseudo: "nobold", + chroma.KeywordType: "nobold #B00040", + + chroma.Operator: "#666666", + chroma.OperatorWord: "bold #AA22FF", + + chroma.NameBuiltin: "#008000", + chroma.NameFunction: "#0000FF", + chroma.NameClass: "bold #0000FF", + chroma.NameNamespace: "bold #0000FF", + chroma.NameException: "bold #D2413A", + chroma.NameVariable: "#19177C", + chroma.NameConstant: "#880000", + chroma.NameLabel: "#A0A000", + chroma.NameEntity: "bold #999999", + chroma.NameAttribute: "#7D9029", + chroma.NameTag: "bold #008000", + chroma.NameDecorator: "#AA22FF", + + chroma.String: "#BA2121", + chroma.StringDoc: "italic", + chroma.StringInterpol: "bold #BB6688", + chroma.StringEscape: "bold #BB6622", + chroma.StringRegex: "#BB6688", + chroma.StringSymbol: "#19177C", + chroma.StringOther: "#008000", + chroma.Number: "#666666", + + chroma.GenericHeading: "bold #000080", + chroma.GenericSubheading: "bold #800080", + chroma.GenericDeleted: "#A00000", + chroma.GenericInserted: "#00A000", + chroma.GenericError: "#FF0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "bold #000080", + chroma.GenericOutput: "#888", + chroma.GenericTraceback: "#04D", + + chroma.Error: "border:#FF0000", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/rainbow_dash.go b/vendor/github.com/alecthomas/chroma/styles/rainbow_dash.go new file mode 100644 index 0000000..0084780 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/rainbow_dash.go @@ -0,0 +1,46 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// RainbowDash style. +var RainbowDash = Register(chroma.MustNewStyle("rainbow_dash", chroma.StyleEntries{ + chroma.Comment: "italic #0080ff", + chroma.CommentPreproc: "noitalic", + chroma.CommentSpecial: "bold", + chroma.Error: "bg:#cc0000 #ffffff", + chroma.GenericDeleted: "border:#c5060b bg:#ffcccc", + chroma.GenericEmph: "italic", + chroma.GenericError: "#ff0000", + chroma.GenericHeading: "bold #2c5dcd", + chroma.GenericInserted: "border:#00cc00 bg:#ccffcc", + chroma.GenericOutput: "#aaaaaa", + chroma.GenericPrompt: "bold #2c5dcd", + chroma.GenericStrong: "bold", + chroma.GenericSubheading: "bold #2c5dcd", + chroma.GenericTraceback: "#c5060b", + chroma.Keyword: "bold #2c5dcd", + chroma.KeywordPseudo: "nobold", + chroma.KeywordType: "#5918bb", + chroma.NameAttribute: "italic #2c5dcd", + chroma.NameBuiltin: "bold #5918bb", + chroma.NameClass: "underline", + chroma.NameConstant: "#318495", + chroma.NameDecorator: "bold #ff8000", + chroma.NameEntity: "bold #5918bb", + chroma.NameException: "bold #5918bb", + chroma.NameFunction: "bold #ff8000", + chroma.NameTag: "bold #2c5dcd", + chroma.LiteralNumber: "bold #5918bb", + chroma.Operator: "#2c5dcd", + chroma.OperatorWord: "bold", + chroma.LiteralString: "#00cc66", + chroma.LiteralStringDoc: "italic", + chroma.LiteralStringEscape: "bold #c5060b", + chroma.LiteralStringOther: "#318495", + chroma.LiteralStringSymbol: "bold #c5060b", + chroma.Text: "#4d4d4d", + chroma.TextWhitespace: "#cbcbcb", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/rrt.go b/vendor/github.com/alecthomas/chroma/styles/rrt.go new file mode 100644 index 0000000..7c76961 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/rrt.go @@ -0,0 +1,18 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Rrt style. +var Rrt = Register(chroma.MustNewStyle("rrt", chroma.StyleEntries{ + chroma.Comment: "#00ff00", + chroma.NameFunction: "#ffff00", + chroma.NameVariable: "#eedd82", + chroma.NameConstant: "#7fffd4", + chroma.Keyword: "#ff0000", + chroma.CommentPreproc: "#e5e5e5", + chroma.LiteralString: "#87ceeb", + chroma.KeywordType: "#ee82ee", + chroma.Background: " bg:#000000", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/swapoff.go b/vendor/github.com/alecthomas/chroma/styles/swapoff.go new file mode 100644 index 0000000..0971378 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/swapoff.go @@ -0,0 +1,25 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// SwapOff theme. +var SwapOff = Register(chroma.MustNewStyle("swapoff", map[chroma.TokenType]string{ + chroma.Background: "#lightgray bg:#black", + chroma.Number: "bold #ansiyellow", + chroma.Comment: "#ansiteal", + chroma.CommentPreproc: "bold #ansigreen", + chroma.String: "bold #ansiturquoise", + chroma.Keyword: "bold #ansiwhite", + chroma.NameKeyword: "bold #ansiwhite", + chroma.NameBuiltin: "bold #ansiwhite", + chroma.GenericHeading: "bold", + chroma.GenericSubheading: "bold", + chroma.GenericStrong: "bold", + chroma.GenericUnderline: "underline", + chroma.NameTag: "bold", + chroma.NameAttribute: "#ansiteal", + chroma.Error: "#ansired", + chroma.LiteralDate: "bold #ansiyellow", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/tango.go b/vendor/github.com/alecthomas/chroma/styles/tango.go new file mode 100644 index 0000000..cee6c13 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/tango.go @@ -0,0 +1,78 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Tango style. +var Tango = Register(chroma.MustNewStyle("tango", chroma.StyleEntries{ + chroma.TextWhitespace: "underline #f8f8f8", + chroma.Error: "#a40000 border:#ef2929", + chroma.Other: "#000000", + chroma.Comment: "italic #8f5902", + chroma.CommentMultiline: "italic #8f5902", + chroma.CommentPreproc: "italic #8f5902", + chroma.CommentSingle: "italic #8f5902", + chroma.CommentSpecial: "italic #8f5902", + chroma.Keyword: "bold #204a87", + chroma.KeywordConstant: "bold #204a87", + chroma.KeywordDeclaration: "bold #204a87", + chroma.KeywordNamespace: "bold #204a87", + chroma.KeywordPseudo: "bold #204a87", + chroma.KeywordReserved: "bold #204a87", + chroma.KeywordType: "bold #204a87", + chroma.Operator: "bold #ce5c00", + chroma.OperatorWord: "bold #204a87", + chroma.Punctuation: "bold #000000", + chroma.Name: "#000000", + chroma.NameAttribute: "#c4a000", + chroma.NameBuiltin: "#204a87", + chroma.NameBuiltinPseudo: "#3465a4", + chroma.NameClass: "#000000", + chroma.NameConstant: "#000000", + chroma.NameDecorator: "bold #5c35cc", + chroma.NameEntity: "#ce5c00", + chroma.NameException: "bold #cc0000", + chroma.NameFunction: "#000000", + chroma.NameProperty: "#000000", + chroma.NameLabel: "#f57900", + chroma.NameNamespace: "#000000", + chroma.NameOther: "#000000", + chroma.NameTag: "bold #204a87", + chroma.NameVariable: "#000000", + chroma.NameVariableClass: "#000000", + chroma.NameVariableGlobal: "#000000", + chroma.NameVariableInstance: "#000000", + chroma.LiteralNumber: "bold #0000cf", + chroma.LiteralNumberFloat: "bold #0000cf", + chroma.LiteralNumberHex: "bold #0000cf", + chroma.LiteralNumberInteger: "bold #0000cf", + chroma.LiteralNumberIntegerLong: "bold #0000cf", + chroma.LiteralNumberOct: "bold #0000cf", + chroma.Literal: "#000000", + chroma.LiteralDate: "#000000", + chroma.LiteralString: "#4e9a06", + chroma.LiteralStringBacktick: "#4e9a06", + chroma.LiteralStringChar: "#4e9a06", + chroma.LiteralStringDoc: "italic #8f5902", + chroma.LiteralStringDouble: "#4e9a06", + chroma.LiteralStringEscape: "#4e9a06", + chroma.LiteralStringHeredoc: "#4e9a06", + chroma.LiteralStringInterpol: "#4e9a06", + chroma.LiteralStringOther: "#4e9a06", + chroma.LiteralStringRegex: "#4e9a06", + chroma.LiteralStringSingle: "#4e9a06", + chroma.LiteralStringSymbol: "#4e9a06", + chroma.Generic: "#000000", + chroma.GenericDeleted: "#a40000", + chroma.GenericEmph: "italic #000000", + chroma.GenericError: "#ef2929", + chroma.GenericHeading: "bold #000080", + chroma.GenericInserted: "#00A000", + chroma.GenericOutput: "italic #000000", + chroma.GenericPrompt: "#8f5902", + chroma.GenericStrong: "bold #000000", + chroma.GenericSubheading: "bold #800080", + chroma.GenericTraceback: "bold #a40000", + chroma.Background: " bg:#f8f8f8", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/trac.go b/vendor/github.com/alecthomas/chroma/styles/trac.go new file mode 100644 index 0000000..0867c80 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/trac.go @@ -0,0 +1,41 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Trac style. +var Trac = Register(chroma.MustNewStyle("trac", chroma.StyleEntries{ + chroma.TextWhitespace: "#bbbbbb", + chroma.Comment: "italic #999988", + chroma.CommentPreproc: "bold noitalic #999999", + chroma.CommentSpecial: "bold #999999", + chroma.Operator: "bold", + chroma.LiteralString: "#bb8844", + chroma.LiteralStringRegex: "#808000", + chroma.LiteralNumber: "#009999", + chroma.Keyword: "bold", + chroma.KeywordType: "#445588", + chroma.NameBuiltin: "#999999", + chroma.NameFunction: "bold #990000", + chroma.NameClass: "bold #445588", + chroma.NameException: "bold #990000", + chroma.NameNamespace: "#555555", + chroma.NameVariable: "#008080", + chroma.NameConstant: "#008080", + chroma.NameTag: "#000080", + chroma.NameAttribute: "#008080", + chroma.NameEntity: "#800080", + chroma.GenericHeading: "#999999", + chroma.GenericSubheading: "#aaaaaa", + chroma.GenericDeleted: "bg:#ffdddd #000000", + chroma.GenericInserted: "bg:#ddffdd #000000", + chroma.GenericError: "#aa0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "#555555", + chroma.GenericOutput: "#888888", + chroma.GenericTraceback: "#aa0000", + chroma.Error: "bg:#e3d2d2 #a61717", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/vim.go b/vendor/github.com/alecthomas/chroma/styles/vim.go new file mode 100644 index 0000000..54f8220 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/vim.go @@ -0,0 +1,35 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Vim style. +var Vim = Register(chroma.MustNewStyle("vim", chroma.StyleEntries{ + chroma.Background: "#cccccc bg:#000000", + chroma.Comment: "#000080", + chroma.CommentSpecial: "bold #cd0000", + chroma.Keyword: "#cdcd00", + chroma.KeywordDeclaration: "#00cd00", + chroma.KeywordNamespace: "#cd00cd", + chroma.KeywordType: "#00cd00", + chroma.Operator: "#3399cc", + chroma.OperatorWord: "#cdcd00", + chroma.NameClass: "#00cdcd", + chroma.NameBuiltin: "#cd00cd", + chroma.NameException: "bold #666699", + chroma.NameVariable: "#00cdcd", + chroma.LiteralString: "#cd0000", + chroma.LiteralNumber: "#cd00cd", + chroma.GenericHeading: "bold #000080", + chroma.GenericSubheading: "bold #800080", + chroma.GenericDeleted: "#cd0000", + chroma.GenericInserted: "#00cd00", + chroma.GenericError: "#FF0000", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "bold #000080", + chroma.GenericOutput: "#888", + chroma.GenericTraceback: "#04D", + chroma.Error: "border:#FF0000", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/vs.go b/vendor/github.com/alecthomas/chroma/styles/vs.go new file mode 100644 index 0000000..acbcb91 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/vs.go @@ -0,0 +1,23 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// VisualStudio style. +var VisualStudio = Register(chroma.MustNewStyle("vs", chroma.StyleEntries{ + chroma.Comment: "#008000", + chroma.CommentPreproc: "#0000ff", + chroma.Keyword: "#0000ff", + chroma.OperatorWord: "#0000ff", + chroma.KeywordType: "#2b91af", + chroma.NameClass: "#2b91af", + chroma.LiteralString: "#a31515", + chroma.GenericHeading: "bold", + chroma.GenericSubheading: "bold", + chroma.GenericEmph: "italic", + chroma.GenericStrong: "bold", + chroma.GenericPrompt: "bold", + chroma.Error: "border:#FF0000", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/xcode.go b/vendor/github.com/alecthomas/chroma/styles/xcode.go new file mode 100644 index 0000000..115cf71 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/xcode.go @@ -0,0 +1,29 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Xcode style. +var Xcode = Register(chroma.MustNewStyle("xcode", chroma.StyleEntries{ + chroma.Comment: "#177500", + chroma.CommentPreproc: "#633820", + chroma.LiteralString: "#C41A16", + chroma.LiteralStringChar: "#2300CE", + chroma.Operator: "#000000", + chroma.Keyword: "#A90D91", + chroma.Name: "#000000", + chroma.NameAttribute: "#836C28", + chroma.NameClass: "#3F6E75", + chroma.NameFunction: "#000000", + chroma.NameBuiltin: "#A90D91", + chroma.NameBuiltinPseudo: "#5B269A", + chroma.NameVariable: "#000000", + chroma.NameTag: "#000000", + chroma.NameDecorator: "#000000", + chroma.NameLabel: "#000000", + chroma.Literal: "#1C01CE", + chroma.LiteralNumber: "#1C01CE", + chroma.Error: "#000000", + chroma.Background: " bg:#ffffff", +})) diff --git a/vendor/github.com/alecthomas/chroma/tokentype_string.go b/vendor/github.com/alecthomas/chroma/tokentype_string.go new file mode 100644 index 0000000..44135dc --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/tokentype_string.go @@ -0,0 +1,111 @@ +// Code generated by "stringer -type TokenType"; DO NOT EDIT. + +package chroma + +import "fmt" + +const _TokenType_name = "NoneOtherErrorLineTableTDLineTableLineHighlightLineNumbersTableLineNumbersBackgroundKeywordKeywordConstantKeywordDeclarationKeywordNamespaceKeywordPseudoKeywordReservedKeywordTypeNameNameAttributeNameBuiltinNameBuiltinPseudoNameClassNameConstantNameDecoratorNameEntityNameExceptionNameFunctionNameFunctionMagicNameKeywordNameLabelNameNamespaceNameOperatorNameOtherNamePseudoNamePropertyNameTagNameVariableNameVariableAnonymousNameVariableClassNameVariableGlobalNameVariableInstanceNameVariableMagicLiteralLiteralDateLiteralOtherLiteralStringLiteralStringAffixLiteralStringAtomLiteralStringBacktickLiteralStringBooleanLiteralStringCharLiteralStringDelimiterLiteralStringDocLiteralStringDoubleLiteralStringEscapeLiteralStringHeredocLiteralStringInterpolLiteralStringNameLiteralStringOtherLiteralStringRegexLiteralStringSingleLiteralStringSymbolLiteralNumberLiteralNumberBinLiteralNumberFloatLiteralNumberHexLiteralNumberIntegerLiteralNumberIntegerLongLiteralNumberOctOperatorOperatorWordPunctuationCommentCommentHashbangCommentMultilineCommentSingleCommentSpecialCommentPreprocCommentPreprocFileGenericGenericDeletedGenericEmphGenericErrorGenericHeadingGenericInsertedGenericOutputGenericPromptGenericStrongGenericSubheadingGenericTracebackGenericUnderlineTextTextWhitespaceTextSymbolTextPunctuation" + +var _TokenType_map = map[TokenType]string{ + -9: _TokenType_name[0:4], + -8: _TokenType_name[4:9], + -7: _TokenType_name[9:14], + -6: _TokenType_name[14:25], + -5: _TokenType_name[25:34], + -4: _TokenType_name[34:47], + -3: _TokenType_name[47:63], + -2: _TokenType_name[63:74], + -1: _TokenType_name[74:84], + 1000: _TokenType_name[84:91], + 1001: _TokenType_name[91:106], + 1002: _TokenType_name[106:124], + 1003: _TokenType_name[124:140], + 1004: _TokenType_name[140:153], + 1005: _TokenType_name[153:168], + 1006: _TokenType_name[168:179], + 2000: _TokenType_name[179:183], + 2001: _TokenType_name[183:196], + 2002: _TokenType_name[196:207], + 2003: _TokenType_name[207:224], + 2004: _TokenType_name[224:233], + 2005: _TokenType_name[233:245], + 2006: _TokenType_name[245:258], + 2007: _TokenType_name[258:268], + 2008: _TokenType_name[268:281], + 2009: _TokenType_name[281:293], + 2010: _TokenType_name[293:310], + 2011: _TokenType_name[310:321], + 2012: _TokenType_name[321:330], + 2013: _TokenType_name[330:343], + 2014: _TokenType_name[343:355], + 2015: _TokenType_name[355:364], + 2016: _TokenType_name[364:374], + 2017: _TokenType_name[374:386], + 2018: _TokenType_name[386:393], + 2019: _TokenType_name[393:405], + 2020: _TokenType_name[405:426], + 2021: _TokenType_name[426:443], + 2022: _TokenType_name[443:461], + 2023: _TokenType_name[461:481], + 2024: _TokenType_name[481:498], + 3000: _TokenType_name[498:505], + 3001: _TokenType_name[505:516], + 3002: _TokenType_name[516:528], + 3100: _TokenType_name[528:541], + 3101: _TokenType_name[541:559], + 3102: _TokenType_name[559:576], + 3103: _TokenType_name[576:597], + 3104: _TokenType_name[597:617], + 3105: _TokenType_name[617:634], + 3106: _TokenType_name[634:656], + 3107: _TokenType_name[656:672], + 3108: _TokenType_name[672:691], + 3109: _TokenType_name[691:710], + 3110: _TokenType_name[710:730], + 3111: _TokenType_name[730:751], + 3112: _TokenType_name[751:768], + 3113: _TokenType_name[768:786], + 3114: _TokenType_name[786:804], + 3115: _TokenType_name[804:823], + 3116: _TokenType_name[823:842], + 3200: _TokenType_name[842:855], + 3201: _TokenType_name[855:871], + 3202: _TokenType_name[871:889], + 3203: _TokenType_name[889:905], + 3204: _TokenType_name[905:925], + 3205: _TokenType_name[925:949], + 3206: _TokenType_name[949:965], + 4000: _TokenType_name[965:973], + 4001: _TokenType_name[973:985], + 5000: _TokenType_name[985:996], + 6000: _TokenType_name[996:1003], + 6001: _TokenType_name[1003:1018], + 6002: _TokenType_name[1018:1034], + 6003: _TokenType_name[1034:1047], + 6004: _TokenType_name[1047:1061], + 6100: _TokenType_name[1061:1075], + 6101: _TokenType_name[1075:1093], + 7000: _TokenType_name[1093:1100], + 7001: _TokenType_name[1100:1114], + 7002: _TokenType_name[1114:1125], + 7003: _TokenType_name[1125:1137], + 7004: _TokenType_name[1137:1151], + 7005: _TokenType_name[1151:1166], + 7006: _TokenType_name[1166:1179], + 7007: _TokenType_name[1179:1192], + 7008: _TokenType_name[1192:1205], + 7009: _TokenType_name[1205:1222], + 7010: _TokenType_name[1222:1238], + 7011: _TokenType_name[1238:1254], + 8000: _TokenType_name[1254:1258], + 8001: _TokenType_name[1258:1272], + 8002: _TokenType_name[1272:1282], + 8003: _TokenType_name[1282:1297], +} + +func (i TokenType) String() string { + if str, ok := _TokenType_map[i]; ok { + return str + } + return fmt.Sprintf("TokenType(%d)", i) +} diff --git a/vendor/github.com/alecthomas/chroma/types.go b/vendor/github.com/alecthomas/chroma/types.go new file mode 100644 index 0000000..7242688 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/types.go @@ -0,0 +1,323 @@ +package chroma + +//go:generate stringer -type TokenType + +// TokenType is the type of token to highlight. +// +// It is also an Emitter, emitting a single token of itself +type TokenType int + +// Set of TokenTypes. +// +// Categories of types are grouped in ranges of 1000, while sub-categories are in ranges of 100. For +// example, the literal category is in the range 3000-3999. The sub-category for literal strings is +// in the range 3100-3199. + +// Meta token types. +const ( + // Default background style. + Background TokenType = -1 - iota + // Line numbers in output. + LineNumbers + // Line numbers in output when in table. + LineNumbersTable + // Line higlight style. + LineHighlight + // Line numbers table wrapper style. + LineTable + // Line numbers table TD wrapper style. + LineTableTD + // Input that could not be tokenised. + Error + // Other is used by the Delegate lexer to indicate which tokens should be handled by the delegate. + Other + // No highlighting. + None +) + +// Keywords. +const ( + Keyword TokenType = 1000 + iota + KeywordConstant + KeywordDeclaration + KeywordNamespace + KeywordPseudo + KeywordReserved + KeywordType +) + +// Names. +const ( + Name TokenType = 2000 + iota + NameAttribute + NameBuiltin + NameBuiltinPseudo + NameClass + NameConstant + NameDecorator + NameEntity + NameException + NameFunction + NameFunctionMagic + NameKeyword + NameLabel + NameNamespace + NameOperator + NameOther + NamePseudo + NameProperty + NameTag + NameVariable + NameVariableAnonymous + NameVariableClass + NameVariableGlobal + NameVariableInstance + NameVariableMagic +) + +// Literals. +const ( + Literal TokenType = 3000 + iota + LiteralDate + LiteralOther +) + +// Strings. +const ( + LiteralString TokenType = 3100 + iota + LiteralStringAffix + LiteralStringAtom + LiteralStringBacktick + LiteralStringBoolean + LiteralStringChar + LiteralStringDelimiter + LiteralStringDoc + LiteralStringDouble + LiteralStringEscape + LiteralStringHeredoc + LiteralStringInterpol + LiteralStringName + LiteralStringOther + LiteralStringRegex + LiteralStringSingle + LiteralStringSymbol +) + +// Literals. +const ( + LiteralNumber TokenType = 3200 + iota + LiteralNumberBin + LiteralNumberFloat + LiteralNumberHex + LiteralNumberInteger + LiteralNumberIntegerLong + LiteralNumberOct +) + +// Operators. +const ( + Operator TokenType = 4000 + iota + OperatorWord +) + +// Punctuation. +const ( + Punctuation TokenType = 5000 + iota +) + +// Comments. +const ( + Comment TokenType = 6000 + iota + CommentHashbang + CommentMultiline + CommentSingle + CommentSpecial +) + +// Preprocessor "comments". +const ( + CommentPreproc TokenType = 6100 + iota + CommentPreprocFile +) + +// Generic tokens. +const ( + Generic TokenType = 7000 + iota + GenericDeleted + GenericEmph + GenericError + GenericHeading + GenericInserted + GenericOutput + GenericPrompt + GenericStrong + GenericSubheading + GenericTraceback + GenericUnderline +) + +// Text. +const ( + Text TokenType = 8000 + iota + TextWhitespace + TextSymbol + TextPunctuation +) + +// Aliases. +const ( + Whitespace = TextWhitespace + + Date = LiteralDate + + String = LiteralString + StringAffix = LiteralStringAffix + StringBacktick = LiteralStringBacktick + StringChar = LiteralStringChar + StringDelimiter = LiteralStringDelimiter + StringDoc = LiteralStringDoc + StringDouble = LiteralStringDouble + StringEscape = LiteralStringEscape + StringHeredoc = LiteralStringHeredoc + StringInterpol = LiteralStringInterpol + StringOther = LiteralStringOther + StringRegex = LiteralStringRegex + StringSingle = LiteralStringSingle + StringSymbol = LiteralStringSymbol + + Number = LiteralNumber + NumberBin = LiteralNumberBin + NumberFloat = LiteralNumberFloat + NumberHex = LiteralNumberHex + NumberInteger = LiteralNumberInteger + NumberIntegerLong = LiteralNumberIntegerLong + NumberOct = LiteralNumberOct +) + +var ( + StandardTypes = map[TokenType]string{ + Background: "chroma", + LineNumbers: "ln", + LineNumbersTable: "lnt", + LineHighlight: "hl", + LineTable: "lntable", + LineTableTD: "lntd", + Text: "", + Whitespace: "w", + Error: "err", + Other: "x", + // I have no idea what this is used for... + // Escape: "esc", + + Keyword: "k", + KeywordConstant: "kc", + KeywordDeclaration: "kd", + KeywordNamespace: "kn", + KeywordPseudo: "kp", + KeywordReserved: "kr", + KeywordType: "kt", + + Name: "n", + NameAttribute: "na", + NameBuiltin: "nb", + NameBuiltinPseudo: "bp", + NameClass: "nc", + NameConstant: "no", + NameDecorator: "nd", + NameEntity: "ni", + NameException: "ne", + NameFunction: "nf", + NameFunctionMagic: "fm", + NameProperty: "py", + NameLabel: "nl", + NameNamespace: "nn", + NameOther: "nx", + NameTag: "nt", + NameVariable: "nv", + NameVariableClass: "vc", + NameVariableGlobal: "vg", + NameVariableInstance: "vi", + NameVariableMagic: "vm", + + Literal: "l", + LiteralDate: "ld", + + String: "s", + StringAffix: "sa", + StringBacktick: "sb", + StringChar: "sc", + StringDelimiter: "dl", + StringDoc: "sd", + StringDouble: "s2", + StringEscape: "se", + StringHeredoc: "sh", + StringInterpol: "si", + StringOther: "sx", + StringRegex: "sr", + StringSingle: "s1", + StringSymbol: "ss", + + Number: "m", + NumberBin: "mb", + NumberFloat: "mf", + NumberHex: "mh", + NumberInteger: "mi", + NumberIntegerLong: "il", + NumberOct: "mo", + + Operator: "o", + OperatorWord: "ow", + + Punctuation: "p", + + Comment: "c", + CommentHashbang: "ch", + CommentMultiline: "cm", + CommentPreproc: "cp", + CommentPreprocFile: "cpf", + CommentSingle: "c1", + CommentSpecial: "cs", + + Generic: "g", + GenericDeleted: "gd", + GenericEmph: "ge", + GenericError: "gr", + GenericHeading: "gh", + GenericInserted: "gi", + GenericOutput: "go", + GenericPrompt: "gp", + GenericStrong: "gs", + GenericSubheading: "gu", + GenericTraceback: "gt", + } +) + +func (t TokenType) Parent() TokenType { + if t%100 != 0 { + return t / 100 * 100 + } + if t%1000 != 0 { + return t / 1000 * 1000 + } + return 0 +} + +func (t TokenType) Category() TokenType { + return t / 1000 * 1000 +} + +func (t TokenType) SubCategory() TokenType { + return t / 100 * 100 +} + +func (t TokenType) InCategory(other TokenType) bool { + return t/1000 == other/1000 +} + +func (t TokenType) InSubCategory(other TokenType) bool { + return t/100 == other/100 +} + +func (t TokenType) Emit(groups []string, lexer Lexer) Iterator { + return Literator(&Token{Type: t, Value: groups[0]}) +} diff --git a/vendor/github.com/danwakefield/fnmatch/.gitignore b/vendor/github.com/danwakefield/fnmatch/.gitignore new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/vendor/github.com/danwakefield/fnmatch/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/danwakefield/fnmatch/LICENSE b/vendor/github.com/danwakefield/fnmatch/LICENSE new file mode 100644 index 0000000..0dc9851 --- /dev/null +++ b/vendor/github.com/danwakefield/fnmatch/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2016, Daniel Wakefield +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/danwakefield/fnmatch/README.md b/vendor/github.com/danwakefield/fnmatch/README.md new file mode 100644 index 0000000..b8d7156 --- /dev/null +++ b/vendor/github.com/danwakefield/fnmatch/README.md @@ -0,0 +1,4 @@ +# fnmatch +Updated clone of kballards golang fnmatch gist (https://gist.github.com/kballard/272720) + + diff --git a/vendor/github.com/danwakefield/fnmatch/fnmatch.go b/vendor/github.com/danwakefield/fnmatch/fnmatch.go new file mode 100644 index 0000000..07ac7b3 --- /dev/null +++ b/vendor/github.com/danwakefield/fnmatch/fnmatch.go @@ -0,0 +1,219 @@ +// Provide string-matching based on fnmatch.3 +package fnmatch + +// There are a few issues that I believe to be bugs, but this implementation is +// based as closely as possible on BSD fnmatch. These bugs are present in the +// source of BSD fnmatch, and so are replicated here. The issues are as follows: +// +// * FNM_PERIOD is no longer observed after the first * in a pattern +// This only applies to matches done with FNM_PATHNAME as well +// * FNM_PERIOD doesn't apply to ranges. According to the documentation, +// a period must be matched explicitly, but a range will match it too + +import ( + "unicode" + "unicode/utf8" +) + +const ( + FNM_NOESCAPE = (1 << iota) + FNM_PATHNAME + FNM_PERIOD + + FNM_LEADING_DIR + FNM_CASEFOLD + + FNM_IGNORECASE = FNM_CASEFOLD + FNM_FILE_NAME = FNM_PATHNAME +) + +func unpackRune(str *string) rune { + rune, size := utf8.DecodeRuneInString(*str) + *str = (*str)[size:] + return rune +} + +// Matches the pattern against the string, with the given flags, +// and returns true if the match is successful. +// This function should match fnmatch.3 as closely as possible. +func Match(pattern, s string, flags int) bool { + // The implementation for this function was patterned after the BSD fnmatch.c + // source found at http://src.gnu-darwin.org/src/contrib/csup/fnmatch.c.html + noescape := (flags&FNM_NOESCAPE != 0) + pathname := (flags&FNM_PATHNAME != 0) + period := (flags&FNM_PERIOD != 0) + leadingdir := (flags&FNM_LEADING_DIR != 0) + casefold := (flags&FNM_CASEFOLD != 0) + // the following is some bookkeeping that the original fnmatch.c implementation did not do + // We are forced to do this because we're not keeping indexes into C strings but rather + // processing utf8-encoded strings. Use a custom unpacker to maintain our state for us + sAtStart := true + sLastAtStart := true + sLastSlash := false + sLastUnpacked := rune(0) + unpackS := func() rune { + sLastSlash = (sLastUnpacked == '/') + sLastUnpacked = unpackRune(&s) + sLastAtStart = sAtStart + sAtStart = false + return sLastUnpacked + } + for len(pattern) > 0 { + c := unpackRune(&pattern) + switch c { + case '?': + if len(s) == 0 { + return false + } + sc := unpackS() + if pathname && sc == '/' { + return false + } + if period && sc == '.' && (sLastAtStart || (pathname && sLastSlash)) { + return false + } + case '*': + // collapse multiple *'s + // don't use unpackRune here, the only char we care to detect is ASCII + for len(pattern) > 0 && pattern[0] == '*' { + pattern = pattern[1:] + } + if period && s[0] == '.' && (sAtStart || (pathname && sLastUnpacked == '/')) { + return false + } + // optimize for patterns with * at end or before / + if len(pattern) == 0 { + if pathname { + return leadingdir || (strchr(s, '/') == -1) + } else { + return true + } + return !(pathname && strchr(s, '/') >= 0) + } else if pathname && pattern[0] == '/' { + offset := strchr(s, '/') + if offset == -1 { + return false + } else { + // we already know our pattern and string have a /, skip past it + s = s[offset:] // use unpackS here to maintain our bookkeeping state + unpackS() + pattern = pattern[1:] // we know / is one byte long + break + } + } + // general case, recurse + for test := s; len(test) > 0; unpackRune(&test) { + // I believe the (flags &^ FNM_PERIOD) is a bug when FNM_PATHNAME is specified + // but this follows exactly from how fnmatch.c implements it + if Match(pattern, test, (flags &^ FNM_PERIOD)) { + return true + } else if pathname && test[0] == '/' { + break + } + } + return false + case '[': + if len(s) == 0 { + return false + } + if pathname && s[0] == '/' { + return false + } + sc := unpackS() + if !rangematch(&pattern, sc, flags) { + return false + } + case '\\': + if !noescape { + if len(pattern) > 0 { + c = unpackRune(&pattern) + } + } + fallthrough + default: + if len(s) == 0 { + return false + } + sc := unpackS() + switch { + case sc == c: + case casefold && unicode.ToLower(sc) == unicode.ToLower(c): + default: + return false + } + } + } + return len(s) == 0 || (leadingdir && s[0] == '/') +} + +func rangematch(pattern *string, test rune, flags int) bool { + if len(*pattern) == 0 { + return false + } + casefold := (flags&FNM_CASEFOLD != 0) + noescape := (flags&FNM_NOESCAPE != 0) + if casefold { + test = unicode.ToLower(test) + } + var negate, matched bool + if (*pattern)[0] == '^' || (*pattern)[0] == '!' { + negate = true + (*pattern) = (*pattern)[1:] + } + for !matched && len(*pattern) > 1 && (*pattern)[0] != ']' { + c := unpackRune(pattern) + if !noescape && c == '\\' { + if len(*pattern) > 1 { + c = unpackRune(pattern) + } else { + return false + } + } + if casefold { + c = unicode.ToLower(c) + } + if (*pattern)[0] == '-' && len(*pattern) > 1 && (*pattern)[1] != ']' { + unpackRune(pattern) // skip the - + c2 := unpackRune(pattern) + if !noescape && c2 == '\\' { + if len(*pattern) > 0 { + c2 = unpackRune(pattern) + } else { + return false + } + } + if casefold { + c2 = unicode.ToLower(c2) + } + // this really should be more intelligent, but it looks like + // fnmatch.c does simple int comparisons, therefore we will as well + if c <= test && test <= c2 { + matched = true + } + } else if c == test { + matched = true + } + } + // skip past the rest of the pattern + ok := false + for !ok && len(*pattern) > 0 { + c := unpackRune(pattern) + if c == '\\' && len(*pattern) > 0 { + unpackRune(pattern) + } else if c == ']' { + ok = true + } + } + return ok && matched != negate +} + +// define strchr because strings.Index() seems a bit overkill +// returns the index of c in s, or -1 if there is no match +func strchr(s string, c rune) int { + for i, sc := range s { + if sc == c { + return i + } + } + return -1 +} diff --git a/vendor/github.com/danwakefield/fnmatch/fnmatch_test.go b/vendor/github.com/danwakefield/fnmatch/fnmatch_test.go new file mode 100644 index 0000000..cc38d39 --- /dev/null +++ b/vendor/github.com/danwakefield/fnmatch/fnmatch_test.go @@ -0,0 +1,351 @@ +package fnmatch_test + +import ( + "testing" + + "github.com/danwakefield/fnmatch" +) + +// This is a set of tests ported from a set of tests for C fnmatch +// found at http://www.mail-archive.com/bug-gnulib@gnu.org/msg14048.html +func TestMatch(t *testing.T) { + assert := func(p, s string) { + if !fnmatch.Match(p, s, 0) { + t.Errorf("Assertion failed: Match(%#v, %#v, 0)", p, s) + } + } + assert("", "") + assert("*", "") + assert("*", "foo") + assert("*", "bar") + assert("*", "*") + assert("**", "f") + assert("**", "foo.txt") + assert("*.*", "foo.txt") + assert("foo*.txt", "foobar.txt") + assert("foo.txt", "foo.txt") + assert("foo\\.txt", "foo.txt") + if fnmatch.Match("foo\\.txt", "foo.txt", fnmatch.FNM_NOESCAPE) { + t.Errorf("Assertion failed: Match(%#v, %#v, FNM_NOESCAPE) == false", "foo\\.txt", "foo.txt") + } +} + +func TestWildcard(t *testing.T) { + // A wildcard pattern "*" should match anything + cases := []struct { + pattern string + input string + flags int + want bool + }{ + {"*", "", 0, true}, + {"*", "foo", 0, true}, + {"*", "*", 0, true}, + {"*", " ", 0, true}, + {"*", ".foo", 0, true}, + {"*", "わたし", 0, true}, + } + + for tc, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "Testcase #%d failed: fnmatch.Match('%s', '%s', %d) should be %v not %v", + tc, c.pattern, c.input, c.flags, c.want, got, + ) + } + } +} + +func TestWildcardSlash(t *testing.T) { + cases := []struct { + pattern string + input string + flags int + want bool + }{ + // Should match / when flags are 0 + {"*", "foo/bar", 0, true}, + {"*", "/", 0, true}, + {"*", "/foo", 0, true}, + {"*", "foo/", 0, true}, + // Shouldnt match / when flags include FNM_PATHNAME + {"*", "foo/bar", fnmatch.FNM_PATHNAME, false}, + {"*", "/", fnmatch.FNM_PATHNAME, false}, + {"*", "/foo", fnmatch.FNM_PATHNAME, false}, + {"*", "foo/", fnmatch.FNM_PATHNAME, false}, + } + + for tc, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "Testcase #%d failed: fnmatch.Match('%s', '%s', %d) should be %v not %v", + tc, c.pattern, c.input, c.flags, c.want, got, + ) + } + } + for _, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "fnmatch.Match('%s', '%s', %d) should be %v not %v", + c.pattern, c.input, c.flags, c.want, got, + ) + } + } +} + +func TestWildcardFNMPeriod(t *testing.T) { + // FNM_PERIOD means that . is not matched in some circumstances. + cases := []struct { + pattern string + input string + flags int + want bool + }{ + {"*", ".foo", fnmatch.FNM_PERIOD, false}, + {"/*", "/.foo", fnmatch.FNM_PERIOD, true}, + {"/*", "/.foo", fnmatch.FNM_PERIOD | fnmatch.FNM_PATHNAME, false}, + } + + for tc, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "Testcase #%d failed: fnmatch.Match('%s', '%s', %d) should be %v not %v", + tc, c.pattern, c.input, c.flags, c.want, got, + ) + } + } +} + +func TestQuestionMark(t *testing.T) { + //A question mark pattern "?" should match a single character + cases := []struct { + pattern string + input string + flags int + want bool + }{ + {"?", "", 0, false}, + {"?", "f", 0, true}, + {"?", ".", 0, true}, + {"?", "?", 0, true}, + {"?", "foo", 0, false}, + {"?", "わ", 0, true}, + {"?", "わた", 0, false}, + // Even '/' when flags are 0 + {"?", "/", 0, true}, + // Except '/' when flags include FNM_PATHNAME + {"?", "/", fnmatch.FNM_PATHNAME, false}, + } + + for tc, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "Testcase #%d failed: fnmatch.Match('%s', '%s', %d) should be %v not %v", + tc, c.pattern, c.input, c.flags, c.want, got, + ) + } + } +} + +func TestQuestionMarkExceptions(t *testing.T) { + //When flags include FNM_PERIOD a '?' might not match a '.' character. + cases := []struct { + pattern string + input string + flags int + want bool + }{ + {"?", ".", fnmatch.FNM_PERIOD, false}, + {"foo?", "foo.", fnmatch.FNM_PERIOD, true}, + {"/?", "/.", fnmatch.FNM_PERIOD, true}, + {"/?", "/.", fnmatch.FNM_PERIOD | fnmatch.FNM_PATHNAME, false}, + } + + for tc, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "Testcase #%d failed: fnmatch.Match('%s', '%s', %d) should be %v not %v", + tc, c.pattern, c.input, c.flags, c.want, got, + ) + } + } +} + +func TestRange(t *testing.T) { + azPat := "[a-z]" + cases := []struct { + pattern string + input string + flags int + want bool + }{ + // Should match a single character inside its range + {azPat, "a", 0, true}, + {azPat, "q", 0, true}, + {azPat, "z", 0, true}, + {"[わ]", "わ", 0, true}, + + // Should not match characters outside its range + {azPat, "-", 0, false}, + {azPat, " ", 0, false}, + {azPat, "D", 0, false}, + {azPat, "é", 0, false}, + + //Should only match one character + {azPat, "ab", 0, false}, + {azPat, "", 0, false}, + + // Should not consume more of the pattern than necessary + {azPat + "foo", "afoo", 0, true}, + + // Should match '-' if it is the first/last character or is + // backslash escaped + {"[-az]", "-", 0, true}, + {"[-az]", "a", 0, true}, + {"[-az]", "b", 0, false}, + {"[az-]", "-", 0, true}, + {"[a\\-z]", "-", 0, true}, + {"[a\\-z]", "b", 0, false}, + + // ignore '\\' when FNM_NOESCAPE is given + {"[a\\-z]", "\\", fnmatch.FNM_NOESCAPE, true}, + {"[a\\-z]", "-", fnmatch.FNM_NOESCAPE, false}, + + // Should be negated if starting with ^ or !" + {"[^a-z]", "a", 0, false}, + {"[!a-z]", "b", 0, false}, + {"[!a-z]", "é", 0, true}, + {"[!a-z]", "わ", 0, true}, + + // Still match '-' if following the negation character + {"[^-az]", "-", 0, false}, + {"[^-az]", "b", 0, true}, + + // Should support multiple characters/ranges + {"[abc]", "a", 0, true}, + {"[abc]", "c", 0, true}, + {"[abc]", "d", 0, false}, + {"[a-cg-z]", "c", 0, true}, + {"[a-cg-z]", "h", 0, true}, + {"[a-cg-z]", "d", 0, false}, + + //Should not match '/' when flags is FNM_PATHNAME + {"[abc/def]", "/", 0, true}, + {"[abc/def]", "/", fnmatch.FNM_PATHNAME, false}, + {"[.-0]", "/", 0, true}, // The range [.-0] includes / + {"[.-0]", "/", fnmatch.FNM_PATHNAME, false}, + + // Should normally be case-sensitive + {"[a-z]", "A", 0, false}, + {"[A-Z]", "a", 0, false}, + //Except when FNM_CASEFOLD is given + {"[a-z]", "A", fnmatch.FNM_CASEFOLD, true}, + {"[A-Z]", "a", fnmatch.FNM_CASEFOLD, true}, + } + + for tc, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "Testcase #%d failed: fnmatch.Match('%s', '%s', %d) should be %v not %v", + tc, c.pattern, c.input, c.flags, c.want, got, + ) + } + } +} + +func TestBackSlash(t *testing.T) { + cases := []struct { + pattern string + input string + flags int + want bool + }{ + //A backslash should escape the following characters + {"\\\\", "\\", 0, true}, + {"\\*", "*", 0, true}, + {"\\*", "foo", 0, false}, + {"\\?", "?", 0, true}, + {"\\?", "f", 0, false}, + {"\\[a-z]", "[a-z]", 0, true}, + {"\\[a-z]", "a", 0, false}, + {"\\foo", "foo", 0, true}, + {"\\わ", "わ", 0, true}, + + // Unless FNM_NOESCAPE is given + {"\\\\", "\\", fnmatch.FNM_NOESCAPE, false}, + {"\\\\", "\\\\", fnmatch.FNM_NOESCAPE, true}, + {"\\*", "foo", fnmatch.FNM_NOESCAPE, false}, + {"\\*", "\\*", fnmatch.FNM_NOESCAPE, true}, + } + + for tc, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "Testcase #%d failed: fnmatch.Match('%s', '%s', %d) should be %v not %v", + tc, c.pattern, c.input, c.flags, c.want, got, + ) + } + } +} + +func TestLiteral(t *testing.T) { + cases := []struct { + pattern string + input string + flags int + want bool + }{ + //Literal characters should match themselves + {"foo", "foo", 0, true}, + {"foo", "foobar", 0, false}, + {"foobar", "foo", 0, false}, + {"foo", "Foo", 0, false}, + {"わたし", "わたし", 0, true}, + // And perform case-folding when FNM_CASEFOLD is given + {"foo", "FOO", fnmatch.FNM_CASEFOLD, true}, + {"FoO", "fOo", fnmatch.FNM_CASEFOLD, true}, + } + + for tc, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "Testcase #%d failed: fnmatch.Match('%s', '%s', %d) should be %v not %v", + tc, c.pattern, c.input, c.flags, c.want, got, + ) + } + } +} + +func TestFNMLeadingDir(t *testing.T) { + cases := []struct { + pattern string + input string + flags int + want bool + }{ + // FNM_LEADING_DIR should ignore trailing '/*' + {"foo", "foo/bar", 0, false}, + {"foo", "foo/bar", fnmatch.FNM_LEADING_DIR, true}, + {"*", "foo/bar", fnmatch.FNM_PATHNAME, false}, + {"*", "foo/bar", fnmatch.FNM_PATHNAME | fnmatch.FNM_LEADING_DIR, true}, + } + + for tc, c := range cases { + got := fnmatch.Match(c.pattern, c.input, c.flags) + if got != c.want { + t.Errorf( + "Testcase #%d failed: fnmatch.Match('%s', '%s', %d) should be %v not %v", + tc, c.pattern, c.input, c.flags, c.want, got, + ) + } + } +} diff --git a/vendor/github.com/dlclark/regexp2/.gitignore b/vendor/github.com/dlclark/regexp2/.gitignore new file mode 100644 index 0000000..38a7add --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/.gitignore @@ -0,0 +1,25 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof +*.out \ No newline at end of file diff --git a/vendor/github.com/dlclark/regexp2/.travis.yml b/vendor/github.com/dlclark/regexp2/.travis.yml new file mode 100644 index 0000000..a24aede --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/.travis.yml @@ -0,0 +1,5 @@ +language: go + +go: + - 1.5 + - tip \ No newline at end of file diff --git a/vendor/github.com/dlclark/regexp2/ATTRIB b/vendor/github.com/dlclark/regexp2/ATTRIB new file mode 100644 index 0000000..cdf4560 --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/ATTRIB @@ -0,0 +1,133 @@ +============ +These pieces of code were ported from dotnet/corefx: + +syntax/charclass.go (from RegexCharClass.cs): ported to use the built-in Go unicode classes. Canonicalize is + a direct port, but most of the other code required large changes because the C# implementation + used a string to represent the CharSet data structure and I cleaned that up in my implementation. + +syntax/code.go (from RegexCode.cs): ported literally with various cleanups and layout to make it more Go-ish. + +syntax/escape.go (from RegexParser.cs): ported Escape method and added some optimizations. Unescape is inspired by + the C# implementation but couldn't be directly ported because of the lack of do-while syntax in Go. + +syntax/parser.go (from RegexpParser.cs and RegexOptions.cs): ported parser struct and associated methods as + literally as possible. Several language differences required changes. E.g. lack pre/post-fix increments as + expressions, lack of do-while loops, lack of overloads, etc. + +syntax/prefix.go (from RegexFCD.cs and RegexBoyerMoore.cs): ported as literally as possible and added support + for unicode chars that are longer than the 16-bit char in C# for the 32-bit rune in Go. + +syntax/replacerdata.go (from RegexReplacement.cs): conceptually ported and re-organized to handle differences + in charclass implementation, and fix odd code layout between RegexParser.cs, Regex.cs, and RegexReplacement.cs. + +syntax/tree.go (from RegexTree.cs and RegexNode.cs): ported literally as possible. + +syntax/writer.go (from RegexWriter.cs): ported literally with minor changes to make it more Go-ish. + +match.go (from RegexMatch.cs): ported, simplified, and changed to handle Go's lack of inheritence. + +regexp.go (from Regex.cs and RegexOptions.cs): conceptually serves the same "starting point", but is simplified + and changed to handle differences in C# strings and Go strings/runes. + +replace.go (from RegexReplacement.cs): ported closely and then cleaned up to combine the MatchEvaluator and + simple string replace implementations. + +runner.go (from RegexRunner.cs): ported literally as possible. + +regexp_test.go (from CaptureTests.cs and GroupNamesAndNumbers.cs): conceptually ported, but the code was + manually structured like Go tests. + +replace_test.go (from RegexReplaceStringTest0.cs): conceptually ported + +rtl_test.go (from RightToLeft.cs): conceptually ported +--- +dotnet/corefx was released under this license: + +The MIT License (MIT) + +Copyright (c) Microsoft Corporation + +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. + +============ +These pieces of code are copied from the Go framework: + +- The overall directory structure of regexp2 was inspired by the Go runtime regexp package. +- The optimization in the escape method of syntax/escape.go is from the Go runtime QuoteMeta() func in regexp/regexp.go +- The method signatures in regexp.go are designed to match the Go framework regexp methods closely +- func regexp2.MustCompile and func quote are almost identifical to the regexp package versions +- BenchmarkMatch* and TestProgramTooLong* funcs in regexp_performance_test.go were copied from the framework + regexp/exec_test.go +--- +The Go framework was released under this license: + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +============ +Some test data were gathered from the Mono project. + +regexp_mono_test.go: ported from https://github.com/mono/mono/blob/master/mcs/class/System/Test/System.Text.RegularExpressions/PerlTrials.cs +--- +Mono tests released under this license: + +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. + diff --git a/vendor/github.com/dlclark/regexp2/LICENSE b/vendor/github.com/dlclark/regexp2/LICENSE new file mode 100644 index 0000000..fe83dfd --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Doug Clark + +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. diff --git a/vendor/github.com/dlclark/regexp2/README.md b/vendor/github.com/dlclark/regexp2/README.md new file mode 100644 index 0000000..f4dc33d --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/README.md @@ -0,0 +1,67 @@ +# regexp2 - full featured regular expressions for Go +Regexp2 is a feature-rich RegExp engine for Go. It doesn't have constant time guarantees like the built-in `regexp` package, but it allows backtracking and is compatible with Perl5 and .NET. You'll likely be better off with the RE2 engine from the `regexp` package and should only use this if you need to write very complex patterns or require compatibility with .NET. + +## Basis of the engine +The engine is ported from the .NET framework's System.Text.RegularExpressions.Regex engine. That engine was open sourced in 2015 under the MIT license. There are some fundamental differences between .NET strings and Go strings that required a bit of borrowing from the Go framework regex engine as well. I cleaned up a couple of the dirtier bits during the port (regexcharclass.cs was terrible), but the parse tree, code emmitted, and therefore patterns matched should be identical. + +## Installing +This is a go-gettable library, so install is easy: + + go get github.com/dlclark/regexp2/... + +## Usage +Usage is similar to the Go `regexp` package. Just like in `regexp`, you start by converting a regex into a state machine via the `Compile` or `MustCompile` methods. They ultimately do the same thing, but `MustCompile` will panic if the regex is invalid. You can then use the provided `Regexp` struct to find matches repeatedly. A `Regexp` struct is safe to use across goroutines. + +```go +re := regexp2.MustCompile(`Your pattern`, 0) +if isMatch, _ := re.MatchString(`Something to match`); isMatch { + //do something +} +``` + +The only error that the `*Match*` methods *should* return is a Timeout if you set the `re.MatchTimeout` field. Any other error is a bug in the `regexp2` package. If you need more details about capture groups in a match then use the `FindStringMatch` method, like so: + +```go +if m, _ := re.FindStringMatch(`Something to match`); m != nil { + // the whole match is always group 0 + fmt.Printf("Group 0: %v\n", m.String()) + + // you can get all the groups too + gps := m.Groups() + + // a group can be captured multiple times, so each cap is separately addressable + fmt.Printf("Group 1, first capture", gps[1].Captures[0].String()) + fmt.Printf("Group 1, second capture", gps[1].Captures[1].String()) +} +``` + +Group 0 is embedded in the Match. Group 0 is an automatically-assigned group that encompasses the whole pattern. This means that `m.String()` is the same as `m.Group.String()` and `m.Groups()[0].String()` + +The __last__ capture is embedded in each group, so `g.String()` will return the same thing as `g.Capture.String()` and `g.Captures[len(g.Captures)-1].String()`. + +## Compare `regexp` and `regexp2` +| Category | regexp | regexp2 | +| --- | --- | --- | +| Catastrophic backtracking possible | no, constant execution time guarantees | yes, if your pattern is at risk you can use the `re.MatchTimeout` field | +| Python-style capture groups `(Pre)` | yes | no | +| .NET-style capture groups `(re)` or `('name're)` | no | yes | +| comments `(?#comment)` | no | yes | +| branch numbering reset `(?\|a\|b)` | no | no | +| possessive match `(?>re)` | no | yes | +| positive lookahead `(?=re)` | no | yes | +| negative lookahead `(?!re)` | no | yes | +| positive lookbehind `(?<=re)` | no | yes | +| negative lookbehind `(? 0 && m.matches[cap][m.matchcount[cap]*2-1] != (-3+1) +} + +// matchIndex returns the index of the last specified matched group by capnum +func (m *Match) matchIndex(cap int) int { + i := m.matches[cap][m.matchcount[cap]*2-2] + if i >= 0 { + return i + } + + return m.matches[cap][-3-i] +} + +// matchLength returns the length of the last specified matched group by capnum +func (m *Match) matchLength(cap int) int { + i := m.matches[cap][m.matchcount[cap]*2-1] + if i >= 0 { + return i + } + + return m.matches[cap][-3-i] +} + +// Nonpublic builder: add a capture to the group specified by "c" +func (m *Match) addMatch(c, start, l int) { + + if m.matches[c] == nil { + m.matches[c] = make([]int, 2) + } + + capcount := m.matchcount[c] + + if capcount*2+2 > len(m.matches[c]) { + oldmatches := m.matches[c] + newmatches := make([]int, capcount*8) + copy(newmatches, oldmatches[:capcount*2]) + m.matches[c] = newmatches + } + + m.matches[c][capcount*2] = start + m.matches[c][capcount*2+1] = l + m.matchcount[c] = capcount + 1 + //log.Printf("addMatch: c=%v, i=%v, l=%v ... matches: %v", c, start, l, m.matches) +} + +// Nonpublic builder: Add a capture to balance the specified group. This is used by the +// balanced match construct. (?...) +// +// If there were no such thing as backtracking, this would be as simple as calling RemoveMatch(c). +// However, since we have backtracking, we need to keep track of everything. +func (m *Match) balanceMatch(c int) { + m.balancing = true + + // we'll look at the last capture first + capcount := m.matchcount[c] + target := capcount*2 - 2 + + // first see if it is negative, and therefore is a reference to the next available + // capture group for balancing. If it is, we'll reset target to point to that capture. + if m.matches[c][target] < 0 { + target = -3 - m.matches[c][target] + } + + // move back to the previous capture + target -= 2 + + // if the previous capture is a reference, just copy that reference to the end. Otherwise, point to it. + if target >= 0 && m.matches[c][target] < 0 { + m.addMatch(c, m.matches[c][target], m.matches[c][target+1]) + } else { + m.addMatch(c, -3-target, -4-target /* == -3 - (target + 1) */) + } +} + +// Nonpublic builder: removes a group match by capnum +func (m *Match) removeMatch(c int) { + m.matchcount[c]-- +} + +// GroupCount returns the number of groups this match has matched +func (m *Match) GroupCount() int { + return len(m.matchcount) +} + +// GroupByName returns a group based on the name of the group, or nil if the group name does not exist +func (m *Match) GroupByName(name string) *Group { + num := m.regex.GroupNumberFromName(name) + if num < 0 { + return nil + } + return m.GroupByNumber(num) +} + +// GroupByNumber returns a group based on the number of the group, or nil if the group number does not exist +func (m *Match) GroupByNumber(num int) *Group { + // check our sparse map + if m.sparseCaps != nil { + if newNum, ok := m.sparseCaps[num]; ok { + num = newNum + } + } + if num >= len(m.matchcount) || num < 0 { + return nil + } + + if num == 0 { + return &m.Group + } + + m.populateOtherGroups() + + return &m.otherGroups[num-1] +} + +// Groups returns all the capture groups, starting with group 0 (the full match) +func (m *Match) Groups() []Group { + m.populateOtherGroups() + g := make([]Group, len(m.otherGroups)+1) + g[0] = m.Group + copy(g[1:], m.otherGroups) + return g +} + +func (m *Match) populateOtherGroups() { + // Construct all the Group objects first time called + if m.otherGroups == nil { + m.otherGroups = make([]Group, len(m.matchcount)-1) + for i := 0; i < len(m.otherGroups); i++ { + m.otherGroups[i] = newGroup(m.regex.GroupNameFromNumber(i+1), m.text, m.matches[i+1], m.matchcount[i+1]) + } + } +} + +func (m *Match) groupValueAppendToBuf(groupnum int, buf *bytes.Buffer) { + c := m.matchcount[groupnum] + if c == 0 { + return + } + + matches := m.matches[groupnum] + + index := matches[(c-1)*2] + last := index + matches[(c*2)-1] + + for ; index < last; index++ { + buf.WriteRune(m.text[index]) + } +} + +func newGroup(name string, text []rune, caps []int, capcount int) Group { + g := Group{} + g.text = text + if capcount > 0 { + g.Index = caps[(capcount-1)*2] + g.Length = caps[(capcount*2)-1] + } + g.Name = name + g.Captures = make([]Capture, capcount) + for i := 0; i < capcount; i++ { + g.Captures[i] = Capture{ + text: text, + Index: caps[i*2], + Length: caps[i*2+1], + } + } + //log.Printf("newGroup! capcount %v, %+v", capcount, g) + + return g +} + +func (m *Match) dump() string { + buf := &bytes.Buffer{} + buf.WriteRune('\n') + if len(m.sparseCaps) > 0 { + for k, v := range m.sparseCaps { + fmt.Fprintf(buf, "Slot %v -> %v\n", k, v) + } + } + + for i, g := range m.Groups() { + fmt.Fprintf(buf, "Group %v (%v), %v caps:\n", i, g.Name, len(g.Captures)) + + for _, c := range g.Captures { + fmt.Fprintf(buf, " (%v, %v) %v\n", c.Index, c.Length, c.String()) + } + } + /* + for i := 0; i < len(m.matchcount); i++ { + fmt.Fprintf(buf, "\nGroup %v (%v):\n", i, m.regex.GroupNameFromNumber(i)) + + for j := 0; j < m.matchcount[i]; j++ { + text := "" + + if m.matches[i][j*2] >= 0 { + start := m.matches[i][j*2] + text = m.text[start : start+m.matches[i][j*2+1]] + } + + fmt.Fprintf(buf, " (%v, %v) %v\n", m.matches[i][j*2], m.matches[i][j*2+1], text) + } + } + */ + return buf.String() +} diff --git a/vendor/github.com/dlclark/regexp2/regexp.go b/vendor/github.com/dlclark/regexp2/regexp.go new file mode 100644 index 0000000..b25fe69 --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/regexp.go @@ -0,0 +1,357 @@ +/* +Package regexp2 is a regexp package that has an interface similar to Go's framework regexp engine but uses a +more feature full regex engine behind the scenes. + +It doesn't have constant time guarantees, but it allows backtracking and is compatible with Perl5 and .NET. +You'll likely be better off with the RE2 engine from the regexp package and should only use this if you +need to write very complex patterns or require compatibility with .NET. +*/ +package regexp2 + +import ( + "errors" + "math" + "strconv" + "sync" + "time" + + "github.com/dlclark/regexp2/syntax" +) + +// Default timeout used when running regexp matches -- "forever" +var DefaultMatchTimeout = time.Duration(math.MaxInt64) + +// Regexp is the representation of a compiled regular expression. +// A Regexp is safe for concurrent use by multiple goroutines. +type Regexp struct { + //timeout when trying to find matches + MatchTimeout time.Duration + + // read-only after Compile + pattern string // as passed to Compile + options RegexOptions // options + + caps map[int]int // capnum->index + capnames map[string]int //capture group name -> index + capslist []string //sorted list of capture group names + capsize int // size of the capture array + + code *syntax.Code // compiled program + + // cache of machines for running regexp + muRun sync.Mutex + runner []*runner +} + +// Compile parses a regular expression and returns, if successful, +// a Regexp object that can be used to match against text. +func Compile(expr string, opt RegexOptions) (*Regexp, error) { + // parse it + tree, err := syntax.Parse(expr, syntax.RegexOptions(opt)) + if err != nil { + return nil, err + } + + // translate it to code + code, err := syntax.Write(tree) + if err != nil { + return nil, err + } + + // return it + return &Regexp{ + pattern: expr, + options: opt, + caps: code.Caps, + capnames: tree.Capnames, + capslist: tree.Caplist, + capsize: code.Capsize, + code: code, + MatchTimeout: DefaultMatchTimeout, + }, nil +} + +// MustCompile is like Compile but panics if the expression cannot be parsed. +// It simplifies safe initialization of global variables holding compiled regular +// expressions. +func MustCompile(str string, opt RegexOptions) *Regexp { + regexp, error := Compile(str, opt) + if error != nil { + panic(`regexp2: Compile(` + quote(str) + `): ` + error.Error()) + } + return regexp +} + +// Escape adds backslashes to any special characters in the input string +func Escape(input string) string { + return syntax.Escape(input) +} + +// Unescape removes any backslashes from previously-escaped special characters in the input string +func Unescape(input string) (string, error) { + return syntax.Unescape(input) +} + +// String returns the source text used to compile the regular expression. +func (re *Regexp) String() string { + return re.pattern +} + +func quote(s string) string { + if strconv.CanBackquote(s) { + return "`" + s + "`" + } + return strconv.Quote(s) +} + +// RegexOptions impact the runtime and parsing behavior +// for each specific regex. They are setable in code as well +// as in the regex pattern itself. +type RegexOptions int32 + +const ( + None RegexOptions = 0x0 + IgnoreCase = 0x0001 // "i" + Multiline = 0x0002 // "m" + ExplicitCapture = 0x0004 // "n" + Compiled = 0x0008 // "c" + Singleline = 0x0010 // "s" + IgnorePatternWhitespace = 0x0020 // "x" + RightToLeft = 0x0040 // "r" + Debug = 0x0080 // "d" + ECMAScript = 0x0100 // "e" +) + +func (re *Regexp) RightToLeft() bool { + return re.options&RightToLeft != 0 +} + +func (re *Regexp) Debug() bool { + return re.options&Debug != 0 +} + +// Replace searches the input string and replaces each match found with the replacement text. +// Count will limit the number of matches attempted and startAt will allow +// us to skip past possible matches at the start of the input (left or right depending on RightToLeft option). +// Set startAt and count to -1 to go through the whole string +func (re *Regexp) Replace(input, replacement string, startAt, count int) (string, error) { + data, err := syntax.NewReplacerData(replacement, re.caps, re.capsize, re.capnames, syntax.RegexOptions(re.options)) + if err != nil { + return "", err + } + //TODO: cache ReplacerData + + return replace(re, data, nil, input, startAt, count) +} + +// ReplaceFunc searches the input string and replaces each match found using the string from the evaluator +// Count will limit the number of matches attempted and startAt will allow +// us to skip past possible matches at the start of the input (left or right depending on RightToLeft option). +// Set startAt and count to -1 to go through the whole string. +func (re *Regexp) ReplaceFunc(input string, evaluator MatchEvaluator, startAt, count int) (string, error) { + return replace(re, nil, evaluator, input, startAt, count) +} + +// FindStringMatch searches the input string for a Regexp match +func (re *Regexp) FindStringMatch(s string) (*Match, error) { + // convert string to runes + return re.run(false, -1, getRunes(s)) +} + +// FindRunesMatch searches the input rune slice for a Regexp match +func (re *Regexp) FindRunesMatch(r []rune) (*Match, error) { + return re.run(false, -1, r) +} + +// FindStringMatchStartingAt searches the input string for a Regexp match starting at the startAt index +func (re *Regexp) FindStringMatchStartingAt(s string, startAt int) (*Match, error) { + if startAt > len(s) { + return nil, errors.New("startAt must be less than the length of the input string") + } + r, startAt := re.getRunesAndStart(s, startAt) + if startAt == -1 { + // we didn't find our start index in the string -- that's a problem + return nil, errors.New("startAt must align to the start of a valid rune in the input string") + } + + return re.run(false, startAt, r) +} + +// FindRunesMatchStartingAt searches the input rune slice for a Regexp match starting at the startAt index +func (re *Regexp) FindRunesMatchStartingAt(r []rune, startAt int) (*Match, error) { + return re.run(false, startAt, r) +} + +// FindNextMatch returns the next match in the same input string as the match parameter. +// Will return nil if there is no next match or if given a nil match. +func (re *Regexp) FindNextMatch(m *Match) (*Match, error) { + if m == nil { + return nil, nil + } + + // If previous match was empty, advance by one before matching to prevent + // infinite loop + startAt := m.textpos + if m.Length == 0 { + if m.textpos == len(m.text) { + return nil, nil + } + + if re.RightToLeft() { + startAt-- + } else { + startAt++ + } + } + return re.run(false, startAt, m.text) +} + +// MatchString return true if the string matches the regex +// error will be set if a timeout occurs +func (re *Regexp) MatchString(s string) (bool, error) { + m, err := re.run(true, -1, getRunes(s)) + if err != nil { + return false, err + } + return m != nil, nil +} + +func (re *Regexp) getRunesAndStart(s string, startAt int) ([]rune, int) { + if startAt < 0 { + if re.RightToLeft() { + r := getRunes(s) + return r, len(r) + } + return getRunes(s), 0 + } + ret := make([]rune, len(s)) + i := 0 + runeIdx := -1 + for strIdx, r := range s { + if strIdx == startAt { + runeIdx = i + } + ret[i] = r + i++ + } + return ret[:i], runeIdx +} + +func getRunes(s string) []rune { + ret := make([]rune, len(s)) + i := 0 + for _, r := range s { + ret[i] = r + i++ + } + return ret[:i] +} + +// MatchRunes return true if the runes matches the regex +// error will be set if a timeout occurs +func (re *Regexp) MatchRunes(r []rune) (bool, error) { + m, err := re.run(true, -1, r) + if err != nil { + return false, err + } + return m != nil, nil +} + +// GetGroupNames Returns the set of strings used to name capturing groups in the expression. +func (re *Regexp) GetGroupNames() []string { + var result []string + + if re.capslist == nil { + result = make([]string, re.capsize) + + for i := 0; i < len(result); i++ { + result[i] = strconv.Itoa(i) + } + } else { + result = make([]string, len(re.capslist)) + copy(result, re.capslist) + } + + return result +} + +// GetGroupNumbers returns the integer group numbers corresponding to a group name. +func (re *Regexp) GetGroupNumbers() []int { + var result []int + + if re.caps == nil { + result = make([]int, re.capsize) + + for i := 0; i < len(result); i++ { + result[i] = i + } + } else { + result = make([]int, len(re.caps)) + + for k, v := range re.caps { + result[v] = k + } + } + + return result +} + +// GroupNameFromNumber retrieves a group name that corresponds to a group number. +// It will return "" for and unknown group number. Unnamed groups automatically +// receive a name that is the decimal string equivalent of its number. +func (re *Regexp) GroupNameFromNumber(i int) string { + if re.capslist == nil { + if i >= 0 && i < re.capsize { + return strconv.Itoa(i) + } + + return "" + } + + if re.caps != nil { + var ok bool + if i, ok = re.caps[i]; !ok { + return "" + } + } + + if i >= 0 && i < len(re.capslist) { + return re.capslist[i] + } + + return "" +} + +// GroupNumberFromName returns a group number that corresponds to a group name. +// Returns -1 if the name is not a recognized group name. Numbered groups +// automatically get a group name that is the decimal string equivalent of its number. +func (re *Regexp) GroupNumberFromName(name string) int { + // look up name if we have a hashtable of names + if re.capnames != nil { + if k, ok := re.capnames[name]; ok { + return k + } + + return -1 + } + + // convert to an int if it looks like a number + result := 0 + for i := 0; i < len(name); i++ { + ch := name[i] + + if ch > '9' || ch < '0' { + return -1 + } + + result *= 10 + result += int(ch - '0') + } + + // return int if it's in range + if result >= 0 && result < re.capsize { + return result + } + + return -1 +} diff --git a/vendor/github.com/dlclark/regexp2/regexp_mono_test.go b/vendor/github.com/dlclark/regexp2/regexp_mono_test.go new file mode 100644 index 0000000..372e81c --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/regexp_mono_test.go @@ -0,0 +1,1081 @@ +package regexp2 + +import ( + "fmt" + "testing" +) + +// 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. + +// https://github.com/mono/mono/blob/master/mcs/class/System/Test/System.Text.RegularExpressions/PerlTrials.cs +// ported from perl-5.6.1/t/op/re_tests + +func TestMono_Basics(t *testing.T) { + runRegexTrial(t, `abc`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `abc`, 0, "xbc", "Fail.") + runRegexTrial(t, `abc`, 0, "axc", "Fail.") + runRegexTrial(t, `abc`, 0, "abx", "Fail.") + runRegexTrial(t, `abc`, 0, "xabcy", "Pass. Group[0]=(1,3)") + runRegexTrial(t, `abc`, 0, "ababc", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `ab*c`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab*bc`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab*bc`, 0, "abbc", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `ab*bc`, 0, "abbbbc", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `.{1}`, 0, "abbbbc", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `.{3,4}`, 0, "abbbbc", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `ab{0,}bc`, 0, "abbbbc", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab+bc`, 0, "abbc", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `ab+bc`, 0, "abc", "Fail.") + runRegexTrial(t, `ab+bc`, 0, "abq", "Fail.") + runRegexTrial(t, `ab{1,}bc`, 0, "abq", "Fail.") + runRegexTrial(t, `ab+bc`, 0, "abbbbc", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab{1,}bc`, 0, "abbbbc", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab{1,3}bc`, 0, "abbbbc", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab{3,4}bc`, 0, "abbbbc", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab{4,5}bc`, 0, "abbbbc", "Fail.") + runRegexTrial(t, `ab?bc`, 0, "abbc", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `ab?bc`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab{0,1}bc`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab?bc`, 0, "abbbbc", "Fail.") + runRegexTrial(t, `ab?c`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab{0,1}c`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `^abc$`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `^abc$`, 0, "abcc", "Fail.") + runRegexTrial(t, `^abc`, 0, "abcc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `^abc$`, 0, "aabc", "Fail.") + runRegexTrial(t, `abc$`, 0, "aabc", "Pass. Group[0]=(1,3)") + runRegexTrial(t, `abc$`, 0, "aabcd", "Fail.") + runRegexTrial(t, `^`, 0, "abc", "Pass. Group[0]=(0,0)") + runRegexTrial(t, `$`, 0, "abc", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `a.c`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a.c`, 0, "axc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a.*c`, 0, "axyzc", "Pass. Group[0]=(0,5)") + runRegexTrial(t, `a.*c`, 0, "axyzd", "Fail.") + runRegexTrial(t, `a[bc]d`, 0, "abc", "Fail.") + runRegexTrial(t, `a[bc]d`, 0, "abd", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[b-d]e`, 0, "abd", "Fail.") + runRegexTrial(t, `a[b-d]e`, 0, "ace", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[b-d]`, 0, "aac", "Pass. Group[0]=(1,2)") + runRegexTrial(t, `a[-b]`, 0, "a-", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `a[b-]`, 0, "a-", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `a[b-a]`, 0, "-", "Error.") + runRegexTrial(t, `a[]b`, 0, "-", "Error.") + runRegexTrial(t, `a[`, 0, "-", "Error.") + runRegexTrial(t, `a]`, 0, "a]", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `a[]]b`, 0, "a]b", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[^bc]d`, 0, "aed", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[^bc]d`, 0, "abd", "Fail.") + runRegexTrial(t, `a[^-b]c`, 0, "adc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[^-b]c`, 0, "a-c", "Fail.") + runRegexTrial(t, `a[^]b]c`, 0, "a]c", "Fail.") + runRegexTrial(t, `a[^]b]c`, 0, "adc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `\ba\b`, 0, "a-", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `\ba\b`, 0, "-a", "Pass. Group[0]=(1,1)") + runRegexTrial(t, `\ba\b`, 0, "-a-", "Pass. Group[0]=(1,1)") + runRegexTrial(t, `\by\b`, 0, "xy", "Fail.") + runRegexTrial(t, `\by\b`, 0, "yz", "Fail.") + runRegexTrial(t, `\by\b`, 0, "xyz", "Fail.") + runRegexTrial(t, `\Ba\B`, 0, "a-", "Fail.") + runRegexTrial(t, `\Ba\B`, 0, "-a", "Fail.") + runRegexTrial(t, `\Ba\B`, 0, "-a-", "Fail.") + runRegexTrial(t, `\By\b`, 0, "xy", "Pass. Group[0]=(1,1)") + runRegexTrial(t, `\by\B`, 0, "yz", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `\By\B`, 0, "xyz", "Pass. Group[0]=(1,1)") + runRegexTrial(t, `\w`, 0, "a", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `\w`, 0, "-", "Fail.") + runRegexTrial(t, `\W`, 0, "a", "Fail.") + runRegexTrial(t, `\W`, 0, "-", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `a\sb`, 0, "a b", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a\sb`, 0, "a-b", "Fail.") + runRegexTrial(t, `a\Sb`, 0, "a b", "Fail.") + runRegexTrial(t, `a\Sb`, 0, "a-b", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `\d`, 0, "1", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `\d`, 0, "-", "Fail.") + runRegexTrial(t, `\D`, 0, "1", "Fail.") + runRegexTrial(t, `\D`, 0, "-", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `[\w]`, 0, "a", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `[\w]`, 0, "-", "Fail.") + runRegexTrial(t, `[\W]`, 0, "a", "Fail.") + runRegexTrial(t, `[\W]`, 0, "-", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `a[\s]b`, 0, "a b", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[\s]b`, 0, "a-b", "Fail.") + runRegexTrial(t, `a[\S]b`, 0, "a b", "Fail.") + runRegexTrial(t, `a[\S]b`, 0, "a-b", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `[\d]`, 0, "1", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `[\d]`, 0, "-", "Fail.") + runRegexTrial(t, `[\D]`, 0, "1", "Fail.") + runRegexTrial(t, `[\D]`, 0, "-", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `ab|cd`, 0, "abc", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `ab|cd`, 0, "abcd", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `()ef`, 0, "def", "Pass. Group[0]=(1,2) Group[1]=(1,0)") + runRegexTrial(t, `*a`, 0, "-", "Error.") + runRegexTrial(t, `(*)b`, 0, "-", "Error.") + runRegexTrial(t, `$b`, 0, "b", "Fail.") + runRegexTrial(t, `a\`, 0, "-", "Error.") + runRegexTrial(t, `a\(b`, 0, "a(b", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a\(*b`, 0, "ab", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `a\(*b`, 0, "a((b", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `a\\b`, 0, "a\\b", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `abc)`, 0, "-", "Error.") + runRegexTrial(t, `(abc`, 0, "-", "Error.") + runRegexTrial(t, `((a))`, 0, "abc", "Pass. Group[0]=(0,1) Group[1]=(0,1) Group[2]=(0,1)") + runRegexTrial(t, `(a)b(c)`, 0, "abc", "Pass. Group[0]=(0,3) Group[1]=(0,1) Group[2]=(2,1)") + runRegexTrial(t, `a+b+c`, 0, "aabbabc", "Pass. Group[0]=(4,3)") + runRegexTrial(t, `a{1,}b{1,}c`, 0, "aabbabc", "Pass. Group[0]=(4,3)") + runRegexTrial(t, `a**`, 0, "-", "Error.") + runRegexTrial(t, `a.+?c`, 0, "abcabc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `(a+|b)*`, 0, "ab", "Pass. Group[0]=(0,2) Group[1]=(0,1)(1,1)") + runRegexTrial(t, `(a+|b){0,}`, 0, "ab", "Pass. Group[0]=(0,2) Group[1]=(0,1)(1,1)") + runRegexTrial(t, `(a+|b)+`, 0, "ab", "Pass. Group[0]=(0,2) Group[1]=(0,1)(1,1)") + runRegexTrial(t, `(a+|b){1,}`, 0, "ab", "Pass. Group[0]=(0,2) Group[1]=(0,1)(1,1)") + runRegexTrial(t, `(a+|b)?`, 0, "ab", "Pass. Group[0]=(0,1) Group[1]=(0,1)") + runRegexTrial(t, `(a+|b){0,1}`, 0, "ab", "Pass. Group[0]=(0,1) Group[1]=(0,1)") + runRegexTrial(t, `)(`, 0, "-", "Error.") + runRegexTrial(t, `[^ab]*`, 0, "cde", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `abc`, 0, "", "Fail.") + runRegexTrial(t, `a*`, 0, "", "Pass. Group[0]=(0,0)") + runRegexTrial(t, `([abc])*d`, 0, "abbbcd", "Pass. Group[0]=(0,6) Group[1]=(0,1)(1,1)(2,1)(3,1)(4,1)") + runRegexTrial(t, `([abc])*bcd`, 0, "abcd", "Pass. Group[0]=(0,4) Group[1]=(0,1)") + runRegexTrial(t, `a|b|c|d|e`, 0, "e", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `(a|b|c|d|e)f`, 0, "ef", "Pass. Group[0]=(0,2) Group[1]=(0,1)") + runRegexTrial(t, `abcd*efg`, 0, "abcdefg", "Pass. Group[0]=(0,7)") + runRegexTrial(t, `ab*`, 0, "xabyabbbz", "Pass. Group[0]=(1,2)") + runRegexTrial(t, `ab*`, 0, "xayabbbz", "Pass. Group[0]=(1,1)") + runRegexTrial(t, `(ab|cd)e`, 0, "abcde", "Pass. Group[0]=(2,3) Group[1]=(2,2)") + runRegexTrial(t, `[abhgefdc]ij`, 0, "hij", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `^(ab|cd)e`, 0, "abcde", "Fail.") + runRegexTrial(t, `(abc|)ef`, 0, "abcdef", "Pass. Group[0]=(4,2) Group[1]=(4,0)") + runRegexTrial(t, `(a|b)c*d`, 0, "abcd", "Pass. Group[0]=(1,3) Group[1]=(1,1)") + runRegexTrial(t, `(ab|ab*)bc`, 0, "abc", "Pass. Group[0]=(0,3) Group[1]=(0,1)") + runRegexTrial(t, `a([bc]*)c*`, 0, "abc", "Pass. Group[0]=(0,3) Group[1]=(1,2)") + runRegexTrial(t, `a([bc]*)(c*d)`, 0, "abcd", "Pass. Group[0]=(0,4) Group[1]=(1,2) Group[2]=(3,1)") + runRegexTrial(t, `a([bc]+)(c*d)`, 0, "abcd", "Pass. Group[0]=(0,4) Group[1]=(1,2) Group[2]=(3,1)") + runRegexTrial(t, `a([bc]*)(c+d)`, 0, "abcd", "Pass. Group[0]=(0,4) Group[1]=(1,1) Group[2]=(2,2)") + runRegexTrial(t, `a[bcd]*dcdcde`, 0, "adcdcde", "Pass. Group[0]=(0,7)") + runRegexTrial(t, `a[bcd]+dcdcde`, 0, "adcdcde", "Fail.") + runRegexTrial(t, `(ab|a)b*c`, 0, "abc", "Pass. Group[0]=(0,3) Group[1]=(0,2)") + runRegexTrial(t, `((a)(b)c)(d)`, 0, "abcd", "Pass. Group[0]=(0,4) Group[1]=(0,3) Group[2]=(0,1) Group[3]=(1,1) Group[4]=(3,1)") + runRegexTrial(t, `[a-zA-Z_][a-zA-Z0-9_]*`, 0, "alpha", "Pass. Group[0]=(0,5)") + runRegexTrial(t, `^a(bc+|b[eh])g|.h$`, 0, "abh", "Pass. Group[0]=(1,2) Group[1]=") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, 0, "effgz", "Pass. Group[0]=(0,5) Group[1]=(0,5) Group[2]=") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, 0, "ij", "Pass. Group[0]=(0,2) Group[1]=(0,2) Group[2]=(1,1)") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, 0, "effg", "Fail.") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, 0, "bcdd", "Fail.") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, 0, "reffgz", "Pass. Group[0]=(1,5) Group[1]=(1,5) Group[2]=") + runRegexTrial(t, `((((((((((a))))))))))`, 0, "a", "Pass. Group[0]=(0,1) Group[1]=(0,1) Group[2]=(0,1) Group[3]=(0,1) Group[4]=(0,1) Group[5]=(0,1) Group[6]=(0,1) Group[7]=(0,1) Group[8]=(0,1) Group[9]=(0,1) Group[10]=(0,1)") + runRegexTrial(t, `((((((((((a))))))))))\10`, 0, "aa", "Pass. Group[0]=(0,2) Group[1]=(0,1) Group[2]=(0,1) Group[3]=(0,1) Group[4]=(0,1) Group[5]=(0,1) Group[6]=(0,1) Group[7]=(0,1) Group[8]=(0,1) Group[9]=(0,1) Group[10]=(0,1)") + runRegexTrial(t, `((((((((((a))))))))))!`, 0, "aa", "Fail.") + runRegexTrial(t, `((((((((((a))))))))))!`, 0, "a!", "Pass. Group[0]=(0,2) Group[1]=(0,1) Group[2]=(0,1) Group[3]=(0,1) Group[4]=(0,1) Group[5]=(0,1) Group[6]=(0,1) Group[7]=(0,1) Group[8]=(0,1) Group[9]=(0,1) Group[10]=(0,1)") + runRegexTrial(t, `(((((((((a)))))))))`, 0, "a", "Pass. Group[0]=(0,1) Group[1]=(0,1) Group[2]=(0,1) Group[3]=(0,1) Group[4]=(0,1) Group[5]=(0,1) Group[6]=(0,1) Group[7]=(0,1) Group[8]=(0,1) Group[9]=(0,1)") + runRegexTrial(t, `multiple words of text`, 0, "uh-uh", "Fail.") + runRegexTrial(t, `multiple words`, 0, "multiple words, yeah", "Pass. Group[0]=(0,14)") + runRegexTrial(t, `(.*)c(.*)`, 0, "abcde", "Pass. Group[0]=(0,5) Group[1]=(0,2) Group[2]=(3,2)") + runRegexTrial(t, `\((.*), (.*)\)`, 0, "(a, b)", "Pass. Group[0]=(0,6) Group[1]=(1,1) Group[2]=(4,1)") + runRegexTrial(t, `[k]`, 0, "ab", "Fail.") + runRegexTrial(t, `abcd`, 0, "abcd", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `a(bc)d`, 0, "abcd", "Pass. Group[0]=(0,4) Group[1]=(1,2)") + runRegexTrial(t, `a[-]?c`, 0, "ac", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `(abc)\1`, 0, "abcabc", "Pass. Group[0]=(0,6) Group[1]=(0,3)") + runRegexTrial(t, `([a-c]*)\1`, 0, "abcabc", "Pass. Group[0]=(0,6) Group[1]=(0,3)") + runRegexTrial(t, `\1`, 0, "-", "Error.") + runRegexTrial(t, `\2`, 0, "-", "Error.") + runRegexTrial(t, `(a)|\1`, 0, "a", "Pass. Group[0]=(0,1) Group[1]=(0,1)") + runRegexTrial(t, `(a)|\1`, 0, "x", "Fail.") + runRegexTrial(t, `(a)|\2`, 0, "-", "Error.") + runRegexTrial(t, `(([a-c])b*?\2)*`, 0, "ababbbcbc", "Pass. Group[0]=(0,5) Group[1]=(0,3)(3,2) Group[2]=(0,1)(3,1)") + runRegexTrial(t, `(([a-c])b*?\2){3}`, 0, "ababbbcbc", "Pass. Group[0]=(0,9) Group[1]=(0,3)(3,3)(6,3) Group[2]=(0,1)(3,1)(6,1)") + runRegexTrial(t, `((\3|b)\2(a)x)+`, 0, "aaxabxbaxbbx", "Fail.") + runRegexTrial(t, `((\3|b)\2(a)x)+`, 0, "aaaxabaxbaaxbbax", "Pass. Group[0]=(12,4) Group[1]=(12,4) Group[2]=(12,1) Group[3]=(14,1)") + runRegexTrial(t, `((\3|b)\2(a)){2,}`, 0, "bbaababbabaaaaabbaaaabba", "Pass. Group[0]=(15,9) Group[1]=(15,3)(18,3)(21,3) Group[2]=(15,1)(18,1)(21,1) Group[3]=(17,1)(20,1)(23,1)") + runRegexTrial(t, `abc`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `abc`, IgnoreCase, "XBC", "Fail.") + runRegexTrial(t, `abc`, IgnoreCase, "AXC", "Fail.") + runRegexTrial(t, `abc`, IgnoreCase, "ABX", "Fail.") + runRegexTrial(t, `abc`, IgnoreCase, "XABCY", "Pass. Group[0]=(1,3)") + runRegexTrial(t, `abc`, IgnoreCase, "ABABC", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `ab*c`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab*bc`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab*bc`, IgnoreCase, "ABBC", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `ab*?bc`, IgnoreCase, "ABBBBC", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab{0,}?bc`, IgnoreCase, "ABBBBC", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab+?bc`, IgnoreCase, "ABBC", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `ab+bc`, IgnoreCase, "ABC", "Fail.") + runRegexTrial(t, `ab+bc`, IgnoreCase, "ABQ", "Fail.") + runRegexTrial(t, `ab{1,}bc`, IgnoreCase, "ABQ", "Fail.") + runRegexTrial(t, `ab+bc`, IgnoreCase, "ABBBBC", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab{1,}?bc`, IgnoreCase, "ABBBBC", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab{1,3}?bc`, IgnoreCase, "ABBBBC", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab{3,4}?bc`, IgnoreCase, "ABBBBC", "Pass. Group[0]=(0,6)") + runRegexTrial(t, `ab{4,5}?bc`, IgnoreCase, "ABBBBC", "Fail.") + runRegexTrial(t, `ab??bc`, IgnoreCase, "ABBC", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `ab??bc`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab{0,1}?bc`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab??bc`, IgnoreCase, "ABBBBC", "Fail.") + runRegexTrial(t, `ab??c`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab{0,1}?c`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `^abc$`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `^abc$`, IgnoreCase, "ABCC", "Fail.") + runRegexTrial(t, `^abc`, IgnoreCase, "ABCC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `^abc$`, IgnoreCase, "AABC", "Fail.") + runRegexTrial(t, `abc$`, IgnoreCase, "AABC", "Pass. Group[0]=(1,3)") + runRegexTrial(t, `^`, IgnoreCase, "ABC", "Pass. Group[0]=(0,0)") + runRegexTrial(t, `$`, IgnoreCase, "ABC", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `a.c`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a.c`, IgnoreCase, "AXC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a.*?c`, IgnoreCase, "AXYZC", "Pass. Group[0]=(0,5)") + runRegexTrial(t, `a.*c`, IgnoreCase, "AXYZD", "Fail.") + runRegexTrial(t, `a[bc]d`, IgnoreCase, "ABC", "Fail.") + runRegexTrial(t, `a[bc]d`, IgnoreCase, "ABD", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[b-d]e`, IgnoreCase, "ABD", "Fail.") + runRegexTrial(t, `a[b-d]e`, IgnoreCase, "ACE", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[b-d]`, IgnoreCase, "AAC", "Pass. Group[0]=(1,2)") + runRegexTrial(t, `a[-b]`, IgnoreCase, "A-", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `a[b-]`, IgnoreCase, "A-", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `a[b-a]`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `a[]b`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `a[`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `a]`, IgnoreCase, "A]", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `a[]]b`, IgnoreCase, "A]B", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[^bc]d`, IgnoreCase, "AED", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[^bc]d`, IgnoreCase, "ABD", "Fail.") + runRegexTrial(t, `a[^-b]c`, IgnoreCase, "ADC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a[^-b]c`, IgnoreCase, "A-C", "Fail.") + runRegexTrial(t, `a[^]b]c`, IgnoreCase, "A]C", "Fail.") + runRegexTrial(t, `a[^]b]c`, IgnoreCase, "ADC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `ab|cd`, IgnoreCase, "ABC", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `ab|cd`, IgnoreCase, "ABCD", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `()ef`, IgnoreCase, "DEF", "Pass. Group[0]=(1,2) Group[1]=(1,0)") + runRegexTrial(t, `*a`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `(*)b`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `$b`, IgnoreCase, "B", "Fail.") + runRegexTrial(t, `a\`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `a\(b`, IgnoreCase, "A(B", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a\(*b`, IgnoreCase, "AB", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `a\(*b`, IgnoreCase, "A((B", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `a\\b`, IgnoreCase, "A\\B", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `abc)`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `(abc`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `((a))`, IgnoreCase, "ABC", "Pass. Group[0]=(0,1) Group[1]=(0,1) Group[2]=(0,1)") + runRegexTrial(t, `(a)b(c)`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3) Group[1]=(0,1) Group[2]=(2,1)") + runRegexTrial(t, `a+b+c`, IgnoreCase, "AABBABC", "Pass. Group[0]=(4,3)") + runRegexTrial(t, `a{1,}b{1,}c`, IgnoreCase, "AABBABC", "Pass. Group[0]=(4,3)") + runRegexTrial(t, `a**`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `a.+?c`, IgnoreCase, "ABCABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a.*?c`, IgnoreCase, "ABCABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `a.{0,5}?c`, IgnoreCase, "ABCABC", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `(a+|b)*`, IgnoreCase, "AB", "Pass. Group[0]=(0,2) Group[1]=(0,1)(1,1)") + runRegexTrial(t, `(a+|b){0,}`, IgnoreCase, "AB", "Pass. Group[0]=(0,2) Group[1]=(0,1)(1,1)") + runRegexTrial(t, `(a+|b)+`, IgnoreCase, "AB", "Pass. Group[0]=(0,2) Group[1]=(0,1)(1,1)") + runRegexTrial(t, `(a+|b){1,}`, IgnoreCase, "AB", "Pass. Group[0]=(0,2) Group[1]=(0,1)(1,1)") + runRegexTrial(t, `(a+|b)?`, IgnoreCase, "AB", "Pass. Group[0]=(0,1) Group[1]=(0,1)") + runRegexTrial(t, `(a+|b){0,1}`, IgnoreCase, "AB", "Pass. Group[0]=(0,1) Group[1]=(0,1)") + runRegexTrial(t, `(a+|b){0,1}?`, IgnoreCase, "AB", "Pass. Group[0]=(0,0) Group[1]=") + runRegexTrial(t, `)(`, IgnoreCase, "-", "Error.") + runRegexTrial(t, `[^ab]*`, IgnoreCase, "CDE", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `abc`, IgnoreCase, "", "Fail.") + runRegexTrial(t, `a*`, IgnoreCase, "", "Pass. Group[0]=(0,0)") + runRegexTrial(t, `([abc])*d`, IgnoreCase, "ABBBCD", "Pass. Group[0]=(0,6) Group[1]=(0,1)(1,1)(2,1)(3,1)(4,1)") + runRegexTrial(t, `([abc])*bcd`, IgnoreCase, "ABCD", "Pass. Group[0]=(0,4) Group[1]=(0,1)") + runRegexTrial(t, `a|b|c|d|e`, IgnoreCase, "E", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `(a|b|c|d|e)f`, IgnoreCase, "EF", "Pass. Group[0]=(0,2) Group[1]=(0,1)") + runRegexTrial(t, `abcd*efg`, IgnoreCase, "ABCDEFG", "Pass. Group[0]=(0,7)") + runRegexTrial(t, `ab*`, IgnoreCase, "XABYABBBZ", "Pass. Group[0]=(1,2)") + runRegexTrial(t, `ab*`, IgnoreCase, "XAYABBBZ", "Pass. Group[0]=(1,1)") + runRegexTrial(t, `(ab|cd)e`, IgnoreCase, "ABCDE", "Pass. Group[0]=(2,3) Group[1]=(2,2)") + runRegexTrial(t, `[abhgefdc]ij`, IgnoreCase, "HIJ", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `^(ab|cd)e`, IgnoreCase, "ABCDE", "Fail.") + runRegexTrial(t, `(abc|)ef`, IgnoreCase, "ABCDEF", "Pass. Group[0]=(4,2) Group[1]=(4,0)") + runRegexTrial(t, `(a|b)c*d`, IgnoreCase, "ABCD", "Pass. Group[0]=(1,3) Group[1]=(1,1)") + runRegexTrial(t, `(ab|ab*)bc`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3) Group[1]=(0,1)") + runRegexTrial(t, `a([bc]*)c*`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3) Group[1]=(1,2)") + runRegexTrial(t, `a([bc]*)(c*d)`, IgnoreCase, "ABCD", "Pass. Group[0]=(0,4) Group[1]=(1,2) Group[2]=(3,1)") + runRegexTrial(t, `a([bc]+)(c*d)`, IgnoreCase, "ABCD", "Pass. Group[0]=(0,4) Group[1]=(1,2) Group[2]=(3,1)") + runRegexTrial(t, `a([bc]*)(c+d)`, IgnoreCase, "ABCD", "Pass. Group[0]=(0,4) Group[1]=(1,1) Group[2]=(2,2)") + runRegexTrial(t, `a[bcd]*dcdcde`, IgnoreCase, "ADCDCDE", "Pass. Group[0]=(0,7)") + runRegexTrial(t, `a[bcd]+dcdcde`, IgnoreCase, "ADCDCDE", "Fail.") + runRegexTrial(t, `(ab|a)b*c`, IgnoreCase, "ABC", "Pass. Group[0]=(0,3) Group[1]=(0,2)") + runRegexTrial(t, `((a)(b)c)(d)`, IgnoreCase, "ABCD", "Pass. Group[0]=(0,4) Group[1]=(0,3) Group[2]=(0,1) Group[3]=(1,1) Group[4]=(3,1)") + runRegexTrial(t, `[a-zA-Z_][a-zA-Z0-9_]*`, IgnoreCase, "ALPHA", "Pass. Group[0]=(0,5)") + runRegexTrial(t, `^a(bc+|b[eh])g|.h$`, IgnoreCase, "ABH", "Pass. Group[0]=(1,2) Group[1]=") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, IgnoreCase, "EFFGZ", "Pass. Group[0]=(0,5) Group[1]=(0,5) Group[2]=") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, IgnoreCase, "IJ", "Pass. Group[0]=(0,2) Group[1]=(0,2) Group[2]=(1,1)") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, IgnoreCase, "EFFG", "Fail.") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, IgnoreCase, "BCDD", "Fail.") + runRegexTrial(t, `(bc+d$|ef*g.|h?i(j|k))`, IgnoreCase, "REFFGZ", "Pass. Group[0]=(1,5) Group[1]=(1,5) Group[2]=") + runRegexTrial(t, `((((((((((a))))))))))`, IgnoreCase, "A", "Pass. Group[0]=(0,1) Group[1]=(0,1) Group[2]=(0,1) Group[3]=(0,1) Group[4]=(0,1) Group[5]=(0,1) Group[6]=(0,1) Group[7]=(0,1) Group[8]=(0,1) Group[9]=(0,1) Group[10]=(0,1)") + runRegexTrial(t, `((((((((((a))))))))))\10`, IgnoreCase, "AA", "Pass. Group[0]=(0,2) Group[1]=(0,1) Group[2]=(0,1) Group[3]=(0,1) Group[4]=(0,1) Group[5]=(0,1) Group[6]=(0,1) Group[7]=(0,1) Group[8]=(0,1) Group[9]=(0,1) Group[10]=(0,1)") + runRegexTrial(t, `((((((((((a))))))))))!`, IgnoreCase, "AA", "Fail.") + runRegexTrial(t, `((((((((((a))))))))))!`, IgnoreCase, "A!", "Pass. Group[0]=(0,2) Group[1]=(0,1) Group[2]=(0,1) Group[3]=(0,1) Group[4]=(0,1) Group[5]=(0,1) Group[6]=(0,1) Group[7]=(0,1) Group[8]=(0,1) Group[9]=(0,1) Group[10]=(0,1)") + runRegexTrial(t, `(((((((((a)))))))))`, IgnoreCase, "A", "Pass. Group[0]=(0,1) Group[1]=(0,1) Group[2]=(0,1) Group[3]=(0,1) Group[4]=(0,1) Group[5]=(0,1) Group[6]=(0,1) Group[7]=(0,1) Group[8]=(0,1) Group[9]=(0,1)") + runRegexTrial(t, `(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))`, IgnoreCase, "A", "Pass. Group[0]=(0,1) Group[1]=(0,1)") + runRegexTrial(t, `(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))`, IgnoreCase, "C", "Pass. Group[0]=(0,1) Group[1]=(0,1)") + runRegexTrial(t, `multiple words of text`, IgnoreCase, "UH-UH", "Fail.") + runRegexTrial(t, `multiple words`, IgnoreCase, "MULTIPLE WORDS, YEAH", "Pass. Group[0]=(0,14)") + runRegexTrial(t, `(.*)c(.*)`, IgnoreCase, "ABCDE", "Pass. Group[0]=(0,5) Group[1]=(0,2) Group[2]=(3,2)") + runRegexTrial(t, `\((.*), (.*)\)`, IgnoreCase, "(A, B)", "Pass. Group[0]=(0,6) Group[1]=(1,1) Group[2]=(4,1)") + runRegexTrial(t, `[k]`, IgnoreCase, "AB", "Fail.") + runRegexTrial(t, `abcd`, IgnoreCase, "ABCD", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `a(bc)d`, IgnoreCase, "ABCD", "Pass. Group[0]=(0,4) Group[1]=(1,2)") + runRegexTrial(t, `a[-]?c`, IgnoreCase, "AC", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `(abc)\1`, IgnoreCase, "ABCABC", "Pass. Group[0]=(0,6) Group[1]=(0,3)") + runRegexTrial(t, `([a-c]*)\1`, IgnoreCase, "ABCABC", "Pass. Group[0]=(0,6) Group[1]=(0,3)") + runRegexTrial(t, `a(?!b).`, 0, "abad", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `a(?=d).`, 0, "abad", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `a(?=c|d).`, 0, "abad", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `a(?:b|c|d)(.)`, 0, "ace", "Pass. Group[0]=(0,3) Group[1]=(2,1)") + runRegexTrial(t, `a(?:b|c|d)*(.)`, 0, "ace", "Pass. Group[0]=(0,3) Group[1]=(2,1)") + runRegexTrial(t, `a(?:b|c|d)+?(.)`, 0, "ace", "Pass. Group[0]=(0,3) Group[1]=(2,1)") + runRegexTrial(t, `a(?:b|c|d)+?(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,3) Group[1]=(2,1)") + runRegexTrial(t, `a(?:b|c|d)+(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,8) Group[1]=(7,1)") + runRegexTrial(t, `a(?:b|c|d){2}(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,4) Group[1]=(3,1)") + runRegexTrial(t, `a(?:b|c|d){4,5}(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,7) Group[1]=(6,1)") + runRegexTrial(t, `a(?:b|c|d){4,5}?(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,6) Group[1]=(5,1)") + runRegexTrial(t, `((foo)|(bar))*`, 0, "foobar", "Pass. Group[0]=(0,6) Group[1]=(0,3)(3,3) Group[2]=(0,3) Group[3]=(3,3)") + runRegexTrial(t, `:(?:`, 0, "-", "Error.") + runRegexTrial(t, `a(?:b|c|d){6,7}(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,8) Group[1]=(7,1)") + runRegexTrial(t, `a(?:b|c|d){6,7}?(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,8) Group[1]=(7,1)") + runRegexTrial(t, `a(?:b|c|d){5,6}(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,8) Group[1]=(7,1)") + runRegexTrial(t, `a(?:b|c|d){5,6}?(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,7) Group[1]=(6,1)") + runRegexTrial(t, `a(?:b|c|d){5,7}(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,8) Group[1]=(7,1)") + runRegexTrial(t, `a(?:b|c|d){5,7}?(.)`, 0, "acdbcdbe", "Pass. Group[0]=(0,7) Group[1]=(6,1)") + runRegexTrial(t, `a(?:b|(c|e){1,2}?|d)+?(.)`, 0, "ace", "Pass. Group[0]=(0,3) Group[1]=(1,1) Group[2]=(2,1)") + runRegexTrial(t, `^(.+)?B`, 0, "AB", "Pass. Group[0]=(0,2) Group[1]=(0,1)") + runRegexTrial(t, `^([^a-z])|(\^)$`, 0, ".", "Pass. Group[0]=(0,1) Group[1]=(0,1) Group[2]=") + runRegexTrial(t, `^[<>]&`, 0, "<&OUT", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `^(a\1?){4}$`, 0, "aaaaaaaaaa", "Pass. Group[0]=(0,10) Group[1]=(0,1)(1,2)(3,3)(6,4)") + runRegexTrial(t, `^(a\1?){4}$`, 0, "aaaaaaaaa", "Fail.") + runRegexTrial(t, `^(a\1?){4}$`, 0, "aaaaaaaaaaa", "Fail.") + runRegexTrial(t, `^(a(?(1)\1)){4}$`, 0, "aaaaaaaaaa", "Pass. Group[0]=(0,10) Group[1]=(0,1)(1,2)(3,3)(6,4)") + runRegexTrial(t, `^(a(?(1)\1)){4}$`, 0, "aaaaaaaaa", "Fail.") + runRegexTrial(t, `^(a(?(1)\1)){4}$`, 0, "aaaaaaaaaaa", "Fail.") + runRegexTrial(t, `((a{4})+)`, 0, "aaaaaaaaa", "Pass. Group[0]=(0,8) Group[1]=(0,8) Group[2]=(0,4)(4,4)") + runRegexTrial(t, `(((aa){2})+)`, 0, "aaaaaaaaaa", "Pass. Group[0]=(0,8) Group[1]=(0,8) Group[2]=(0,4)(4,4) Group[3]=(0,2)(2,2)(4,2)(6,2)") + runRegexTrial(t, `(((a{2}){2})+)`, 0, "aaaaaaaaaa", "Pass. Group[0]=(0,8) Group[1]=(0,8) Group[2]=(0,4)(4,4) Group[3]=(0,2)(2,2)(4,2)(6,2)") + runRegexTrial(t, `(?:(f)(o)(o)|(b)(a)(r))*`, 0, "foobar", "Pass. Group[0]=(0,6) Group[1]=(0,1) Group[2]=(1,1) Group[3]=(2,1) Group[4]=(3,1) Group[5]=(4,1) Group[6]=(5,1)") + runRegexTrial(t, `(?<=a)b`, 0, "ab", "Pass. Group[0]=(1,1)") + runRegexTrial(t, `(?<=a)b`, 0, "cb", "Fail.") + runRegexTrial(t, `(?<=a)b`, 0, "b", "Fail.") + runRegexTrial(t, `(?a+)ab`, 0, "aaab", "Fail.") + runRegexTrial(t, `(?>a+)b`, 0, "aaab", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `([[:]+)`, 0, "a:[b]:", "Pass. Group[0]=(1,2) Group[1]=(1,2)") + runRegexTrial(t, `([[=]+)`, 0, "a=[b]=", "Pass. Group[0]=(1,2) Group[1]=(1,2)") + runRegexTrial(t, `([[.]+)`, 0, "a.[b].", "Pass. Group[0]=(1,2) Group[1]=(1,2)") + runRegexTrial(t, `[a[:]b[:c]`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `[a[:]b[:c]`, 0, "abc", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `((?>a+)b)`, 0, "aaab", "Pass. Group[0]=(0,4) Group[1]=(0,4)") + runRegexTrial(t, `(?>(a+))b`, 0, "aaab", "Pass. Group[0]=(0,4) Group[1]=(0,3)") + runRegexTrial(t, `((?>[^()]+)|\([^()]*\))+`, 0, "((abc(ade)ufh()()x", "Pass. Group[0]=(2,16) Group[1]=(2,3)(5,5)(10,3)(13,2)(15,2)(17,1)") + runRegexTrial(t, `(?<=x+)`, 0, "xxxxy", "Pass. Group[0]=(1,0)") + runRegexTrial(t, `a{37,17}`, 0, "-", "Error.") + runRegexTrial(t, `\Z`, 0, "a\nb\n", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `\z`, 0, "a\nb\n", "Pass. Group[0]=(4,0)") + runRegexTrial(t, `$`, 0, "a\nb\n", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `\Z`, 0, "b\na\n", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `\z`, 0, "b\na\n", "Pass. Group[0]=(4,0)") + runRegexTrial(t, `$`, 0, "b\na\n", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `\Z`, 0, "b\na", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `\z`, 0, "b\na", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `$`, 0, "b\na", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `\Z`, Multiline, "a\nb\n", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `\z`, Multiline, "a\nb\n", "Pass. Group[0]=(4,0)") + runRegexTrial(t, `$`, Multiline, "a\nb\n", "Pass. Group[0]=(1,0)") + runRegexTrial(t, `\Z`, Multiline, "b\na\n", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `\z`, Multiline, "b\na\n", "Pass. Group[0]=(4,0)") + runRegexTrial(t, `$`, Multiline, "b\na\n", "Pass. Group[0]=(1,0)") + runRegexTrial(t, `\Z`, Multiline, "b\na", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `\z`, Multiline, "b\na", "Pass. Group[0]=(3,0)") + runRegexTrial(t, `$`, Multiline, "b\na", "Pass. Group[0]=(1,0)") + runRegexTrial(t, `a\Z`, 0, "a\nb\n", "Fail.") + runRegexTrial(t, `a\z`, 0, "a\nb\n", "Fail.") + runRegexTrial(t, `a$`, 0, "a\nb\n", "Fail.") + runRegexTrial(t, `a\Z`, 0, "b\na\n", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `a\z`, 0, "b\na\n", "Fail.") + runRegexTrial(t, `a$`, 0, "b\na\n", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `a\Z`, 0, "b\na", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `a\z`, 0, "b\na", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `a$`, 0, "b\na", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `a\z`, Multiline, "a\nb\n", "Fail.") + runRegexTrial(t, `a$`, Multiline, "a\nb\n", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `a\Z`, Multiline, "b\na\n", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `a\z`, Multiline, "b\na\n", "Fail.") + runRegexTrial(t, `a$`, Multiline, "b\na\n", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `a\Z`, Multiline, "b\na", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `a\z`, Multiline, "b\na", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `a$`, Multiline, "b\na", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `aa\Z`, 0, "aa\nb\n", "Fail.") + runRegexTrial(t, `aa\z`, 0, "aa\nb\n", "Fail.") + runRegexTrial(t, `aa$`, 0, "aa\nb\n", "Fail.") + runRegexTrial(t, `aa\Z`, 0, "b\naa\n", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa\z`, 0, "b\naa\n", "Fail.") + runRegexTrial(t, `aa$`, 0, "b\naa\n", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa\Z`, 0, "b\naa", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa\z`, 0, "b\naa", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa$`, 0, "b\naa", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa\z`, Multiline, "aa\nb\n", "Fail.") + runRegexTrial(t, `aa$`, Multiline, "aa\nb\n", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `aa\Z`, Multiline, "b\naa\n", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa\z`, Multiline, "b\naa\n", "Fail.") + runRegexTrial(t, `aa$`, Multiline, "b\naa\n", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa\Z`, Multiline, "b\naa", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa\z`, Multiline, "b\naa", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa$`, Multiline, "b\naa", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `aa\Z`, 0, "ac\nb\n", "Fail.") + runRegexTrial(t, `aa\z`, 0, "ac\nb\n", "Fail.") + runRegexTrial(t, `aa$`, 0, "ac\nb\n", "Fail.") + runRegexTrial(t, `aa\Z`, 0, "b\nac\n", "Fail.") + runRegexTrial(t, `aa\z`, 0, "b\nac\n", "Fail.") + runRegexTrial(t, `aa$`, 0, "b\nac\n", "Fail.") + runRegexTrial(t, `aa\Z`, 0, "b\nac", "Fail.") + runRegexTrial(t, `aa\z`, 0, "b\nac", "Fail.") + runRegexTrial(t, `aa$`, 0, "b\nac", "Fail.") + runRegexTrial(t, `aa\Z`, Multiline, "ac\nb\n", "Fail.") + runRegexTrial(t, `aa\z`, Multiline, "ac\nb\n", "Fail.") + runRegexTrial(t, `aa$`, Multiline, "ac\nb\n", "Fail.") + runRegexTrial(t, `aa\Z`, Multiline, "b\nac\n", "Fail.") + runRegexTrial(t, `aa\z`, Multiline, "b\nac\n", "Fail.") + runRegexTrial(t, `aa$`, Multiline, "b\nac\n", "Fail.") + runRegexTrial(t, `aa\Z`, Multiline, "b\nac", "Fail.") + runRegexTrial(t, `aa\z`, Multiline, "b\nac", "Fail.") + runRegexTrial(t, `aa$`, Multiline, "b\nac", "Fail.") + runRegexTrial(t, `aa\Z`, 0, "ca\nb\n", "Fail.") + runRegexTrial(t, `aa\z`, 0, "ca\nb\n", "Fail.") + runRegexTrial(t, `aa$`, 0, "ca\nb\n", "Fail.") + runRegexTrial(t, `aa\Z`, 0, "b\nca\n", "Fail.") + runRegexTrial(t, `aa\z`, 0, "b\nca\n", "Fail.") + runRegexTrial(t, `aa$`, 0, "b\nca\n", "Fail.") + runRegexTrial(t, `aa\Z`, 0, "b\nca", "Fail.") + runRegexTrial(t, `aa\z`, 0, "b\nca", "Fail.") + runRegexTrial(t, `aa$`, 0, "b\nca", "Fail.") + runRegexTrial(t, `aa\Z`, Multiline, "ca\nb\n", "Fail.") + runRegexTrial(t, `aa\z`, Multiline, "ca\nb\n", "Fail.") + runRegexTrial(t, `aa$`, Multiline, "ca\nb\n", "Fail.") + runRegexTrial(t, `aa\Z`, Multiline, "b\nca\n", "Fail.") + runRegexTrial(t, `aa\z`, Multiline, "b\nca\n", "Fail.") + runRegexTrial(t, `aa$`, Multiline, "b\nca\n", "Fail.") + runRegexTrial(t, `aa\Z`, Multiline, "b\nca", "Fail.") + runRegexTrial(t, `aa\z`, Multiline, "b\nca", "Fail.") + runRegexTrial(t, `aa$`, Multiline, "b\nca", "Fail.") + runRegexTrial(t, `ab\Z`, 0, "ab\nb\n", "Fail.") + runRegexTrial(t, `ab\z`, 0, "ab\nb\n", "Fail.") + runRegexTrial(t, `ab$`, 0, "ab\nb\n", "Fail.") + runRegexTrial(t, `ab\Z`, 0, "b\nab\n", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab\z`, 0, "b\nab\n", "Fail.") + runRegexTrial(t, `ab$`, 0, "b\nab\n", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab\Z`, 0, "b\nab", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab\z`, 0, "b\nab", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab$`, 0, "b\nab", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab\z`, Multiline, "ab\nb\n", "Fail.") + runRegexTrial(t, `ab$`, Multiline, "ab\nb\n", "Pass. Group[0]=(0,2)") + runRegexTrial(t, `ab\Z`, Multiline, "b\nab\n", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab\z`, Multiline, "b\nab\n", "Fail.") + runRegexTrial(t, `ab$`, Multiline, "b\nab\n", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab\Z`, Multiline, "b\nab", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab\z`, Multiline, "b\nab", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab$`, Multiline, "b\nab", "Pass. Group[0]=(2,2)") + runRegexTrial(t, `ab\Z`, 0, "ac\nb\n", "Fail.") + runRegexTrial(t, `ab\z`, 0, "ac\nb\n", "Fail.") + runRegexTrial(t, `ab$`, 0, "ac\nb\n", "Fail.") + runRegexTrial(t, `ab\Z`, 0, "b\nac\n", "Fail.") + runRegexTrial(t, `ab\z`, 0, "b\nac\n", "Fail.") + runRegexTrial(t, `ab$`, 0, "b\nac\n", "Fail.") + runRegexTrial(t, `ab\Z`, 0, "b\nac", "Fail.") + runRegexTrial(t, `ab\z`, 0, "b\nac", "Fail.") + runRegexTrial(t, `ab$`, 0, "b\nac", "Fail.") + runRegexTrial(t, `ab\Z`, Multiline, "ac\nb\n", "Fail.") + runRegexTrial(t, `ab\z`, Multiline, "ac\nb\n", "Fail.") + runRegexTrial(t, `ab$`, Multiline, "ac\nb\n", "Fail.") + runRegexTrial(t, `ab\Z`, Multiline, "b\nac\n", "Fail.") + runRegexTrial(t, `ab\z`, Multiline, "b\nac\n", "Fail.") + runRegexTrial(t, `ab$`, Multiline, "b\nac\n", "Fail.") + runRegexTrial(t, `ab\Z`, Multiline, "b\nac", "Fail.") + runRegexTrial(t, `ab\z`, Multiline, "b\nac", "Fail.") + runRegexTrial(t, `ab$`, Multiline, "b\nac", "Fail.") + runRegexTrial(t, `ab\Z`, 0, "ca\nb\n", "Fail.") + runRegexTrial(t, `ab\z`, 0, "ca\nb\n", "Fail.") + runRegexTrial(t, `ab$`, 0, "ca\nb\n", "Fail.") + runRegexTrial(t, `ab\Z`, 0, "b\nca\n", "Fail.") + runRegexTrial(t, `ab\z`, 0, "b\nca\n", "Fail.") + runRegexTrial(t, `ab$`, 0, "b\nca\n", "Fail.") + runRegexTrial(t, `ab\Z`, 0, "b\nca", "Fail.") + runRegexTrial(t, `ab\z`, 0, "b\nca", "Fail.") + runRegexTrial(t, `ab$`, 0, "b\nca", "Fail.") + runRegexTrial(t, `ab\Z`, Multiline, "ca\nb\n", "Fail.") + runRegexTrial(t, `ab\z`, Multiline, "ca\nb\n", "Fail.") + runRegexTrial(t, `ab$`, Multiline, "ca\nb\n", "Fail.") + runRegexTrial(t, `ab\Z`, Multiline, "b\nca\n", "Fail.") + runRegexTrial(t, `ab\z`, Multiline, "b\nca\n", "Fail.") + runRegexTrial(t, `ab$`, Multiline, "b\nca\n", "Fail.") + runRegexTrial(t, `ab\Z`, Multiline, "b\nca", "Fail.") + runRegexTrial(t, `ab\z`, Multiline, "b\nca", "Fail.") + runRegexTrial(t, `ab$`, Multiline, "b\nca", "Fail.") + runRegexTrial(t, `abb\Z`, 0, "abb\nb\n", "Fail.") + runRegexTrial(t, `abb\z`, 0, "abb\nb\n", "Fail.") + runRegexTrial(t, `abb$`, 0, "abb\nb\n", "Fail.") + runRegexTrial(t, `abb\Z`, 0, "b\nabb\n", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb\z`, 0, "b\nabb\n", "Fail.") + runRegexTrial(t, `abb$`, 0, "b\nabb\n", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb\Z`, 0, "b\nabb", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb\z`, 0, "b\nabb", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb$`, 0, "b\nabb", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb\z`, Multiline, "abb\nb\n", "Fail.") + runRegexTrial(t, `abb$`, Multiline, "abb\nb\n", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `abb\Z`, Multiline, "b\nabb\n", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb\z`, Multiline, "b\nabb\n", "Fail.") + runRegexTrial(t, `abb$`, Multiline, "b\nabb\n", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb\Z`, Multiline, "b\nabb", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb\z`, Multiline, "b\nabb", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb$`, Multiline, "b\nabb", "Pass. Group[0]=(2,3)") + runRegexTrial(t, `abb\Z`, 0, "ac\nb\n", "Fail.") + runRegexTrial(t, `abb\z`, 0, "ac\nb\n", "Fail.") + runRegexTrial(t, `abb$`, 0, "ac\nb\n", "Fail.") + runRegexTrial(t, `abb\Z`, 0, "b\nac\n", "Fail.") + runRegexTrial(t, `abb\z`, 0, "b\nac\n", "Fail.") + runRegexTrial(t, `abb$`, 0, "b\nac\n", "Fail.") + runRegexTrial(t, `abb\Z`, 0, "b\nac", "Fail.") + runRegexTrial(t, `abb\z`, 0, "b\nac", "Fail.") + runRegexTrial(t, `abb$`, 0, "b\nac", "Fail.") + runRegexTrial(t, `abb\Z`, Multiline, "ac\nb\n", "Fail.") + runRegexTrial(t, `abb\z`, Multiline, "ac\nb\n", "Fail.") + runRegexTrial(t, `abb$`, Multiline, "ac\nb\n", "Fail.") + runRegexTrial(t, `abb\Z`, Multiline, "b\nac\n", "Fail.") + runRegexTrial(t, `abb\z`, Multiline, "b\nac\n", "Fail.") + runRegexTrial(t, `abb$`, Multiline, "b\nac\n", "Fail.") + runRegexTrial(t, `abb\Z`, Multiline, "b\nac", "Fail.") + runRegexTrial(t, `abb\z`, Multiline, "b\nac", "Fail.") + runRegexTrial(t, `abb$`, Multiline, "b\nac", "Fail.") + runRegexTrial(t, `abb\Z`, 0, "ca\nb\n", "Fail.") + runRegexTrial(t, `abb\z`, 0, "ca\nb\n", "Fail.") + runRegexTrial(t, `abb$`, 0, "ca\nb\n", "Fail.") + runRegexTrial(t, `abb\Z`, 0, "b\nca\n", "Fail.") + runRegexTrial(t, `abb\z`, 0, "b\nca\n", "Fail.") + runRegexTrial(t, `abb$`, 0, "b\nca\n", "Fail.") + runRegexTrial(t, `abb\Z`, 0, "b\nca", "Fail.") + runRegexTrial(t, `abb\z`, 0, "b\nca", "Fail.") + runRegexTrial(t, `abb$`, 0, "b\nca", "Fail.") + runRegexTrial(t, `abb\Z`, Multiline, "ca\nb\n", "Fail.") + runRegexTrial(t, `abb\z`, Multiline, "ca\nb\n", "Fail.") + runRegexTrial(t, `abb$`, Multiline, "ca\nb\n", "Fail.") + runRegexTrial(t, `abb\Z`, Multiline, "b\nca\n", "Fail.") + runRegexTrial(t, `abb\z`, Multiline, "b\nca\n", "Fail.") + runRegexTrial(t, `abb$`, Multiline, "b\nca\n", "Fail.") + runRegexTrial(t, `abb\Z`, Multiline, "b\nca", "Fail.") + runRegexTrial(t, `abb\z`, Multiline, "b\nca", "Fail.") + runRegexTrial(t, `abb$`, Multiline, "b\nca", "Fail.") + runRegexTrial(t, `(^|x)(c)`, 0, "ca", "Pass. Group[0]=(0,1) Group[1]=(0,0) Group[2]=(0,1)") + runRegexTrial(t, `a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz`, 0, "x", "Fail.") + runRegexTrial(t, `round\(((?>[^()]+))\)`, 0, "_I(round(xs * sz),1)", "Pass. Group[0]=(3,14) Group[1]=(9,7)") + runRegexTrial(t, `foo.bart`, 0, "foo.bart", "Pass. Group[0]=(0,8)") + runRegexTrial(t, `^d[x][x][x]`, Multiline, "abcd\ndxxx", "Pass. Group[0]=(5,4)") + runRegexTrial(t, `.X(.+)+X`, 0, "bbbbXcXaaaaaaaa", "Pass. Group[0]=(3,4) Group[1]=(5,1)") + runRegexTrial(t, `.X(.+)+XX`, 0, "bbbbXcXXaaaaaaaa", "Pass. Group[0]=(3,5) Group[1]=(5,1)") + runRegexTrial(t, `.XX(.+)+X`, 0, "bbbbXXcXaaaaaaaa", "Pass. Group[0]=(3,5) Group[1]=(6,1)") + runRegexTrial(t, `.X(.+)+X`, 0, "bbbbXXaaaaaaaaa", "Fail.") + runRegexTrial(t, `.X(.+)+XX`, 0, "bbbbXXXaaaaaaaaa", "Fail.") + runRegexTrial(t, `.XX(.+)+X`, 0, "bbbbXXXaaaaaaaaa", "Fail.") + runRegexTrial(t, `.X(.+)+[X]`, 0, "bbbbXcXaaaaaaaa", "Pass. Group[0]=(3,4) Group[1]=(5,1)") + runRegexTrial(t, `.X(.+)+[X][X]`, 0, "bbbbXcXXaaaaaaaa", "Pass. Group[0]=(3,5) Group[1]=(5,1)") + runRegexTrial(t, `.XX(.+)+[X]`, 0, "bbbbXXcXaaaaaaaa", "Pass. Group[0]=(3,5) Group[1]=(6,1)") + runRegexTrial(t, `.X(.+)+[X]`, 0, "bbbbXXaaaaaaaaa", "Fail.") + runRegexTrial(t, `.X(.+)+[X][X]`, 0, "bbbbXXXaaaaaaaaa", "Fail.") + runRegexTrial(t, `.XX(.+)+[X]`, 0, "bbbbXXXaaaaaaaaa", "Fail.") + runRegexTrial(t, `.[X](.+)+[X]`, 0, "bbbbXcXaaaaaaaa", "Pass. Group[0]=(3,4) Group[1]=(5,1)") + runRegexTrial(t, `.[X](.+)+[X][X]`, 0, "bbbbXcXXaaaaaaaa", "Pass. Group[0]=(3,5) Group[1]=(5,1)") + runRegexTrial(t, `.[X][X](.+)+[X]`, 0, "bbbbXXcXaaaaaaaa", "Pass. Group[0]=(3,5) Group[1]=(6,1)") + runRegexTrial(t, `.[X](.+)+[X]`, 0, "bbbbXXaaaaaaaaa", "Fail.") + runRegexTrial(t, `.[X](.+)+[X][X]`, 0, "bbbbXXXaaaaaaaaa", "Fail.") + runRegexTrial(t, `.[X][X](.+)+[X]`, 0, "bbbbXXXaaaaaaaaa", "Fail.") + runRegexTrial(t, `tt+$`, 0, "xxxtt", "Pass. Group[0]=(3,2)") + runRegexTrial(t, `([\d-z]+)`, 0, "a0-za", "Pass. Group[0]=(1,3) Group[1]=(1,3)") + runRegexTrial(t, `([\d-\s]+)`, 0, "a0- z", "Pass. Group[0]=(1,3) Group[1]=(1,3)") + runRegexTrial(t, `\GX.*X`, 0, "aaaXbX", "Fail.") + runRegexTrial(t, `(\d+\.\d+)`, 0, "3.1415926", "Pass. Group[0]=(0,9) Group[1]=(0,9)") + runRegexTrial(t, `(\ba.{0,10}br)`, 0, "have a web browser", "Pass. Group[0]=(5,8) Group[1]=(5,8)") + runRegexTrial(t, `\.c(pp|xx|c)?$`, IgnoreCase, "Changes", "Fail.") + runRegexTrial(t, `\.c(pp|xx|c)?$`, IgnoreCase, "IO.c", "Pass. Group[0]=(2,2) Group[1]=") + runRegexTrial(t, `(\.c(pp|xx|c)?$)`, IgnoreCase, "IO.c", "Pass. Group[0]=(2,2) Group[1]=(2,2) Group[2]=") + runRegexTrial(t, `^([a-z]:)`, 0, "C:/", "Fail.") + runRegexTrial(t, `^\S\s+aa$`, Multiline, "\nx aa", "Pass. Group[0]=(1,4)") + runRegexTrial(t, `(^|a)b`, 0, "ab", "Pass. Group[0]=(0,2) Group[1]=(0,1)") + runRegexTrial(t, `^([ab]*?)(b)?(c)$`, 0, "abac", "Pass. Group[0]=(0,4) Group[1]=(0,3) Group[2]= Group[3]=(3,1)") + runRegexTrial(t, `(\w)?(abc)\1b`, 0, "abcab", "Fail.") + runRegexTrial(t, `^(?:.,){2}c`, 0, "a,b,c", "Pass. Group[0]=(0,5)") + runRegexTrial(t, `^(.,){2}c`, 0, "a,b,c", "Pass. Group[0]=(0,5) Group[1]=(0,2)(2,2)") + runRegexTrial(t, `^(?:[^,]*,){2}c`, 0, "a,b,c", "Pass. Group[0]=(0,5)") + runRegexTrial(t, `^([^,]*,){2}c`, 0, "a,b,c", "Pass. Group[0]=(0,5) Group[1]=(0,2)(2,2)") + runRegexTrial(t, `^([^,]*,){3}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]*,){3,}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]*,){0,3}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]{1,3},){3}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]{1,3},){3,}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]{1,3},){0,3}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]{1,},){3}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]{1,},){3,}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]{1,},){0,3}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]{0,3},){3}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]{0,3},){3,}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `^([^,]{0,3},){0,3}d`, 0, "aaa,b,c,d", "Pass. Group[0]=(0,9) Group[1]=(0,4)(4,2)(6,2)") + runRegexTrial(t, `(?i)`, 0, "", "Pass. Group[0]=(0,0)") + runRegexTrial(t, `(?!\A)x`, Multiline, "a\nxb\n", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `^(a(b)?)+$`, 0, "aba", "Pass. Group[0]=(0,3) Group[1]=(0,2)(2,1) Group[2]=(1,1)") + runRegexTrial(t, `^(aa(bb)?)+$`, 0, "aabbaa", "Pass. Group[0]=(0,6) Group[1]=(0,4)(4,2) Group[2]=(2,2)") + runRegexTrial(t, `^.{9}abc.*\n`, Multiline, "123\nabcabcabcabc\n", "Pass. Group[0]=(4,13)") + runRegexTrial(t, `^(a)?a$`, 0, "a", "Pass. Group[0]=(0,1) Group[1]=") + runRegexTrial(t, `^(a)?(?(1)a|b)+$`, 0, "a", "Fail.") + runRegexTrial(t, `^(a\1?)(a\1?)(a\2?)(a\3?)$`, 0, "aaaaaa", "Pass. Group[0]=(0,6) Group[1]=(0,1) Group[2]=(1,2) Group[3]=(3,1) Group[4]=(4,2)") + runRegexTrial(t, `^(a\1?){4}$`, 0, "aaaaaa", "Pass. Group[0]=(0,6) Group[1]=(0,1)(1,2)(3,1)(4,2)") + runRegexTrial(t, `^(0+)?(?:x(1))?`, 0, "x1", "Pass. Group[0]=(0,2) Group[1]= Group[2]=(1,1)") + runRegexTrial(t, `^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))?`, 0, "012cxx0190", "Pass. Group[0]=(0,10) Group[1]=(0,4) Group[2]= Group[3]=(6,4)") + runRegexTrial(t, `^(b+?|a){1,2}c`, 0, "bbbac", "Pass. Group[0]=(0,5) Group[1]=(0,3)(3,1)") + runRegexTrial(t, `^(b+?|a){1,2}c`, 0, "bbbbac", "Pass. Group[0]=(0,6) Group[1]=(0,4)(4,1)") + runRegexTrial(t, `\((\w\. \w+)\)`, 0, "cd. (A. Tw)", "Pass. Group[0]=(4,7) Group[1]=(5,5)") + runRegexTrial(t, `((?:aaaa|bbbb)cccc)?`, 0, "aaaacccc", "Pass. Group[0]=(0,8) Group[1]=(0,8)") + runRegexTrial(t, `((?:aaaa|bbbb)cccc)?`, 0, "bbbbcccc", "Pass. Group[0]=(0,8) Group[1]=(0,8)") + + runRegexTrial(t, `^(foo)|(bar)$`, 0, "foobar", "Pass. Group[0]=(0,3) Group[1]=(0,3) Group[2]=") + runRegexTrial(t, `^(foo)|(bar)$`, RightToLeft, "foobar", "Pass. Group[0]=(3,3) Group[1]= Group[2]=(3,3)") + + runRegexTrial(t, `b`, RightToLeft, "babaaa", "Pass. Group[0]=(2,1)") + runRegexTrial(t, `bab`, RightToLeft, "babababaa", "Pass. Group[0]=(4,3)") + runRegexTrial(t, `abb`, RightToLeft, "abb", "Pass. Group[0]=(0,3)") + + runRegexTrial(t, `b$`, RightToLeft|Multiline, "aab\naab", "Pass. Group[0]=(6,1)") + runRegexTrial(t, `^a`, RightToLeft|Multiline, "aab\naab", "Pass. Group[0]=(4,1)") + runRegexTrial(t, `^aaab`, RightToLeft|Multiline, "aaab\naab", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `abb{2}`, RightToLeft, "abbb", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `abb{1,2}`, RightToLeft, "abbb", "Pass. Group[0]=(0,4)") + + runRegexTrial(t, `abb{1,2}`, RightToLeft, "abbbbbaaaa", "Pass. Group[0]=(0,4)") + runRegexTrial(t, `\Ab`, RightToLeft, "bab\naaa", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `\Abab$`, RightToLeft, "bab", "Pass. Group[0]=(0,3)") + runRegexTrial(t, `b\Z`, RightToLeft, "bab\naaa", "Fail.") + runRegexTrial(t, `b\Z`, RightToLeft, "babaaab", "Pass. Group[0]=(6,1)") + runRegexTrial(t, `b\z`, RightToLeft, "babaaa", "Fail.") + runRegexTrial(t, `b\z`, RightToLeft, "babaaab", "Pass. Group[0]=(6,1)") + runRegexTrial(t, `a\G`, RightToLeft, "babaaa", "Pass. Group[0]=(5,1)") + runRegexTrial(t, `\Abaaa\G`, RightToLeft, "baaa", "Pass. Group[0]=(0,4)") + // runRegexTrial(t, `b`, RightToLeft, "babaaa", "Pass. Group[0]=(2,1)") + // runRegexTrial(t, `b`, RightToLeft, "babaaa", "Pass. Group[0]=(2,1)") + // runRegexTrial(t, `b`, RightToLeft, "babaaa", "Pass. Group[0]=(2,1)") + // runRegexTrial(t, `b`, RightToLeft, "babaaa", "Pass. Group[0]=(2,1)") + + runRegexTrial(t, `\bc`, RightToLeft, "aaa c aaa c a", "Pass. Group[0]=(10,1)") + runRegexTrial(t, `\bc`, RightToLeft, "c aaa c", "Pass. Group[0]=(6,1)") + runRegexTrial(t, `\bc`, RightToLeft, "aaa ac", "Fail.") + runRegexTrial(t, `\bc`, RightToLeft, "c aaa", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `\bc`, RightToLeft, "aaacaaa", "Fail.") + runRegexTrial(t, `\bc`, RightToLeft, "aaac aaa", "Fail.") + runRegexTrial(t, `\bc`, RightToLeft, "aaa ca caaa", "Pass. Group[0]=(7,1)") + + runRegexTrial(t, `\Bc`, RightToLeft, "ac aaa ac", "Pass. Group[0]=(8,1)") + runRegexTrial(t, `\Bc`, RightToLeft, "aaa c", "Fail.") + runRegexTrial(t, `\Bc`, RightToLeft, "ca aaa", "Fail.") + runRegexTrial(t, `\Bc`, RightToLeft, "aaa c aaa", "Fail.") + runRegexTrial(t, `\Bc`, RightToLeft, " acaca ", "Pass. Group[0]=(4,1)") + runRegexTrial(t, `\Bc`, RightToLeft, "aaac aaac", "Pass. Group[0]=(8,1)") + runRegexTrial(t, `\Bc`, RightToLeft, "aaa caaa", "Fail.") + + runRegexTrial(t, `b(a?)b`, RightToLeft, "aabababbaaababa", "Pass. Group[0]=(11,3) Group[1]=(12,1)") + runRegexTrial(t, `b{4}`, RightToLeft, "abbbbaabbbbaabbb", "Pass. Group[0]=(7,4)") + runRegexTrial(t, `b\1aa(.)`, RightToLeft, "bBaaB", "Pass. Group[0]=(0,5) Group[1]=(4,1)") + runRegexTrial(t, `b(.)aa\1`, RightToLeft, "bBaaB", "Fail.") + + runRegexTrial(t, `^(a\1?){4}$`, RightToLeft, "aaaaaa", "Pass. Group[0]=(0,6) Group[1]=(5,1)(3,2)(2,1)(0,2)") + runRegexTrial(t, `^([0-9a-fA-F]+)(?:x([0-9a-fA-F]+)?)(?:x([0-9a-fA-F]+))?`, RightToLeft, "012cxx0190", "Pass. Group[0]=(0,10) Group[1]=(0,4) Group[2]= Group[3]=(6,4)") + runRegexTrial(t, `^(b+?|a){1,2}c`, RightToLeft, "bbbac", "Pass. Group[0]=(0,5) Group[1]=(3,1)(0,3)") + runRegexTrial(t, `\((\w\. \w+)\)`, RightToLeft, "cd. (A. Tw)", "Pass. Group[0]=(4,7) Group[1]=(5,5)") + runRegexTrial(t, `((?:aaaa|bbbb)cccc)?`, RightToLeft, "aaaacccc", "Pass. Group[0]=(0,8) Group[1]=(0,8)") + runRegexTrial(t, `((?:aaaa|bbbb)cccc)?`, RightToLeft, "bbbbcccc", "Pass. Group[0]=(0,8) Group[1]=(0,8)") + + runRegexTrial(t, `(?<=a)b`, RightToLeft, "ab", "Pass. Group[0]=(1,1)") + runRegexTrial(t, `(?<=a)b`, RightToLeft, "cb", "Fail.") + runRegexTrial(t, `(?<=a)b`, RightToLeft, "b", "Fail.") + runRegexTrial(t, `(?[^()]+|\((?)|\)(?<-depth>))*(?(depth)(?!))\)`, 0, "((a(b))c)", "Pass. Group[0]=(0,9) Group[1]=") + runRegexTrial(t, `^\((?>[^()]+|\((?)|\)(?<-depth>))*(?(depth)(?!))\)$`, 0, "((a(b))c)", "Pass. Group[0]=(0,9) Group[1]=") + runRegexTrial(t, `^\((?>[^()]+|\((?)|\)(?<-depth>))*(?(depth)(?!))\)$`, 0, "((a(b))c", "Fail.") + + runRegexTrial(t, `^\((?>[^()]+|\((?)|\)(?<-depth>))*(?(depth)(?!))\)$`, 0, "())", "Fail.") + + runRegexTrial(t, `(((?\()[^()]*)+((?\))[^()]*)+)+(?(foo)(?!))`, 0, "((a(b))c)", + "Pass. Group[0]=(0,9) Group[1]=(0,9) Group[2]=(0,1)(1,2)(3,2) Group[3]=(5,1)(6,2)(8,1) Group[4]= Group[5]=(4,1)(2,4)(1,7)") + runRegexTrial(t, `^(((?\()[^()]*)+((?\))[^()]*)+)+(?(foo)(?!))$`, 0, "((a(b))c)", + "Pass. Group[0]=(0,9) Group[1]=(0,9) Group[2]=(0,1)(1,2)(3,2) Group[3]=(5,1)(6,2)(8,1) Group[4]= Group[5]=(4,1)(2,4)(1,7)") + runRegexTrial(t, `(((?\()[^()]*)+((?\))[^()]*)+)+(?(foo)(?!))`, 0, "x(a((b)))b)x", + "Pass. Group[0]=(1,9) Group[1]=(1,9) Group[2]=(1,2)(3,1)(4,2) Group[3]=(6,1)(7,1)(8,2) Group[4]= Group[5]=(5,1)(4,3)(2,6)") + runRegexTrial(t, `(((?\()[^()]*)+((?\))[^()]*)+)+(?(foo)(?!))`, 0, "x((a((b)))x", + "Pass. Group[0]=(2,9) Group[1]=(2,9) Group[2]=(2,2)(4,1)(5,2) Group[3]=(7,1)(8,1)(9,2) Group[4]= Group[5]=(6,1)(5,3)(3,6)") + runRegexTrial(t, `^(((?\()[^()]*)+((?\))[^()]*)+)+(?(foo)(?!))$`, 0, "((a(b))c", "Fail.") + runRegexTrial(t, `^(((?\()[^()]*)+((?\))[^()]*)+)+(?(foo)(?!))$`, 0, "((a(b))c))", "Fail.") + runRegexTrial(t, `^(((?\()[^()]*)+((?\))[^()]*)+)+(?(foo)(?!))$`, 0, ")(", "Fail.") + runRegexTrial(t, `^(((?\()[^()]*)+((?\))[^()]*)+)+(?(foo)(?!))$`, 0, "((a((b))c)", "Fail.") + + runRegexTrial(t, `b`, RightToLeft, "babaaa", "Pass. Group[0]=(2,1)") + + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "[n]", "Pass. Group[0]=(0,3) Group[1]=(1,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "n", "Pass. Group[0]=(0,1) Group[1]=(0,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "n[i]e", "Fail.") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "[n", "Fail.") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "]n]", "Fail.") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, `\[n\]`, "Fail.") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, `[n\]`, "Pass. Group[0]=(0,4) Group[1]=(1,2)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, `[n\[]`, "Pass. Group[0]=(0,5) Group[1]=(1,3)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, `[[n]`, "Pass. Group[0]=(0,4) Group[1]=(1,2)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "[s] . [n]", "Pass. Group[0]=(0,9) Group[1]=(1,1) Group[2]=(7,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "[s] . n", "Pass. Group[0]=(0,7) Group[1]=(1,1) Group[2]=(6,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "s.[ n ]", "Pass. Group[0]=(0,7) Group[1]=(0,1) Group[2]=(3,3)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, " . n", "Pass. Group[0]=(0,4) Group[1]=(0,1) Group[2]=(3,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "s. ", "Pass. Group[0]=(0,3) Group[1]=(0,1) Group[2]=(2,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "[.]. ", "Pass. Group[0]=(0,5) Group[1]=(1,1) Group[2]=(4,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "[c].[s].[n]", "Pass. Group[0]=(0,11) Group[1]=(1,1) Group[2]=(5,1) Group[3]=(9,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, " c . s . n ", "Pass. Group[0]=(0,11) Group[1]=(0,3) Group[2]=(5,2) Group[3]=(9,2)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, " . [.] . [ ]", "Pass. Group[0]=(0,12) Group[1]=(0,1) Group[2]=(4,1) Group[3]=(10,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "c.n", "Pass. Group[0]=(0,3) Group[1]=(0,1) Group[2]=(2,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "[c] .[n]", "Pass. Group[0]=(0,8) Group[1]=(1,1) Group[2]=(6,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "c.n.", "Fail.") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "s.c.n", "Pass. Group[0]=(0,5) Group[1]=(0,1) Group[2]=(2,1) Group[3]=(4,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "[s].[c].[n]", "Pass. Group[0]=(0,11) Group[1]=(1,1) Group[2]=(5,1) Group[3]=(9,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))\s*\.\s*((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, Compiled|IgnoreCase|ExplicitCapture, "[s].[c].", "Fail.") + runRegexTrial(t, `^((\[(?.+)\])|(?\S+))([ ]+(?ASC|DESC))?$`, IgnoreCase|ExplicitCapture, "[id]]", "Pass. Group[0]=(0,5) Group[1]=(1,3) Group[2]=") + runRegexTrial(t, `a{1,2147483647}`, 0, "a", "Pass. Group[0]=(0,1)") + runRegexTrial(t, `^((\[(?[^\]]+)\])|(?[^\.\[\]]+))$`, 0, "[a]", "Pass. Group[0]=(0,3) Group[1]=(0,3) Group[2]=(0,3) Group[3]=(1,1)") + +} + +func runRegexTrial(t *testing.T, pattern string, options RegexOptions, input, expected string) { + result := "" + + re, err := Compile(pattern, options) + if err != nil { + if expected != "Error." { + t.Errorf("Compiling pattern '%v' with options '%v' -- expected '%v' got '%v'", pattern, options, expected, err.Error()) + } + return + } + + groupNums := re.GetGroupNumbers() + m, err := re.FindStringMatch(input) + if err != nil { + result = fmt.Sprintf("Error. %v", err.Error()) + } else if m != nil { + result = "Pass." + for i, group := range m.Groups() { + gid := groupNums[i] + + result += fmt.Sprintf(" Group[%v]=", gid) + for _, cp := range group.Captures { + result += fmt.Sprintf("(%v,%v)", cp.Index, cp.Length) + } + } + } else { + result = "Fail." + } + + if expected != result { + t.Errorf("Matching input '%v' against pattern '%v' with options '%v' -- expected '%v' got '%v'", input, pattern, options, expected, result) + } +} diff --git a/vendor/github.com/dlclark/regexp2/regexp_options_test.go b/vendor/github.com/dlclark/regexp2/regexp_options_test.go new file mode 100644 index 0000000..591cdbc --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/regexp_options_test.go @@ -0,0 +1,43 @@ +package regexp2 + +import "testing" + +func TestIgnoreCase_Simple(t *testing.T) { + r := MustCompile("aaamatch thisbbb", IgnoreCase) + m, err := r.FindStringMatch("AaAMatch thisBBb") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if m == nil { + t.Fatalf("no match when one was expected") + } + if want, got := "AaAMatch thisBBb", m.String(); want != got { + t.Fatalf("group 0 wanted '%v', got '%v'", want, got) + } +} + +func TestIgnoreCase_Inline(t *testing.T) { + r := MustCompile("aaa(?i:match this)bbb", 0) + m, err := r.FindStringMatch("aaaMaTcH ThIsbbb") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if m == nil { + t.Fatalf("no match when one was expected") + } + if want, got := "aaaMaTcH ThIsbbb", m.String(); want != got { + t.Fatalf("group 0 wanted '%v', got '%v'", want, got) + } +} + +func TestIgnoreCase_Revert(t *testing.T) { + + r := MustCompile("aaa(?-i:match this)bbb", IgnoreCase) + m, err := r.FindStringMatch("AaAMatch thisBBb") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if m != nil { + t.Fatalf("had a match but expected no match") + } +} diff --git a/vendor/github.com/dlclark/regexp2/regexp_pcre_test.go b/vendor/github.com/dlclark/regexp2/regexp_pcre_test.go new file mode 100644 index 0000000..35243b4 --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/regexp_pcre_test.go @@ -0,0 +1,409 @@ +package regexp2 + +import ( + "bufio" + "bytes" + "fmt" + "log" + "os" + "regexp" + "strconv" + "strings" + "testing" + "time" +) + +// Process the file "testoutput1" from PCRE2 v10.21 (public domain) +var totalCount, failCount = 0, 0 + +func TestPcre_Basics(t *testing.T) { + defer func() { + if failCount > 0 { + t.Logf("%v of %v patterns failed", failCount, totalCount) + } + }() + // open our test patterns file and run through it + // validating results as we go + file, err := os.Open("testoutput1") + if err != nil { + log.Fatal(err) + } + defer file.Close() + + // the high level structure of the file: + // #comments - ignore only outside of the pattern + // pattern (could be multi-line, could be surrounded by "" or //) after the / there are the options some we understand, some we don't + // test case + // 0: success case + // \= Expect no match (ignored) + // another test case + // No Match + // + // another pattern ...etc + + scanner := bufio.NewScanner(file) + // main pattern loop + for scanner.Scan() { + // reading the file a line at a time + line := scanner.Text() + + if trim := strings.TrimSpace(line); trim == "" || strings.HasPrefix(trim, "#") { + // skip blanks and comments + continue + } + + patternStart := line[0] + if patternStart != '/' && patternStart != '"' { + // an error! expected a pattern but we didn't understand what was in the file + t.Fatalf("Unknown file format, expected line to start with '/' or '\"', line in: %v", line) + } + + // start building our pattern, handling multi-line patterns + pattern := line + totalCount++ + + // keep appending the lines to our pattern string until we + // find our closing tag, don't allow the first char to match on the + // line start, but subsequent lines could end on the first char + allowFirst := false + for !containsEnder(line, patternStart, allowFirst) { + if !scanner.Scan() { + // an error! expected more pattern, but got eof + t.Fatalf("Unknown file format, expected more pattern text, but got EOF, pattern so far: %v", pattern) + } + line = scanner.Text() + pattern += fmt.Sprintf("\n%s", line) + allowFirst = true + } + + // we have our raw pattern! -- we need to convert this to a compiled regex + re := compileRawPattern(t, pattern) + + var ( + capsIdx map[int]int + m *Match + toMatch string + ) + // now we need to parse the test cases if there are any + // they start with 4 spaces -- if we don't get a 4-space start then + // we're back out to our next pattern + for scanner.Scan() { + line = scanner.Text() + + // blank line is our separator for a new pattern + if strings.TrimSpace(line) == "" { + break + } + + // could be either " " or "\= Expect" + if strings.HasPrefix(line, "\\= Expect") { + continue + } else if strings.HasPrefix(line, " ") { + // trim off leading spaces for our text to match + toMatch = line[4:] + // trim off trailing spaces too + toMatch = strings.TrimRight(toMatch, " ") + + m = matchString(t, re, toMatch) + + capsIdx = make(map[int]int) + continue + //t.Fatalf("Expected match text to start with 4 spaces, instead got: '%v'", line) + } else if strings.HasPrefix(line, "No match") { + validateNoMatch(t, re, m) + // no match means we're done + continue + } else if subs := matchGroup.FindStringSubmatch(line); len(subs) == 3 { + gIdx, _ := strconv.Atoi(subs[1]) + if _, ok := capsIdx[gIdx]; !ok { + capsIdx[gIdx] = 0 + } + validateMatch(t, re, m, toMatch, subs[2], gIdx, capsIdx[gIdx]) + capsIdx[gIdx]++ + continue + } else { + // no match -- problem + t.Fatalf("Unknown file format, expected match or match group but got '%v'", line) + } + } + + } + + if err := scanner.Err(); err != nil { + log.Fatal(err) + } +} + +var matchGroup = regexp.MustCompile(`^\s*(\d+): (.*)`) + +func problem(t *testing.T, input string, args ...interface{}) { + failCount++ + t.Errorf(input, args...) +} + +func validateNoMatch(t *testing.T, re *Regexp, m *Match) { + if re == nil || m == nil { + return + } + + problem(t, "Expected no match for pattern '%v', but got '%v'", re.pattern, m.String()) +} + +func validateMatch(t *testing.T, re *Regexp, m *Match, toMatch, value string, idx, capIdx int) { + if re == nil { + // already error'd earlier up stream + return + } + + if m == nil { + // we didn't match, but should have + problem(t, "Expected match for pattern '%v' with input '%v', but got no match", re.pattern, toMatch) + return + } + + g := m.Groups() + if len(g) <= idx { + problem(t, "Expected group %v does not exist in pattern '%v' with input '%v'", idx, re.pattern, toMatch) + return + } + + if value == "" { + // this means we shouldn't have a cap for this group + if len(g[idx].Captures) > 0 { + problem(t, "Expected no cap %v in group %v in pattern '%v' with input '%v'", g[idx].Captures[capIdx].String(), idx, re.pattern, toMatch) + } + + return + } + + if len(g[idx].Captures) <= capIdx { + problem(t, "Expected cap %v does not exist in group %v in pattern '%v' with input '%v'", capIdx, idx, re.pattern, toMatch) + return + } + + escp := unEscapeGroup(g[idx].String()) + //escp := unEscapeGroup(g[idx].Captures[capIdx].String()) + if escp != value { + problem(t, "Expected '%v' but got '%v' for cap %v, group %v for pattern '%v' with input '%v'", value, escp, capIdx, idx, re.pattern, toMatch) + return + } +} + +func compileRawPattern(t *testing.T, pattern string) *Regexp { + // check our end for RegexOptions -trim them off + index := strings.LastIndexAny(pattern, "/\"") + // + // Append "= Debug" to compare details between corefx and regexp2 on the PCRE test suite + // + var opts RegexOptions + + if index+1 < len(pattern) { + textOptions := pattern[index+1:] + pattern = pattern[:index+1] + // there are lots of complex options here + for _, textOpt := range strings.Split(textOptions, ",") { + switch textOpt { + case "dupnames": + // we don't know how to handle this... + default: + if strings.Contains(textOpt, "i") { + opts |= IgnoreCase + } + if strings.Contains(textOpt, "s") { + opts |= Singleline + } + if strings.Contains(textOpt, "m") { + opts |= Multiline + } + if strings.Contains(textOpt, "x") { + opts |= IgnorePatternWhitespace + } + } + } + + } + + // trim off first and last char + pattern = pattern[1 : len(pattern)-1] + + defer func() { + if rec := recover(); rec != nil { + problem(t, "PANIC in compiling \"%v\": %v", pattern, rec) + } + }() + re, err := Compile(pattern, opts) + if err != nil { + problem(t, "Error parsing \"%v\": %v", pattern, err) + } + return re +} + +func matchString(t *testing.T, re *Regexp, toMatch string) *Match { + if re == nil { + return nil + } + + re.MatchTimeout = time.Second * 1 + + escp := "" + var err error + if toMatch != "\\" { + escp = unEscapeToMatch(toMatch) + } + m, err := re.FindStringMatch(escp) + if err != nil { + problem(t, "Error matching \"%v\" in pattern \"%v\": %v", toMatch, re.pattern, err) + } + return m +} + +func containsEnder(line string, ender byte, allowFirst bool) bool { + index := strings.LastIndexByte(line, ender) + if index > 0 { + return true + } else if index == 0 && allowFirst { + return true + } + return false +} + +func unEscapeToMatch(line string) string { + idx := strings.IndexRune(line, '\\') + // no slashes means no unescape needed + if idx == -1 { + return line + } + + buf := bytes.NewBufferString(line[:idx]) + // get the runes for the rest of the string -- we're going full parser scan on this + + inEscape := false + // take any \'s and convert them + for i := idx; i < len(line); i++ { + ch := line[i] + if ch == '\\' { + if inEscape { + buf.WriteByte(ch) + } + inEscape = !inEscape + continue + } + if inEscape { + switch ch { + case 'x': + buf.WriteByte(scanHex(line, &i)) + case 'a': + buf.WriteByte(0x07) + case 'b': + buf.WriteByte('\b') + case 'e': + buf.WriteByte(0x1b) + case 'f': + buf.WriteByte('\f') + case 'n': + buf.WriteByte('\n') + case 'r': + buf.WriteByte('\r') + case 't': + buf.WriteByte('\t') + case 'v': + buf.WriteByte(0x0b) + default: + if ch >= '0' && ch <= '7' { + buf.WriteByte(scanOctal(line, &i)) + } else { + buf.WriteByte(ch) + //panic(fmt.Sprintf("unexpected escape '%v' in %v", string(ch), line)) + } + } + inEscape = false + } else { + buf.WriteByte(ch) + } + } + + return buf.String() +} + +func unEscapeGroup(val string) string { + // use hex for chars 0x00-0x1f, 0x7f-0xff + buf := &bytes.Buffer{} + + for i := 0; i < len(val); i++ { + ch := val[i] + if ch <= 0x1f || ch >= 0x7f { + //write it as a \x00 + fmt.Fprintf(buf, "\\x%.2x", ch) + } else { + // write as-is + buf.WriteByte(ch) + } + } + + return buf.String() +} + +func scanHex(line string, idx *int) byte { + if *idx >= len(line)-2 { + panic(fmt.Sprintf("not enough hex chars in %v at %v", line, *idx)) + } + (*idx)++ + d1 := hexDigit(line[*idx]) + (*idx)++ + d2 := hexDigit(line[*idx]) + if d1 < 0 || d2 < 0 { + panic("bad hex chars") + } + + return byte(d1*0x10 + d2) +} + +// Returns n <= 0xF for a hex digit. +func hexDigit(ch byte) int { + + if d := uint(ch - '0'); d <= 9 { + return int(d) + } + + if d := uint(ch - 'a'); d <= 5 { + return int(d + 0xa) + } + + if d := uint(ch - 'A'); d <= 5 { + return int(d + 0xa) + } + + return -1 +} + +// Scans up to three octal digits (stops before exceeding 0377). +func scanOctal(line string, idx *int) byte { + // Consume octal chars only up to 3 digits and value 0377 + + // octals can be 3,2, or 1 digit + c := 3 + + if diff := len(line) - *idx; c > diff { + c = diff + } + + i := 0 + d := int(line[*idx] - '0') + for c > 0 && d <= 7 { + i *= 8 + i += d + + c-- + (*idx)++ + if *idx < len(line) { + d = int(line[*idx] - '0') + } + } + (*idx)-- + + // Octal codes only go up to 255. Any larger and the behavior that Perl follows + // is simply to truncate the high bits. + i &= 0xFF + + return byte(i) +} diff --git a/vendor/github.com/dlclark/regexp2/regexp_performance_test.go b/vendor/github.com/dlclark/regexp2/regexp_performance_test.go new file mode 100644 index 0000000..01a87d0 --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/regexp_performance_test.go @@ -0,0 +1,307 @@ +package regexp2 + +import ( + "strings" + "testing" +) + +func BenchmarkLiteral(b *testing.B) { + x := strings.Repeat("x", 50) + "y" + b.StopTimer() + re := MustCompile("y", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +func BenchmarkNotLiteral(b *testing.B) { + x := strings.Repeat("x", 50) + "y" + b.StopTimer() + re := MustCompile(".y", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +func BenchmarkMatchClass(b *testing.B) { + b.StopTimer() + x := strings.Repeat("xxxx", 20) + "w" + re := MustCompile("[abcdw]", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + + } +} + +func BenchmarkMatchClass_InRange(b *testing.B) { + b.StopTimer() + // 'b' is between 'a' and 'c', so the charclass + // range checking is no help here. + x := strings.Repeat("bbbb", 20) + "c" + re := MustCompile("[ac]", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +/* +func BenchmarkReplaceAll(b *testing.B) { + x := "abcdefghijklmnopqrstuvwxyz" + b.StopTimer() + re := MustCompile("[cjrw]", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + re.ReplaceAllString(x, "") + } +} +*/ +func BenchmarkAnchoredLiteralShortNonMatch(b *testing.B) { + b.StopTimer() + x := "abcdefghijklmnopqrstuvwxyz" + re := MustCompile("^zbc(d|e)", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); m || err != nil { + b.Fatalf("unexpected match or error! %v", err) + } + } +} + +func BenchmarkAnchoredLiteralLongNonMatch(b *testing.B) { + b.StopTimer() + + data := "abcdefghijklmnopqrstuvwxyz" + x := make([]rune, 32768*len(data)) + for i := 0; i < 32768; /*(2^15)*/ i++ { + for j := 0; j < len(data); j++ { + x[i*len(data)+j] = rune(data[j]) + } + } + + re := MustCompile("^zbc(d|e)", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchRunes(x); m || err != nil { + b.Fatalf("unexpected match or error! %v", err) + } + } +} + +func BenchmarkAnchoredShortMatch(b *testing.B) { + b.StopTimer() + x := "abcdefghijklmnopqrstuvwxyz" + re := MustCompile("^.bc(d|e)", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +func BenchmarkAnchoredLongMatch(b *testing.B) { + b.StopTimer() + data := "abcdefghijklmnopqrstuvwxyz" + x := make([]rune, 32768*len(data)) + for i := 0; i < 32768; /*(2^15)*/ i++ { + for j := 0; j < len(data); j++ { + x[i*len(data)+j] = rune(data[j]) + } + } + + re := MustCompile("^.bc(d|e)", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchRunes(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +func BenchmarkOnePassShortA(b *testing.B) { + b.StopTimer() + x := "abcddddddeeeededd" + re := MustCompile("^.bc(d|e)*$", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +func BenchmarkNotOnePassShortA(b *testing.B) { + b.StopTimer() + x := "abcddddddeeeededd" + re := MustCompile(".bc(d|e)*$", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +func BenchmarkOnePassShortB(b *testing.B) { + b.StopTimer() + x := "abcddddddeeeededd" + re := MustCompile("^.bc(?:d|e)*$", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +func BenchmarkNotOnePassShortB(b *testing.B) { + b.StopTimer() + x := "abcddddddeeeededd" + re := MustCompile(".bc(?:d|e)*$", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +func BenchmarkOnePassLongPrefix(b *testing.B) { + b.StopTimer() + x := "abcdefghijklmnopqrstuvwxyz" + re := MustCompile("^abcdefghijklmnopqrstuvwxyz.*$", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +func BenchmarkOnePassLongNotPrefix(b *testing.B) { + b.StopTimer() + x := "abcdefghijklmnopqrstuvwxyz" + re := MustCompile("^.bcdefghijklmnopqrstuvwxyz.*$", 0) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := re.MatchString(x); !m || err != nil { + b.Fatalf("no match or error! %v", err) + } + } +} + +var text []rune + +func makeText(n int) []rune { + if len(text) >= n { + return text[:n] + } + text = make([]rune, n) + x := ^uint32(0) + for i := range text { + x += x + x ^= 1 + if int32(x) < 0 { + x ^= 0x88888eef + } + if x%31 == 0 { + text[i] = '\n' + } else { + text[i] = rune(x%(0x7E+1-0x20) + 0x20) + } + } + return text +} + +func benchmark(b *testing.B, re string, n int) { + r := MustCompile(re, 0) + t := makeText(n) + b.ResetTimer() + b.SetBytes(int64(n)) + for i := 0; i < b.N; i++ { + if m, err := r.MatchRunes(t); m { + b.Fatal("match!") + } else if err != nil { + b.Fatalf("Err %v", err) + } + } +} + +const ( + easy0 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ$" + easy1 = "A[AB]B[BC]C[CD]D[DE]E[EF]F[FG]G[GH]H[HI]I[IJ]J$" + medium = "[XYZ]ABCDEFGHIJKLMNOPQRSTUVWXYZ$" + hard = "[ -~]*ABCDEFGHIJKLMNOPQRSTUVWXYZ$" + hard1 = "ABCD|CDEF|EFGH|GHIJ|IJKL|KLMN|MNOP|OPQR|QRST|STUV|UVWX|WXYZ" + parens = "([ -~])*(A)(B)(C)(D)(E)(F)(G)(H)(I)(J)(K)(L)(M)" + + "(N)(O)(P)(Q)(R)(S)(T)(U)(V)(W)(X)(Y)(Z)$" +) + +func BenchmarkMatchEasy0_32(b *testing.B) { benchmark(b, easy0, 32<<0) } +func BenchmarkMatchEasy0_1K(b *testing.B) { benchmark(b, easy0, 1<<10) } +func BenchmarkMatchEasy0_32K(b *testing.B) { benchmark(b, easy0, 32<<10) } +func BenchmarkMatchEasy0_1M(b *testing.B) { benchmark(b, easy0, 1<<20) } +func BenchmarkMatchEasy0_32M(b *testing.B) { benchmark(b, easy0, 32<<20) } +func BenchmarkMatchEasy1_32(b *testing.B) { benchmark(b, easy1, 32<<0) } +func BenchmarkMatchEasy1_1K(b *testing.B) { benchmark(b, easy1, 1<<10) } +func BenchmarkMatchEasy1_32K(b *testing.B) { benchmark(b, easy1, 32<<10) } +func BenchmarkMatchEasy1_1M(b *testing.B) { benchmark(b, easy1, 1<<20) } +func BenchmarkMatchEasy1_32M(b *testing.B) { benchmark(b, easy1, 32<<20) } +func BenchmarkMatchMedium_32(b *testing.B) { benchmark(b, medium, 32<<0) } +func BenchmarkMatchMedium_1K(b *testing.B) { benchmark(b, medium, 1<<10) } +func BenchmarkMatchMedium_32K(b *testing.B) { benchmark(b, medium, 32<<10) } +func BenchmarkMatchMedium_1M(b *testing.B) { benchmark(b, medium, 1<<20) } +func BenchmarkMatchMedium_32M(b *testing.B) { benchmark(b, medium, 32<<20) } +func BenchmarkMatchHard_32(b *testing.B) { benchmark(b, hard, 32<<0) } +func BenchmarkMatchHard_1K(b *testing.B) { benchmark(b, hard, 1<<10) } +func BenchmarkMatchHard_32K(b *testing.B) { benchmark(b, hard, 32<<10) } +func BenchmarkMatchHard_1M(b *testing.B) { benchmark(b, hard, 1<<20) } +func BenchmarkMatchHard_32M(b *testing.B) { benchmark(b, hard, 32<<20) } +func BenchmarkMatchHard1_32(b *testing.B) { benchmark(b, hard1, 32<<0) } +func BenchmarkMatchHard1_1K(b *testing.B) { benchmark(b, hard1, 1<<10) } +func BenchmarkMatchHard1_32K(b *testing.B) { benchmark(b, hard1, 32<<10) } +func BenchmarkMatchHard1_1M(b *testing.B) { benchmark(b, hard1, 1<<20) } +func BenchmarkMatchHard1_32M(b *testing.B) { benchmark(b, hard1, 32<<20) } + +// TestProgramTooLongForBacktrack tests that a regex which is too long +// for the backtracker still executes properly. +func TestProgramTooLongForBacktrack(t *testing.T) { + longRegex := MustCompile(`(one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|twentyone|twentytwo|twentythree|twentyfour|twentyfive|twentysix|twentyseven|twentyeight|twentynine|thirty|thirtyone|thirtytwo|thirtythree|thirtyfour|thirtyfive|thirtysix|thirtyseven|thirtyeight|thirtynine|forty|fortyone|fortytwo|fortythree|fortyfour|fortyfive|fortysix|fortyseven|fortyeight|fortynine|fifty|fiftyone|fiftytwo|fiftythree|fiftyfour|fiftyfive|fiftysix|fiftyseven|fiftyeight|fiftynine|sixty|sixtyone|sixtytwo|sixtythree|sixtyfour|sixtyfive|sixtysix|sixtyseven|sixtyeight|sixtynine|seventy|seventyone|seventytwo|seventythree|seventyfour|seventyfive|seventysix|seventyseven|seventyeight|seventynine|eighty|eightyone|eightytwo|eightythree|eightyfour|eightyfive|eightysix|eightyseven|eightyeight|eightynine|ninety|ninetyone|ninetytwo|ninetythree|ninetyfour|ninetyfive|ninetysix|ninetyseven|ninetyeight|ninetynine|onehundred)`, 0) + + if m, err := longRegex.MatchString("two"); !m { + t.Errorf("longRegex.MatchString(\"two\") was false, want true") + } else if err != nil { + t.Errorf("Error: %v", err) + } + if m, err := longRegex.MatchString("xxx"); m { + t.Errorf("longRegex.MatchString(\"xxx\") was true, want false") + } else if err != nil { + t.Errorf("Error: %v", err) + } +} + +func BenchmarkLeading(b *testing.B) { + b.StopTimer() + r := MustCompile("[a-q][^u-z]{13}x", 0) + inp := makeText(1000000) + b.StartTimer() + for i := 0; i < b.N; i++ { + if m, err := r.MatchRunes(inp); !m { + b.Errorf("Expected match") + } else if err != nil { + b.Errorf("Error: %v", err) + } + } +} diff --git a/vendor/github.com/dlclark/regexp2/regexp_test.go b/vendor/github.com/dlclark/regexp2/regexp_test.go new file mode 100644 index 0000000..9653755 --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/regexp_test.go @@ -0,0 +1,915 @@ +package regexp2 + +import ( + "reflect" + "strings" + "testing" + "time" + + "github.com/dlclark/regexp2/syntax" +) + +func TestBacktrack_CatastrophicTimeout(t *testing.T) { + r, err := Compile("(.+)*\\?", 0) + r.MatchTimeout = time.Millisecond * 1 + t.Logf("code dump: %v", r.code.Dump()) + m, err := r.FindStringMatch("Do you think you found the problem string!") + if err == nil { + t.Errorf("expected timeout err") + } + if m != nil { + t.Errorf("Expected no match") + } +} + +func TestSetPrefix(t *testing.T) { + r := MustCompile(`^\s*-TEST`, 0) + if r.code.FcPrefix == nil { + t.Fatalf("Expected prefix set [-\\s] but was nil") + } + if r.code.FcPrefix.PrefixSet.String() != "[-\\s]" { + t.Fatalf("Expected prefix set [\\s-] but was %v", r.code.FcPrefix.PrefixSet.String()) + } +} + +func TestSetInCode(t *testing.T) { + r := MustCompile(`(?\s*(?.+))`, 0) + t.Logf("code dump: %v", r.code.Dump()) + if want, got := 1, len(r.code.Sets); want != got { + t.Fatalf("r.code.Sets wanted %v, got %v", want, got) + } + if want, got := "[\\s]", r.code.Sets[0].String(); want != got { + t.Fatalf("first set wanted %v, got %v", want, got) + } +} + +func TestRegexp_Basic(t *testing.T) { + r, err := Compile("test(?ing)?", 0) + //t.Logf("code dump: %v", r.code.Dump()) + + if err != nil { + t.Errorf("unexpected compile err: %v", err) + } + m, err := r.FindStringMatch("this is a testing stuff") + if err != nil { + t.Errorf("unexpected match err: %v", err) + } + if m == nil { + t.Error("Nil match, expected success") + } else { + //t.Logf("Match: %v", m.dump()) + } +} + +// check all our functions and properties around basic capture groups and referential for Group 0 +func TestCapture_Basic(t *testing.T) { + r := MustCompile(`.*\B(SUCCESS)\B.*`, 0) + m, err := r.FindStringMatch("adfadsfSUCCESSadsfadsf") + if err != nil { + t.Fatalf("Unexpected match error: %v", err) + } + + if m == nil { + t.Fatalf("Should have matched") + } + if want, got := "adfadsfSUCCESSadsfadsf", m.String(); want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + if want, got := 0, m.Index; want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + if want, got := 22, m.Length; want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + if want, got := 1, len(m.Captures); want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + + if want, got := m.String(), m.Captures[0].String(); want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + if want, got := 0, m.Captures[0].Index; want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + if want, got := 22, m.Captures[0].Length; want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + + g := m.Groups() + if want, got := 2, len(g); want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + // group 0 is always the match + if want, got := m.String(), g[0].String(); want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + if want, got := 1, len(g[0].Captures); want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + // group 0's capture is always the match + if want, got := m.Captures[0].String(), g[0].Captures[0].String(); want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + + // group 1 is our first explicit group (unnamed) + if want, got := 7, g[1].Index; want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + if want, got := 7, g[1].Length; want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + if want, got := "SUCCESS", g[1].String(); want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } +} + +func TestEscapeUnescape_Basic(t *testing.T) { + s1 := "#$^*+(){}<>\\|. " + s2 := Escape(s1) + s3, err := Unescape(s2) + if err != nil { + t.Fatalf("Unexpected error during unescape: %v", err) + } + + //confirm one way + if want, got := `\#\$\^\*\+\(\)\{\}<>\\\|\.\ `, s2; want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + + //confirm round-trip + if want, got := s1, s3; want != got { + t.Fatalf("Wanted '%v'\nGot '%v'", want, got) + } + +} + +func TestGroups_Basic(t *testing.T) { + type d struct { + p string + s string + name []string + num []int + strs []string + } + data := []d{ + d{"(?\\S+)\\s(?\\S+)", // example + "Ryan Byington", + []string{"0", "first_name", "last_name"}, + []int{0, 1, 2}, + []string{"Ryan Byington", "Ryan", "Byington"}}, + d{"((?abc)\\d+)?(?xyz)(.*)", // example + "abc208923xyzanqnakl", + []string{"0", "1", "2", "One", "Two"}, + []int{0, 1, 2, 3, 4}, + []string{"abc208923xyzanqnakl", "abc208923", "anqnakl", "abc", "xyz"}}, + d{"((?<256>abc)\\d+)?(?<16>xyz)(.*)", // numeric names + "0272saasdabc8978xyz][]12_+-", + []string{"0", "1", "2", "16", "256"}, + []int{0, 1, 2, 16, 256}, + []string{"abc8978xyz][]12_+-", "abc8978", "][]12_+-", "xyz", "abc"}}, + d{"((?<4>abc)(?\\d+))?(?<2>xyz)(?.*)", // mix numeric and string names + "0272saasdabc8978xyz][]12_+-", + []string{"0", "1", "2", "digits", "4", "everything_else"}, + []int{0, 1, 2, 3, 4, 5}, + []string{"abc8978xyz][]12_+-", "abc8978", "xyz", "8978", "abc", "][]12_+-"}}, + d{"(?\\S+)\\s(?\\S+)", // dupe string names + "Ryan Byington", + []string{"0", "first_name"}, + []int{0, 1}, + []string{"Ryan Byington", "Byington"}}, + d{"(?<15>\\S+)\\s(?<15>\\S+)", // dupe numeric names + "Ryan Byington", + []string{"0", "15"}, + []int{0, 15}, + []string{"Ryan Byington", "Byington"}}, + // *** repeated from above, but with alt cap syntax *** + d{"(?'first_name'\\S+)\\s(?'last_name'\\S+)", //example + "Ryan Byington", + []string{"0", "first_name", "last_name"}, + []int{0, 1, 2}, + []string{"Ryan Byington", "Ryan", "Byington"}}, + d{"((?'One'abc)\\d+)?(?'Two'xyz)(.*)", // example + "abc208923xyzanqnakl", + []string{"0", "1", "2", "One", "Two"}, + []int{0, 1, 2, 3, 4}, + []string{"abc208923xyzanqnakl", "abc208923", "anqnakl", "abc", "xyz"}}, + d{"((?'256'abc)\\d+)?(?'16'xyz)(.*)", // numeric names + "0272saasdabc8978xyz][]12_+-", + []string{"0", "1", "2", "16", "256"}, + []int{0, 1, 2, 16, 256}, + []string{"abc8978xyz][]12_+-", "abc8978", "][]12_+-", "xyz", "abc"}}, + d{"((?'4'abc)(?'digits'\\d+))?(?'2'xyz)(?'everything_else'.*)", // mix numeric and string names + "0272saasdabc8978xyz][]12_+-", + []string{"0", "1", "2", "digits", "4", "everything_else"}, + []int{0, 1, 2, 3, 4, 5}, + []string{"abc8978xyz][]12_+-", "abc8978", "xyz", "8978", "abc", "][]12_+-"}}, + d{"(?'first_name'\\S+)\\s(?'first_name'\\S+)", // dupe string names + "Ryan Byington", + []string{"0", "first_name"}, + []int{0, 1}, + []string{"Ryan Byington", "Byington"}}, + d{"(?'15'\\S+)\\s(?'15'\\S+)", // dupe numeric names + "Ryan Byington", + []string{"0", "15"}, + []int{0, 15}, + []string{"Ryan Byington", "Byington"}}, + } + + fatalf := func(re *Regexp, v d, format string, args ...interface{}) { + args = append(args, v, re.code.Dump()) + + t.Fatalf(format+" using test data: %#v\ndump:%v", args...) + } + + validateGroupNamesNumbers := func(re *Regexp, v d) { + if len(v.name) != len(v.num) { + fatalf(re, v, "Invalid data, group name count and number count must match") + } + + groupNames := re.GetGroupNames() + if !reflect.DeepEqual(groupNames, v.name) { + fatalf(re, v, "group names expected: %v, actual: %v", v.name, groupNames) + } + groupNums := re.GetGroupNumbers() + if !reflect.DeepEqual(groupNums, v.num) { + fatalf(re, v, "group numbers expected: %v, actual: %v", v.num, groupNums) + } + // make sure we can freely get names and numbers from eachother + for i := range groupNums { + if want, got := groupNums[i], re.GroupNumberFromName(groupNames[i]); want != got { + fatalf(re, v, "group num from name Wanted '%v'\nGot '%v'", want, got) + } + if want, got := groupNames[i], re.GroupNameFromNumber(groupNums[i]); want != got { + fatalf(re, v, "group name from num Wanted '%v'\nGot '%v'", want, got) + } + } + } + + for _, v := range data { + // compile the regex + re := MustCompile(v.p, 0) + + // validate our group name/num info before execute + validateGroupNamesNumbers(re, v) + + m, err := re.FindStringMatch(v.s) + if err != nil { + fatalf(re, v, "Unexpected error in match: %v", err) + } + if m == nil { + fatalf(re, v, "Match is nil") + } + if want, got := len(v.strs), m.GroupCount(); want != got { + fatalf(re, v, "GroupCount() Wanted '%v'\nGot '%v'", want, got) + } + g := m.Groups() + if want, got := len(v.strs), len(g); want != got { + fatalf(re, v, "len(m.Groups()) Wanted '%v'\nGot '%v'", want, got) + } + // validate each group's value from the execute + for i := range v.name { + grp1 := m.GroupByName(v.name[i]) + grp2 := m.GroupByNumber(v.num[i]) + // should be identical reference + if grp1 != grp2 { + fatalf(re, v, "Expected GroupByName and GroupByNumber to return same result for %v, %v", v.name[i], v.num[i]) + } + if want, got := v.strs[i], grp1.String(); want != got { + fatalf(re, v, "Value[%v] Wanted '%v'\nGot '%v'", i, want, got) + } + } + + // validate our group name/num info after execute + validateGroupNamesNumbers(re, v) + } +} + +func TestErr_GroupName(t *testing.T) { + // group 0 is off limits + if _, err := Compile("foo(?<0>bar)", 0); err == nil { + t.Fatalf("zero group, expected error during compile") + } else if want, got := "error parsing regexp: capture number cannot be zero in `foo(?<0>bar)`", err.Error(); want != got { + t.Fatalf("invalid error text, want '%v', got '%v'", want, got) + } + if _, err := Compile("foo(?'0'bar)", 0); err == nil { + t.Fatalf("zero group, expected error during compile") + } else if want, got := "error parsing regexp: capture number cannot be zero in `foo(?'0'bar)`", err.Error(); want != got { + t.Fatalf("invalid error text, want '%v', got '%v'", want, got) + } + + // group tag can't start with a num + if _, err := Compile("foo(?<1bar>)", 0); err == nil { + t.Fatalf("invalid group name, expected error during compile") + } else if want, got := "error parsing regexp: invalid group name: group names must begin with a word character and have a matching terminator in `foo(?<1bar>)`", err.Error(); want != got { + t.Fatalf("invalid error text, want '%v', got '%v'", want, got) + } + if _, err := Compile("foo(?'1bar')", 0); err == nil { + t.Fatalf("invalid group name, expected error during compile") + } else if want, got := "error parsing regexp: invalid group name: group names must begin with a word character and have a matching terminator in `foo(?'1bar')`", err.Error(); want != got { + t.Fatalf("invalid error text, want '%v', got '%v'", want, got) + } + + // missing closing group tag + if _, err := Compile("foo(? 0 { + buf.WriteString(string(text[:prevat])) + } + + for i := len(al) - 1; i >= 0; i-- { + buf.WriteString(al[i]) + } + } + + return buf.String(), nil +} + +// Given a Match, emits into the StringBuilder the evaluated +// substitution pattern. +func replacementImpl(data *syntax.ReplacerData, buf *bytes.Buffer, m *Match) { + for _, r := range data.Rules { + + if r >= 0 { // string lookup + buf.WriteString(data.Strings[r]) + } else if r < -replaceSpecials { // group lookup + m.groupValueAppendToBuf(-replaceSpecials-1-r, buf) + } else { + switch -replaceSpecials - 1 - r { // special insertion patterns + case replaceLeftPortion: + for i := 0; i < m.Index; i++ { + buf.WriteRune(m.text[i]) + } + case replaceRightPortion: + for i := m.Index + m.Length; i < len(m.text); i++ { + buf.WriteRune(m.text[i]) + } + case replaceLastGroup: + m.groupValueAppendToBuf(m.GroupCount()-1, buf) + case replaceWholeString: + for i := 0; i < len(m.text); i++ { + buf.WriteRune(m.text[i]) + } + } + } + } +} + +func replacementImplRTL(data *syntax.ReplacerData, al *[]string, m *Match) { + l := *al + buf := &bytes.Buffer{} + + for _, r := range data.Rules { + buf.Reset() + if r >= 0 { // string lookup + l = append(l, data.Strings[r]) + } else if r < -replaceSpecials { // group lookup + m.groupValueAppendToBuf(-replaceSpecials-1-r, buf) + l = append(l, buf.String()) + } else { + switch -replaceSpecials - 1 - r { // special insertion patterns + case replaceLeftPortion: + for i := 0; i < m.Index; i++ { + buf.WriteRune(m.text[i]) + } + case replaceRightPortion: + for i := m.Index + m.Length; i < len(m.text); i++ { + buf.WriteRune(m.text[i]) + } + case replaceLastGroup: + m.groupValueAppendToBuf(m.GroupCount()-1, buf) + case replaceWholeString: + for i := 0; i < len(m.text); i++ { + buf.WriteRune(m.text[i]) + } + } + l = append(l, buf.String()) + } + } + + *al = l +} diff --git a/vendor/github.com/dlclark/regexp2/replace_test.go b/vendor/github.com/dlclark/regexp2/replace_test.go new file mode 100644 index 0000000..75117a1 --- /dev/null +++ b/vendor/github.com/dlclark/regexp2/replace_test.go @@ -0,0 +1,172 @@ +package regexp2 + +import ( + "strconv" + "testing" +) + +func TestReplace_Basic(t *testing.T) { + re := MustCompile(`test`, 0) + str, err := re.Replace("this is a test", "unit", -1, -1) + if err != nil { + t.Fatalf("Unexpected err: %v", err) + } + if want, got := "this is a unit", str; want != got { + t.Fatalf("Replace failed, wanted %v, got %v", want, got) + } +} + +func TestReplace_NamedGroup(t *testing.T) { + re := MustCompile(`[^ ]+\s(?