diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index daa96f6..dce76fe 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -12,6 +12,7 @@ jobs:
with:
fetch-depth: 0
- run: ./bin/hermit env --raw >> $GITHUB_ENV
+ - run: find ./lexers -name '*.xml' | xargs gzip -9
- run: goreleaser release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.golangci.yml b/.golangci.yml
index ba75573..a06e95e 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -36,6 +36,7 @@ linters:
- ifshort
- wrapcheck
- stylecheck
+ - thelper
linters-settings:
govet:
@@ -48,8 +49,8 @@ linters-settings:
min-len: 8
min-occurrences: 3
forbidigo:
- forbid:
- - (Must)?NewLexer
+ #forbid:
+ # - (Must)?NewLexer$
exclude_godoc_examples: false
@@ -74,3 +75,4 @@ issues:
- 'methods on the same type should have the same receiver name'
- '_TokenType_name should be _TokenTypeName'
- '`_TokenType_map` should be `_TokenTypeMap`'
+ - 'rewrite if-else to switch statement'
diff --git a/_tools/css2style/main.go b/_tools/css2style/main.go
index 6eb0e4d..2f5d84d 100644
--- a/_tools/css2style/main.go
+++ b/_tools/css2style/main.go
@@ -10,14 +10,14 @@ import (
"github.com/aymerick/douceur/parser"
"gopkg.in/alecthomas/kingpin.v3-unstable"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
const (
outputTemplate = `package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// {{.Name}} style.
diff --git a/_tools/exercise/main.go b/_tools/exercise/main.go
index 41bf8b6..b22c7f2 100644
--- a/_tools/exercise/main.go
+++ b/_tools/exercise/main.go
@@ -5,9 +5,9 @@ import (
"io/ioutil"
"os"
- "github.com/alecthomas/chroma/formatters"
- "github.com/alecthomas/chroma/lexers"
- "github.com/alecthomas/chroma/styles"
+ "github.com/alecthomas/chroma/v2/formatters"
+ "github.com/alecthomas/chroma/v2/lexers"
+ "github.com/alecthomas/chroma/v2/styles"
"gopkg.in/alecthomas/kingpin.v3-unstable"
)
diff --git a/_tools/pygments2chroma.py b/_tools/pygments2chroma.py
index 006ea31..11fc420 100644
--- a/_tools/pygments2chroma.py
+++ b/_tools/pygments2chroma.py
@@ -15,8 +15,8 @@ TEMPLATE = r'''
package {{package}}
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
+ "github.com/alecthomas/chroma/v2/lexers/internal"
)
// {{upper_name}} lexer.
diff --git a/_tools/style.py b/_tools/style.py
index 84ff6bf..0500a1d 100644
--- a/_tools/style.py
+++ b/_tools/style.py
@@ -10,7 +10,7 @@ TEMPLATE = r'''
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// {{upper_name}} style.
diff --git a/bin/.hyperfine-1.12.0.pkg b/bin/.hyperfine-1.12.0.pkg
new file mode 120000
index 0000000..383f451
--- /dev/null
+++ b/bin/.hyperfine-1.12.0.pkg
@@ -0,0 +1 @@
+hermit
\ No newline at end of file
diff --git a/bin/hyperfine b/bin/hyperfine
new file mode 120000
index 0000000..0dfeb80
--- /dev/null
+++ b/bin/hyperfine
@@ -0,0 +1 @@
+.hyperfine-1.12.0.pkg
\ No newline at end of file
diff --git a/cmd/chroma/go.mod b/cmd/chroma/go.mod
index de42222..99ac323 100644
--- a/cmd/chroma/go.mod
+++ b/cmd/chroma/go.mod
@@ -1,12 +1,12 @@
-module github.com/alecthomas/chroma/cmd/chroma
+module github.com/alecthomas/chroma/v2/cmd/chroma
-go 1.16
+go 1.17
-replace github.com/alecthomas/chroma => ../../
+replace github.com/alecthomas/chroma/v2 => ../../
require (
- github.com/alecthomas/chroma v0.0.0-00010101000000-000000000000
+ github.com/alecthomas/chroma/v2 v2.0.0-00010101000000-000000000000
github.com/alecthomas/kong v0.2.17
- github.com/mattn/go-colorable v0.1.10
+ github.com/mattn/go-colorable v0.1.12
github.com/mattn/go-isatty v0.0.14
)
diff --git a/cmd/chroma/go.sum b/cmd/chroma/go.sum
index 2e0ed02..19cd2e6 100644
--- a/cmd/chroma/go.sum
+++ b/cmd/chroma/go.sum
@@ -1,15 +1,14 @@
github.com/alecthomas/kong v0.2.17 h1:URDISCI96MIgcIlQyoCAlhOmrSw6pZScBNkctg8r0W0=
github.com/alecthomas/kong v0.2.17/go.mod h1:ka3VZ8GZNPXv9Ov+j4YNLkI8mTuhXyr/0ktSlqIydQQ=
-github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ=
-github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk=
+github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae h1:zzGwJfFlFGD94CyyYwCJeSuD32Gj9GTaSi5y9hoVzdY=
+github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
-github.com/mattn/go-colorable v0.1.10 h1:KWqbp83oZ6YOEgIbNW3BM1Jbe2tz4jgmWA9FOuAF8bw=
-github.com/mattn/go-colorable v0.1.10/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
+github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
+github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -19,10 +18,9 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 h1:foEbQz/B0Oz6YIqu/69kfXPYeFQAuuMYFkjaqXzl5Wo=
+golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
diff --git a/cmd/chroma/list.before b/cmd/chroma/list.before
new file mode 100644
index 0000000..56f12d5
--- /dev/null
+++ b/cmd/chroma/list.before
@@ -0,0 +1,810 @@
+lexers:
+ ABAP
+ aliases: abap
+ filenames: *.abap *.ABAP
+ mimetypes: text/x-abap
+ ABNF
+ aliases: abnf
+ filenames: *.abnf
+ mimetypes: text/x-abnf
+ ActionScript
+ aliases: as actionscript
+ filenames: *.as
+ mimetypes: application/x-actionscript text/x-actionscript text/actionscript
+ ActionScript 3
+ aliases: as3 actionscript3
+ filenames: *.as
+ mimetypes: application/x-actionscript3 text/x-actionscript3 text/actionscript3
+ Ada
+ aliases: ada ada95 ada2005
+ filenames: *.adb *.ads *.ada
+ mimetypes: text/x-ada
+ AL
+ aliases: al
+ filenames: *.al *.dal
+ mimetypes: text/x-al
+ Angular2
+ aliases: ng2
+ ANTLR
+ aliases: antlr
+ ApacheConf
+ aliases: apacheconf aconf apache
+ filenames: .htaccess apache.conf apache2.conf
+ mimetypes: text/x-apacheconf
+ APL
+ aliases: apl
+ filenames: *.apl
+ AppleScript
+ aliases: applescript
+ filenames: *.applescript
+ Arduino
+ aliases: arduino
+ filenames: *.ino
+ mimetypes: text/x-arduino
+ ArmAsm
+ aliases: armasm
+ filenames: *.s *.S
+ mimetypes: text/x-armasm text/x-asm
+ Awk
+ aliases: awk gawk mawk nawk
+ filenames: *.awk
+ mimetypes: application/x-awk
+ Ballerina
+ aliases: ballerina
+ filenames: *.bal
+ mimetypes: text/x-ballerina
+ Base Makefile
+ aliases: make makefile mf bsdmake
+ filenames: *.mak *.mk Makefile makefile Makefile.* GNUmakefile
+ mimetypes: text/x-makefile
+ Bash
+ aliases: bash sh ksh zsh shell
+ filenames: *.sh *.ksh *.bash *.ebuild *.eclass .env *.env *.exheres-0 *.exlib *.zsh *.zshrc .bashrc bashrc .bash_* bash_* zshrc .zshrc PKGBUILD
+ mimetypes: application/x-sh application/x-shellscript
+ BashSession
+ aliases: bash-session console shell-session
+ filenames: .sh-session
+ mimetypes: text/x-sh
+ Batchfile
+ aliases: bat batch dosbatch winbatch
+ filenames: *.bat *.cmd
+ mimetypes: application/x-dos-batch
+ BibTeX
+ aliases: bib bibtex
+ filenames: *.bib
+ mimetypes: text/x-bibtex
+ Bicep
+ aliases: bicep
+ filenames: *.bicep
+ BlitzBasic
+ aliases: blitzbasic b3d bplus
+ filenames: *.bb *.decls
+ mimetypes: text/x-bb
+ BNF
+ aliases: bnf
+ filenames: *.bnf
+ mimetypes: text/x-bnf
+ Brainfuck
+ aliases: brainfuck bf
+ filenames: *.bf *.b
+ mimetypes: application/x-brainfuck
+ C
+ aliases: c
+ filenames: *.c *.h *.idc *.x[bp]m
+ mimetypes: text/x-chdr text/x-csrc image/x-xbitmap image/x-xpixmap
+ C#
+ aliases: csharp c#
+ filenames: *.cs
+ mimetypes: text/x-csharp
+ C++
+ aliases: cpp c++
+ filenames: *.cpp *.hpp *.c++ *.h++ *.cc *.hh *.cxx *.hxx *.C *.H *.cp *.CPP
+ mimetypes: text/x-c++hdr text/x-c++src
+ Caddyfile
+ aliases: caddyfile caddy
+ filenames: Caddyfile*
+ Caddyfile Directives
+ aliases: caddyfile-directives caddyfile-d caddy-d
+ Cap'n Proto
+ aliases: capnp
+ filenames: *.capnp
+ Cassandra CQL
+ aliases: cassandra cql
+ filenames: *.cql
+ mimetypes: text/x-cql
+ Ceylon
+ aliases: ceylon
+ filenames: *.ceylon
+ mimetypes: text/x-ceylon
+ CFEngine3
+ aliases: cfengine3 cf3
+ filenames: *.cf
+ cfstatement
+ aliases: cfs
+ ChaiScript
+ aliases: chai chaiscript
+ filenames: *.chai
+ mimetypes: text/x-chaiscript application/x-chaiscript
+ Cheetah
+ aliases: cheetah spitfire
+ filenames: *.tmpl *.spt
+ mimetypes: application/x-cheetah application/x-spitfire
+ Clojure
+ aliases: clojure clj
+ filenames: *.clj
+ mimetypes: text/x-clojure application/x-clojure
+ CMake
+ aliases: cmake
+ filenames: *.cmake CMakeLists.txt
+ mimetypes: text/x-cmake
+ COBOL
+ aliases: cobol
+ filenames: *.cob *.COB *.cpy *.CPY
+ mimetypes: text/x-cobol
+ CoffeeScript
+ aliases: coffee-script coffeescript coffee
+ filenames: *.coffee
+ mimetypes: text/coffeescript
+ Common Lisp
+ aliases: common-lisp cl lisp
+ filenames: *.cl *.lisp
+ mimetypes: text/x-common-lisp
+ Common Lisp
+ aliases: common-lisp cl lisp
+ filenames: *.cl *.lisp
+ mimetypes: text/x-common-lisp
+ Coq
+ aliases: coq
+ filenames: *.v
+ mimetypes: text/x-coq
+ Crystal
+ aliases: cr crystal
+ filenames: *.cr
+ mimetypes: text/x-crystal
+ CSS
+ aliases: css
+ filenames: *.css
+ mimetypes: text/css
+ Cython
+ aliases: cython pyx pyrex
+ filenames: *.pyx *.pxd *.pxi
+ mimetypes: text/x-cython application/x-cython
+ D
+ aliases: d
+ filenames: *.d *.di
+ mimetypes: text/x-d
+ Dart
+ aliases: dart
+ filenames: *.dart
+ mimetypes: text/x-dart
+ Diff
+ aliases: diff udiff
+ filenames: *.diff *.patch
+ mimetypes: text/x-diff text/x-patch
+ Django/Jinja
+ aliases: django jinja
+ mimetypes: application/x-django-templating application/x-jinja
+ Docker
+ aliases: docker dockerfile
+ filenames: Dockerfile *.docker
+ mimetypes: text/x-dockerfile-config
+ DTD
+ aliases: dtd
+ filenames: *.dtd
+ mimetypes: application/xml-dtd
+ Dylan
+ aliases: dylan
+ filenames: *.dylan *.dyl *.intr
+ mimetypes: text/x-dylan
+ EBNF
+ aliases: ebnf
+ filenames: *.ebnf
+ mimetypes: text/x-ebnf
+ Elixir
+ aliases: elixir ex exs
+ filenames: *.ex *.exs
+ mimetypes: text/x-elixir
+ Elm
+ aliases: elm
+ filenames: *.elm
+ mimetypes: text/x-elm
+ EmacsLisp
+ aliases: emacs elisp emacs-lisp
+ filenames: *.el
+ mimetypes: text/x-elisp application/x-elisp
+ EmacsLisp
+ aliases: emacs elisp emacs-lisp
+ filenames: *.el
+ mimetypes: text/x-elisp application/x-elisp
+ Erlang
+ aliases: erlang
+ filenames: *.erl *.hrl *.es *.escript
+ mimetypes: text/x-erlang
+ Factor
+ aliases: factor
+ filenames: *.factor
+ mimetypes: text/x-factor
+ Fennel
+ aliases: fennel fnl
+ filenames: *.fennel
+ mimetypes: text/x-fennel application/x-fennel
+ Fish
+ aliases: fish fishshell
+ filenames: *.fish *.load
+ mimetypes: application/x-fish
+ Forth
+ aliases: forth
+ filenames: *.frt *.fth *.fs
+ mimetypes: application/x-forth
+ Fortran
+ aliases: fortran
+ filenames: *.f03 *.f90 *.F03 *.F90
+ mimetypes: text/x-fortran
+ FortranFixed
+ aliases: fortranfixed
+ filenames: *.f *.F
+ mimetypes: text/x-fortran
+ FSharp
+ aliases: fsharp
+ filenames: *.fs *.fsi
+ mimetypes: text/x-fsharp
+ GAS
+ aliases: gas asm
+ filenames: *.s *.S
+ mimetypes: text/x-gas
+ GDScript
+ aliases: gdscript gd
+ filenames: *.gd
+ mimetypes: text/x-gdscript application/x-gdscript
+ Genshi
+ aliases: genshi kid xml+genshi xml+kid
+ filenames: *.kid
+ mimetypes: application/x-genshi application/x-kid
+ Genshi HTML
+ aliases: html+genshi html+kid
+ mimetypes: text/html+genshi
+ Genshi Text
+ aliases: genshitext
+ mimetypes: application/x-genshi-text text/x-genshi
+ Gherkin
+ aliases: cucumber Cucumber gherkin Gherkin
+ filenames: *.feature *.FEATURE
+ mimetypes: text/x-gherkin
+ GLSL
+ aliases: glsl
+ filenames: *.vert *.frag *.geo
+ mimetypes: text/x-glslsrc
+ Gnuplot
+ aliases: gnuplot
+ filenames: *.plot *.plt
+ mimetypes: text/x-gnuplot
+ Go
+ aliases: go golang
+ filenames: *.go
+ mimetypes: text/x-gosrc
+ Go HTML Template
+ aliases: go-html-template
+ Go HTML Template
+ aliases: go-html-template
+ Go Text Template
+ aliases: go-text-template
+ GraphQL
+ aliases: graphql graphqls gql
+ filenames: *.graphql *.graphqls
+ Groff
+ aliases: groff nroff man
+ filenames: *.[1-9] *.1p *.3pm *.man
+ mimetypes: application/x-troff text/troff
+ Groovy
+ aliases: groovy
+ filenames: *.groovy *.gradle
+ mimetypes: text/x-groovy
+ Handlebars
+ aliases: handlebars hbs
+ filenames: *.handlebars *.hbs
+ Haskell
+ aliases: haskell hs
+ filenames: *.hs
+ mimetypes: text/x-haskell
+ Haxe
+ aliases: hx haxe hxsl
+ filenames: *.hx *.hxsl
+ mimetypes: text/haxe text/x-haxe text/x-hx
+ HCL
+ aliases: hcl
+ filenames: *.hcl
+ mimetypes: application/x-hcl
+ Hexdump
+ aliases: hexdump
+ HLB
+ aliases: hlb
+ filenames: *.hlb
+ HTML
+ aliases: html
+ filenames: *.html *.htm *.xhtml *.xslt
+ mimetypes: text/html application/xhtml+xml
+ HTTP
+ aliases: http
+ Hy
+ aliases: hylang
+ filenames: *.hy
+ mimetypes: text/x-hy application/x-hy
+ Idris
+ aliases: idris idr
+ filenames: *.idr
+ mimetypes: text/x-idris
+ Igor
+ aliases: igor igorpro
+ filenames: *.ipf
+ mimetypes: text/ipf
+ INI
+ aliases: ini cfg dosini
+ filenames: *.ini *.cfg *.inf .gitconfig .editorconfig
+ mimetypes: text/x-ini text/inf
+ Io
+ aliases: io
+ filenames: *.io
+ mimetypes: text/x-iosrc
+ J
+ aliases: j
+ filenames: *.ijs
+ mimetypes: text/x-j
+ Java
+ aliases: java
+ filenames: *.java
+ mimetypes: text/x-java
+ JavaScript
+ aliases: js javascript
+ filenames: *.js *.jsm *.mjs
+ mimetypes: application/javascript application/x-javascript text/x-javascript text/javascript
+ JSON
+ aliases: json
+ filenames: *.json
+ mimetypes: application/json
+ Julia
+ aliases: julia jl
+ filenames: *.jl
+ mimetypes: text/x-julia application/x-julia
+ Jungle
+ aliases: jungle
+ filenames: *.jungle
+ mimetypes: text/x-jungle
+ Kotlin
+ aliases: kotlin
+ filenames: *.kt
+ mimetypes: text/x-kotlin
+ Lighttpd configuration file
+ aliases: lighty lighttpd
+ mimetypes: text/x-lighttpd-conf
+ LLVM
+ aliases: llvm
+ filenames: *.ll
+ mimetypes: text/x-llvm
+ Lua
+ aliases: lua
+ filenames: *.lua *.wlua
+ mimetypes: text/x-lua application/x-lua
+ Mako
+ aliases: mako
+ filenames: *.mao
+ mimetypes: application/x-mako
+ markdown
+ aliases: md mkd
+ filenames: *.md *.mkd *.markdown
+ mimetypes: text/x-markdown
+ Mason
+ aliases: mason
+ filenames: *.m *.mhtml *.mc *.mi autohandler dhandler
+ mimetypes: application/x-mason
+ Mathematica
+ aliases: mathematica mma nb
+ filenames: *.nb *.cdf *.nbp *.ma
+ mimetypes: application/mathematica application/vnd.wolfram.mathematica application/vnd.wolfram.mathematica.package application/vnd.wolfram.cdf
+ Matlab
+ aliases: matlab
+ filenames: *.m
+ mimetypes: text/matlab
+ mcfunction
+ aliases: mcfunction
+ filenames: *.mcfunction
+ Meson
+ aliases: meson meson.build
+ filenames: meson.build meson_options.txt
+ mimetypes: text/x-meson
+ Metal
+ aliases: metal
+ filenames: *.metal
+ mimetypes: text/x-metal
+ MiniZinc
+ aliases: minizinc MZN mzn
+ filenames: *.mzn *.dzn *.fzn
+ mimetypes: text/minizinc
+ MLIR
+ aliases: mlir
+ filenames: *.mlir
+ mimetypes: text/x-mlir
+ Modula-2
+ aliases: modula2 m2
+ filenames: *.def *.mod
+ mimetypes: text/x-modula2
+ MonkeyC
+ aliases: monkeyc
+ filenames: *.mc
+ mimetypes: text/x-monkeyc
+ MorrowindScript
+ aliases: morrowind mwscript
+ Myghty
+ aliases: myghty
+ filenames: *.myt autodelegate
+ mimetypes: application/x-myghty
+ MySQL
+ aliases: mysql mariadb
+ filenames: *.sql
+ mimetypes: text/x-mysql text/x-mariadb
+ NASM
+ aliases: nasm
+ filenames: *.asm *.ASM
+ mimetypes: text/x-nasm
+ Newspeak
+ aliases: newspeak
+ filenames: *.ns2
+ mimetypes: text/x-newspeak
+ Nginx configuration file
+ aliases: nginx
+ filenames: nginx.conf
+ mimetypes: text/x-nginx-conf
+ Nim
+ aliases: nim nimrod
+ filenames: *.nim *.nimrod
+ mimetypes: text/x-nim
+ Nix
+ aliases: nixos nix
+ filenames: *.nix
+ mimetypes: text/x-nix
+ Objective-C
+ aliases: objective-c objectivec obj-c objc
+ filenames: *.m *.h
+ mimetypes: text/x-objective-c
+ OCaml
+ aliases: ocaml
+ filenames: *.ml *.mli *.mll *.mly
+ mimetypes: text/x-ocaml
+ Octave
+ aliases: octave
+ filenames: *.m
+ mimetypes: text/octave
+ OnesEnterprise
+ aliases: ones onesenterprise 1S 1S:Enterprise
+ filenames: *.EPF *.epf *.ERF *.erf
+ mimetypes: application/octet-stream
+ OpenEdge ABL
+ aliases: openedge abl progress openedgeabl
+ filenames: *.p *.cls *.w *.i
+ mimetypes: text/x-openedge application/x-openedge
+ OpenSCAD
+ aliases: openscad
+ filenames: *.scad
+ mimetypes: text/x-scad
+ Org Mode
+ aliases: org orgmode
+ filenames: *.org
+ mimetypes: text/org
+ PacmanConf
+ aliases: pacmanconf
+ filenames: pacman.conf
+ Perl
+ aliases: perl pl
+ filenames: *.pl *.pm *.t
+ mimetypes: text/x-perl application/x-perl
+ PHP
+ aliases: php php3 php4 php5
+ filenames: *.php *.php[345] *.inc
+ mimetypes: text/x-php
+ PHTML
+ aliases: phtml
+ filenames: *.phtml *.php *.php[345] *.inc
+ mimetypes: application/x-php application/x-httpd-php application/x-httpd-php3 application/x-httpd-php4 application/x-httpd-php5 text/x-php
+ Pig
+ aliases: pig
+ filenames: *.pig
+ mimetypes: text/x-pig
+ PkgConfig
+ aliases: pkgconfig
+ filenames: *.pc
+ PL/pgSQL
+ aliases: plpgsql
+ mimetypes: text/x-plpgsql
+ plaintext
+ aliases: text plain no-highlight
+ filenames: *.txt
+ mimetypes: text/plain
+ Plutus Core
+ aliases: plutus-core plc
+ filenames: *.plc
+ mimetypes: text/x-plutus-core application/x-plutus-core
+ Pony
+ aliases: pony
+ filenames: *.pony
+ PostgreSQL SQL dialect
+ aliases: postgresql postgres
+ mimetypes: text/x-postgresql
+ PostScript
+ aliases: postscript postscr
+ filenames: *.ps *.eps
+ mimetypes: application/postscript
+ POVRay
+ aliases: pov
+ filenames: *.pov *.inc
+ mimetypes: text/x-povray
+ PowerQuery
+ aliases: powerquery pq
+ filenames: *.pq
+ mimetypes: text/x-powerquery
+ PowerShell
+ aliases: powershell posh ps1 psm1 psd1
+ filenames: *.ps1 *.psm1 *.psd1
+ mimetypes: text/x-powershell
+ Prolog
+ aliases: prolog
+ filenames: *.ecl *.prolog *.pro *.pl
+ mimetypes: text/x-prolog
+ PromQL
+ aliases: promql
+ filenames: *.promql
+ Protocol Buffer
+ aliases: protobuf proto
+ filenames: *.proto
+ Puppet
+ aliases: puppet
+ filenames: *.pp
+ Python
+ aliases: python py sage python3 py3
+ filenames: *.py *.pyi *.pyw *.jy *.sage *.sc SConstruct SConscript *.bzl BUCK BUILD BUILD.bazel WORKSPACE *.tac
+ mimetypes: text/x-python application/x-python text/x-python3 application/x-python3
+ Python 2
+ aliases: python2 py2
+ mimetypes: text/x-python2 application/x-python2
+ QBasic
+ aliases: qbasic basic
+ filenames: *.BAS *.bas
+ mimetypes: text/basic
+ QML
+ aliases: qml qbs
+ filenames: *.qml *.qbs
+ mimetypes: application/x-qml application/x-qt.qbs+qml
+ R
+ aliases: splus s r
+ filenames: *.S *.R *.r .Rhistory .Rprofile .Renviron
+ mimetypes: text/S-plus text/S text/x-r-source text/x-r text/x-R text/x-r-history text/x-r-profile
+ Racket
+ aliases: racket rkt
+ filenames: *.rkt *.rktd *.rktl
+ mimetypes: text/x-racket application/x-racket
+ Ragel
+ aliases: ragel
+ Raku
+ aliases: perl6 pl6 raku
+ filenames: *.pl *.pm *.nqp *.p6 *.6pl *.p6l *.pl6 *.6pm *.p6m *.pm6 *.t *.raku *.rakumod *.rakutest *.rakudoc
+ mimetypes: text/x-perl6 application/x-perl6 text/x-raku application/x-raku
+ react
+ aliases: jsx react
+ filenames: *.jsx *.react
+ mimetypes: text/jsx text/typescript-jsx
+ ReasonML
+ aliases: reason reasonml
+ filenames: *.re *.rei
+ mimetypes: text/x-reasonml
+ reg
+ aliases: registry
+ filenames: *.reg
+ mimetypes: text/x-windows-registry
+ reStructuredText
+ aliases: rst rest restructuredtext
+ filenames: *.rst *.rest
+ mimetypes: text/x-rst text/prs.fallenstein.rst
+ Rexx
+ aliases: rexx arexx
+ filenames: *.rexx *.rex *.rx *.arexx
+ mimetypes: text/x-rexx
+ Ruby
+ aliases: rb ruby duby
+ filenames: *.rb *.rbw Rakefile *.rake *.gemspec *.rbx *.duby Gemfile
+ mimetypes: text/x-ruby application/x-ruby
+ Rust
+ aliases: rust rs
+ filenames: *.rs *.rs.in
+ mimetypes: text/rust text/x-rust
+ SAS
+ aliases: sas
+ filenames: *.SAS *.sas
+ mimetypes: text/x-sas text/sas application/x-sas
+ Sass
+ aliases: sass
+ filenames: *.sass
+ mimetypes: text/x-sass
+ Scala
+ aliases: scala
+ filenames: *.scala
+ mimetypes: text/x-scala
+ Scheme
+ aliases: scheme scm
+ filenames: *.scm *.ss
+ mimetypes: text/x-scheme application/x-scheme
+ Scilab
+ aliases: scilab
+ filenames: *.sci *.sce *.tst
+ mimetypes: text/scilab
+ SCSS
+ aliases: scss
+ filenames: *.scss
+ mimetypes: text/x-scss
+ Sieve
+ aliases: sieve
+ filenames: *.siv *.sieve
+ Smalltalk
+ aliases: smalltalk squeak st
+ filenames: *.st
+ mimetypes: text/x-smalltalk
+ Smarty
+ aliases: smarty
+ filenames: *.tpl
+ mimetypes: application/x-smarty
+ Snobol
+ aliases: snobol
+ filenames: *.snobol
+ mimetypes: text/x-snobol
+ Solidity
+ aliases: sol solidity
+ filenames: *.sol
+ SPARQL
+ aliases: sparql
+ filenames: *.rq *.sparql
+ mimetypes: application/sparql-query
+ SQL
+ aliases: sql
+ filenames: *.sql
+ mimetypes: text/x-sql
+ SquidConf
+ aliases: squidconf squid.conf squid
+ filenames: squid.conf
+ mimetypes: text/x-squidconf
+ Standard ML
+ aliases: sml
+ filenames: *.sml *.sig *.fun
+ mimetypes: text/x-standardml application/x-standardml
+ Stylus
+ aliases: stylus
+ filenames: *.styl
+ mimetypes: text/x-styl
+ Svelte
+ aliases: svelte
+ filenames: *.svelte
+ mimetypes: application/x-svelte
+ Swift
+ aliases: swift
+ filenames: *.swift
+ mimetypes: text/x-swift
+ SYSTEMD
+ aliases: systemd
+ filenames: *.automount *.device *.dnssd *.link *.mount *.netdev *.network *.path *.scope *.service *.slice *.socket *.swap *.target *.timer
+ mimetypes: text/plain
+ systemverilog
+ aliases: systemverilog sv
+ filenames: *.sv *.svh
+ mimetypes: text/x-systemverilog
+ TableGen
+ aliases: tablegen
+ filenames: *.td
+ mimetypes: text/x-tablegen
+ TASM
+ aliases: tasm
+ filenames: *.asm *.ASM *.tasm
+ mimetypes: text/x-tasm
+ Tcl
+ aliases: tcl
+ filenames: *.tcl *.rvt
+ mimetypes: text/x-tcl text/x-script.tcl application/x-tcl
+ Tcsh
+ aliases: tcsh csh
+ filenames: *.tcsh *.csh
+ mimetypes: application/x-csh
+ Termcap
+ aliases: termcap
+ filenames: termcap termcap.src
+ Terminfo
+ aliases: terminfo
+ filenames: terminfo terminfo.src
+ Terraform
+ aliases: terraform tf
+ filenames: *.tf
+ mimetypes: application/x-tf application/x-terraform
+ TeX
+ aliases: tex latex
+ filenames: *.tex *.aux *.toc
+ mimetypes: text/x-tex text/x-latex
+ Thrift
+ aliases: thrift
+ filenames: *.thrift
+ mimetypes: application/x-thrift
+ TOML
+ aliases: toml
+ filenames: *.toml
+ mimetypes: text/x-toml
+ TradingView
+ aliases: tradingview tv
+ filenames: *.tv
+ mimetypes: text/x-tradingview
+ Transact-SQL
+ aliases: tsql t-sql
+ mimetypes: text/x-tsql
+ Turing
+ aliases: turing
+ filenames: *.turing *.tu
+ mimetypes: text/x-turing
+ Turtle
+ aliases: turtle
+ filenames: *.ttl
+ mimetypes: text/turtle application/x-turtle
+ Twig
+ aliases: twig
+ mimetypes: application/x-twig
+ TypeScript
+ aliases: ts tsx typescript
+ filenames: *.ts *.tsx
+ mimetypes: text/x-typescript
+ TypoScript
+ aliases: typoscript
+ filenames: *.ts
+ mimetypes: text/x-typoscript
+ TypoScriptCssData
+ aliases: typoscriptcssdata
+ TypoScriptHtmlData
+ aliases: typoscripthtmldata
+ VB.net
+ aliases: vb.net vbnet
+ filenames: *.vb *.bas
+ mimetypes: text/x-vbnet text/x-vba
+ verilog
+ aliases: verilog v
+ filenames: *.v
+ mimetypes: text/x-verilog
+ VHDL
+ aliases: vhdl
+ filenames: *.vhdl *.vhd
+ mimetypes: text/x-vhdl
+ VimL
+ aliases: vim
+ filenames: *.vim .vimrc .exrc .gvimrc _vimrc _exrc _gvimrc vimrc gvimrc
+ mimetypes: text/x-vim
+ vue
+ aliases: vue vuejs
+ filenames: *.vue
+ mimetypes: text/x-vue application/x-vue
+ WDTE
+ filenames: *.wdte
+ XML
+ aliases: xml
+ filenames: *.xml *.xsl *.rss *.xslt *.xsd *.wsdl *.wsf *.svg *.csproj *.vcxproj *.fsproj
+ mimetypes: text/xml application/xml image/svg+xml application/rss+xml application/atom+xml
+ Xorg
+ aliases: xorg.conf
+ filenames: xorg.conf
+ YAML
+ aliases: yaml
+ filenames: *.yaml *.yml
+ mimetypes: text/x-yaml
+ YANG
+ aliases: yang
+ filenames: *.yang
+ mimetypes: application/yang
+ Zed
+ aliases: zed
+ filenames: *.zed
+ mimetypes: text/zed
+ Zig
+ aliases: zig
+ filenames: *.zig
+ mimetypes: text/zig
+
+styles: abap algol algol_nu arduino autumn base16-snazzy borland bw colorful doom-one doom-one2 dracula emacs friendly fruity github hr_high_contrast hrdark igor lovelace manni monokai monokailight murphy native nord onesenterprise paraiso-dark paraiso-light pastie perldoc pygments rainbow_dash rrt solarized-dark solarized-dark256 solarized-light swapoff tango trac vim vs vulcan witchhazel xcode xcode-dark
+formatters: html json noop svg terminal terminal16 terminal16m terminal256 terminal8 tokens
diff --git a/cmd/chroma/main.go b/cmd/chroma/main.go
index 3165b90..d6be444 100644
--- a/cmd/chroma/main.go
+++ b/cmd/chroma/main.go
@@ -9,6 +9,8 @@ import (
"os"
"os/signal"
"path"
+ "path/filepath"
+ "regexp"
"runtime"
"runtime/pprof"
"sort"
@@ -16,14 +18,14 @@ import (
"strings"
"github.com/alecthomas/kong"
- "github.com/mattn/go-colorable"
- "github.com/mattn/go-isatty"
+ colorable "github.com/mattn/go-colorable"
+ isatty "github.com/mattn/go-isatty"
- "github.com/alecthomas/chroma"
- "github.com/alecthomas/chroma/formatters"
- "github.com/alecthomas/chroma/formatters/html"
- "github.com/alecthomas/chroma/lexers"
- "github.com/alecthomas/chroma/styles"
+ "github.com/alecthomas/chroma/v2"
+ "github.com/alecthomas/chroma/v2/formatters"
+ "github.com/alecthomas/chroma/v2/formatters/html"
+ "github.com/alecthomas/chroma/v2/lexers"
+ "github.com/alecthomas/chroma/v2/styles"
)
var (
@@ -53,6 +55,8 @@ command, for Go.
JSON bool `help:"Output JSON representation of tokens."`
+ XML string `help:"Generate XML lexer definitions." type:"existingdir" placeholder:"DIR"`
+
HTML bool `help:"Enable HTML mode (equivalent to '--formatter html')."`
HTMLPrefix string `help:"HTML CSS class prefix." placeholder:"PREFIX"`
HTMLStyles bool `help:"Output HTML CSS styles."`
@@ -138,6 +142,11 @@ func main() {
"styles": strings.Join(styles.Names(), ","),
"formatters": strings.Join(formatters.Names(), ","),
})
+ if cli.XML != "" {
+ err := dumpXMLLexerDefinitions(cli.XML)
+ ctx.FatalIfErrorf(err)
+ return
+ }
if cli.List {
listAll()
return
@@ -279,8 +288,8 @@ func configureHTMLFormatter(ctx *kong.Context) {
func listAll() {
fmt.Println("lexers:")
- sort.Sort(lexers.Registry.Lexers)
- for _, l := range lexers.Registry.Lexers {
+ sort.Sort(lexers.GlobalLexerRegistry.Lexers)
+ for _, l := range lexers.GlobalLexerRegistry.Lexers {
config := l.Config()
fmt.Printf(" %s\n", config.Name)
filenames := []string{}
@@ -352,3 +361,33 @@ func check(filename string, it chroma.Iterator) {
}
}
}
+
+var nameCleanRe = regexp.MustCompile(`[^A-Za-z0-9_#+-]`)
+
+func dumpXMLLexerDefinitions(dir string) error {
+ for _, name := range lexers.Names(false) {
+ lex := lexers.Get(name)
+ if rlex, ok := lex.(*chroma.RegexLexer); ok {
+ data, err := chroma.Marshal(rlex)
+ if err != nil {
+ if errors.Is(err, chroma.ErrNotSerialisable) {
+ fmt.Fprintf(os.Stderr, "warning: %q: %s\n", name, err)
+ continue
+ }
+ return err
+ }
+ name := strings.ToLower(nameCleanRe.ReplaceAllString(lex.Config().Name, "_"))
+ filename := filepath.Join(dir, name) + ".xml"
+ // fmt.Println(name)
+ _, err = os.Stat(filename)
+ if err == nil {
+ return fmt.Errorf("%s already exists", filename)
+ }
+ err = ioutil.WriteFile(filename, data, 0600)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
diff --git a/cmd/chromad/go.mod b/cmd/chromad/go.mod
index 55495b0..02d14bf 100644
--- a/cmd/chromad/go.mod
+++ b/cmd/chromad/go.mod
@@ -1,9 +1,9 @@
-module github.com/alecthomas/chroma/cmd/chromad
+module github.com/alecthomas/chroma/v2/cmd/chromad
-go 1.16
+go 1.17
require (
- github.com/alecthomas/chroma v0.0.0-00010101000000-000000000000
+ github.com/alecthomas/chroma/v2 v2.0.0-00010101000000-000000000000
github.com/alecthomas/kong v0.2.4
github.com/alecthomas/kong-hcl v0.2.0
github.com/gorilla/csrf v1.6.2
@@ -11,4 +11,4 @@ require (
github.com/gorilla/mux v1.7.3
)
-replace github.com/alecthomas/chroma => ../../
+replace github.com/alecthomas/chroma/v2 => ../../
diff --git a/cmd/chromad/go.sum b/cmd/chromad/go.sum
index 945fe05..f64caf2 100644
--- a/cmd/chromad/go.sum
+++ b/cmd/chromad/go.sum
@@ -3,6 +3,8 @@ github.com/alecthomas/kong v0.2.4 h1:Y0ZBCHAvHhTHw7FFJ2FzCAAG4pkbTgA45nc7BpMhDNk
github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE=
github.com/alecthomas/kong-hcl v0.2.0 h1:l1+pkGJm2BtRJF9dCq9hw6KZWEanteY4Ar9suW3Qm0g=
github.com/alecthomas/kong-hcl v0.2.0/go.mod h1:S5D46RHGG8Ubdxk8TuXBT9wndShsA8/JYSxxiI9y01Y=
+github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae h1:zzGwJfFlFGD94CyyYwCJeSuD32Gj9GTaSi5y9hoVzdY=
+github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
diff --git a/cmd/chromad/main.go b/cmd/chromad/main.go
index 4b83b59..4307e3a 100644
--- a/cmd/chromad/main.go
+++ b/cmd/chromad/main.go
@@ -15,10 +15,10 @@ import (
"github.com/gorilla/handlers"
"github.com/gorilla/mux"
- "github.com/alecthomas/chroma"
- "github.com/alecthomas/chroma/formatters/html"
- "github.com/alecthomas/chroma/lexers"
- "github.com/alecthomas/chroma/styles"
+ "github.com/alecthomas/chroma/v2"
+ "github.com/alecthomas/chroma/v2/formatters/html"
+ "github.com/alecthomas/chroma/v2/lexers"
+ "github.com/alecthomas/chroma/v2/styles"
)
var (
@@ -137,7 +137,7 @@ func newContext(r *http.Request) context {
if ctx.SelectedStyle == "" {
ctx.SelectedStyle = "monokailight"
}
- for _, lexer := range lexers.Registry.Lexers {
+ for _, lexer := range lexers.GlobalLexerRegistry.Lexers {
ctx.Languages = append(ctx.Languages, lexer.Config().Name)
}
sort.Strings(ctx.Languages)
diff --git a/coalesce_test.go b/coalesce_test.go
index ffae48e..bc26e03 100644
--- a/coalesce_test.go
+++ b/coalesce_test.go
@@ -7,7 +7,7 @@ import (
)
func TestCoalesce(t *testing.T) {
- lexer := Coalesce(MustNewLexer(nil, Rules{ // nolint: forbidigo
+ lexer := Coalesce(mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": []Rule{
{`[!@#$%^&*()]`, Punctuation, nil},
},
diff --git a/delegate.go b/delegate.go
index 5cef01b..f848194 100644
--- a/delegate.go
+++ b/delegate.go
@@ -24,6 +24,21 @@ func DelegatingLexer(root Lexer, language Lexer) Lexer {
}
}
+func (d *delegatingLexer) AnalyseText(text string) float32 {
+ return d.root.AnalyseText(text)
+}
+
+func (d *delegatingLexer) SetAnalyser(analyser func(text string) float32) Lexer {
+ d.root.SetAnalyser(analyser)
+ return d
+}
+
+func (d *delegatingLexer) SetRegistry(r *LexerRegistry) Lexer {
+ d.root.SetRegistry(r)
+ d.language.SetRegistry(r)
+ return d
+}
+
func (d *delegatingLexer) Config() *Config {
return d.language.Config()
}
diff --git a/delegate_test.go b/delegate_test.go
index d8a4994..f37d187 100644
--- a/delegate_test.go
+++ b/delegate_test.go
@@ -6,8 +6,8 @@ import (
"github.com/stretchr/testify/assert"
)
-func makeDelegationTestLexers() (lang Lexer, root Lexer) {
- return MustNewLexer(nil, Rules{ // nolint: forbidigo
+func makeDelegationTestLexers(t *testing.T) (lang Lexer, root Lexer) {
+ return mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{`\<\?`, CommentPreproc, Push("inside")},
{`.`, Other, nil},
@@ -18,7 +18,7 @@ func makeDelegationTestLexers() (lang Lexer, root Lexer) {
{`\s+`, Whitespace, nil},
},
}),
- MustNewLexer(nil, Rules{ // nolint: forbidigo
+ mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{`\bhello\b`, Keyword, nil},
{`\b(world|there)\b`, Name, nil},
@@ -97,7 +97,7 @@ func TestDelegate(t *testing.T) {
{Keyword, "hello"},
}},
}
- lang, root := makeDelegationTestLexers()
+ lang, root := makeDelegationTestLexers(t)
delegate := DelegatingLexer(root, lang)
for _, test := range testdata {
// nolint: scopelint
diff --git a/emitters.go b/emitters.go
new file mode 100644
index 0000000..67b80a8
--- /dev/null
+++ b/emitters.go
@@ -0,0 +1,221 @@
+package chroma
+
+import (
+ "fmt"
+)
+
+// An Emitter takes group matches and returns tokens.
+type Emitter interface {
+ // Emit tokens for the given regex groups.
+ Emit(groups []string, state *LexerState) Iterator
+}
+
+// SerialisableEmitter is an Emitter that can be serialised and deserialised to/from JSON.
+type SerialisableEmitter interface {
+ Emitter
+ EmitterKind() string
+}
+
+// EmitterFunc is a function that is an Emitter.
+type EmitterFunc func(groups []string, state *LexerState) Iterator
+
+// Emit tokens for groups.
+func (e EmitterFunc) Emit(groups []string, state *LexerState) Iterator {
+ return e(groups, state)
+}
+
+type Emitters []Emitter
+
+type byGroupsEmitter struct {
+ Emitters
+}
+
+// ByGroups emits a token for each matching group in the rule's regex.
+func ByGroups(emitters ...Emitter) Emitter {
+ return &byGroupsEmitter{Emitters: emitters}
+}
+
+func (b *byGroupsEmitter) EmitterKind() string { return "bygroups" }
+
+func (b *byGroupsEmitter) Emit(groups []string, state *LexerState) Iterator {
+ iterators := make([]Iterator, 0, len(groups)-1)
+ if len(b.Emitters) != len(groups)-1 {
+ iterators = append(iterators, Error.Emit(groups, state))
+ // panic(errors.Errorf("number of groups %q does not match number of emitters %v", groups, emitters))
+ } else {
+ for i, group := range groups[1:] {
+ if b.Emitters[i] != nil {
+ iterators = append(iterators, b.Emitters[i].Emit([]string{group}, state))
+ }
+ }
+ }
+ return Concaterator(iterators...)
+}
+
+// ByGroupNames emits a token for each named matching group in the rule's regex.
+func ByGroupNames(emitters map[string]Emitter) Emitter {
+ return EmitterFunc(func(groups []string, state *LexerState) Iterator {
+ iterators := make([]Iterator, 0, len(state.NamedGroups)-1)
+ if len(state.NamedGroups)-1 == 0 {
+ if emitter, ok := emitters[`0`]; ok {
+ iterators = append(iterators, emitter.Emit(groups, state))
+ } else {
+ iterators = append(iterators, Error.Emit(groups, state))
+ }
+ } else {
+ ruleRegex := state.Rules[state.State][state.Rule].Regexp
+ for i := 1; i < len(state.NamedGroups); i++ {
+ groupName := ruleRegex.GroupNameFromNumber(i)
+ group := state.NamedGroups[groupName]
+ if emitter, ok := emitters[groupName]; ok {
+ if emitter != nil {
+ iterators = append(iterators, emitter.Emit([]string{group}, state))
+ }
+ } else {
+ iterators = append(iterators, Error.Emit([]string{group}, state))
+ }
+ }
+ }
+ return Concaterator(iterators...)
+ })
+}
+
+// UsingByGroup emits tokens for the matched groups in the regex using a
+// "sublexer". Used when lexing code blocks where the name of a sublexer is
+// contained within the block, for example on a Markdown text block or SQL
+// language block.
+//
+// The sublexer will be retrieved using sublexerGetFunc (typically
+// internal.Get), using the captured value from the matched sublexerNameGroup.
+//
+// If sublexerGetFunc returns a non-nil lexer for the captured sublexerNameGroup,
+// then tokens for the matched codeGroup will be emitted using the retrieved
+// lexer. Otherwise, if the sublexer is nil, then tokens will be emitted from
+// the passed emitter.
+//
+// Example:
+//
+// var Markdown = internal.Register(MustNewLexer(
+// &Config{
+// Name: "markdown",
+// Aliases: []string{"md", "mkd"},
+// Filenames: []string{"*.md", "*.mkd", "*.markdown"},
+// MimeTypes: []string{"text/x-markdown"},
+// },
+// Rules{
+// "root": {
+// {"^(```)(\\w+)(\\n)([\\w\\W]*?)(^```$)",
+// UsingByGroup(
+// internal.Get,
+// 2, 4,
+// String, String, String, Text, String,
+// ),
+// nil,
+// },
+// },
+// },
+// ))
+//
+// See the lexers/m/markdown.go for the complete example.
+//
+// Note: panic's if the number of emitters does not equal the number of matched
+// groups in the regex.
+func UsingByGroup(sublexerNameGroup, codeGroup int, emitters ...Emitter) Emitter {
+ return &usingByGroup{
+ SublexerNameGroup: sublexerNameGroup,
+ CodeGroup: codeGroup,
+ Emitters: emitters,
+ }
+}
+
+type usingByGroup struct {
+ SublexerNameGroup int `xml:"sublexer_name_group"`
+ CodeGroup int `xml:"code_group"`
+ Emitters Emitters `xml:"emitters"`
+}
+
+func (u *usingByGroup) EmitterKind() string { return "usingbygroup" }
+func (u *usingByGroup) Emit(groups []string, state *LexerState) Iterator {
+ // bounds check
+ if len(u.Emitters) != len(groups)-1 {
+ panic("UsingByGroup expects number of emitters to be the same as len(groups)-1")
+ }
+
+ // grab sublexer
+ sublexer := state.Registry.Get(groups[u.SublexerNameGroup])
+
+ // build iterators
+ iterators := make([]Iterator, len(groups)-1)
+ for i, group := range groups[1:] {
+ if i == u.CodeGroup-1 && sublexer != nil {
+ var err error
+ iterators[i], err = sublexer.Tokenise(nil, groups[u.CodeGroup])
+ if err != nil {
+ panic(err)
+ }
+ } else if u.Emitters[i] != nil {
+ iterators[i] = u.Emitters[i].Emit([]string{group}, state)
+ }
+ }
+ return Concaterator(iterators...)
+}
+
+// UsingLexer returns an Emitter that uses a given Lexer for parsing and emitting.
+//
+// This Emitter is not serialisable.
+func UsingLexer(lexer Lexer) Emitter {
+ return EmitterFunc(func(groups []string, _ *LexerState) Iterator {
+ it, err := lexer.Tokenise(&TokeniseOptions{State: "root", Nested: true}, groups[0])
+ if err != nil {
+ panic(err)
+ }
+ return it
+ })
+}
+
+type usingEmitter struct {
+ Lexer string `xml:"lexer,attr"`
+}
+
+func (u *usingEmitter) EmitterKind() string { return "using" }
+
+func (u *usingEmitter) Emit(groups []string, state *LexerState) Iterator {
+ if state.Registry == nil {
+ panic(fmt.Sprintf("no LexerRegistry available for Using(%q)", u.Lexer))
+ }
+ lexer := state.Registry.Get(u.Lexer)
+ if lexer == nil {
+ panic(fmt.Sprintf("no such lexer %q", u.Lexer))
+ }
+ it, err := lexer.Tokenise(&TokeniseOptions{State: "root", Nested: true}, groups[0])
+ if err != nil {
+ panic(err)
+ }
+ return it
+}
+
+// Using returns an Emitter that uses a given Lexer reference for parsing and emitting.
+//
+// The referenced lexer must be stored in the same LexerRegistry.
+func Using(lexer string) Emitter {
+ return &usingEmitter{Lexer: lexer}
+}
+
+type usingSelfEmitter struct {
+ State string `xml:"state,attr"`
+}
+
+func (u *usingSelfEmitter) EmitterKind() string { return "usingself" }
+
+func (u *usingSelfEmitter) Emit(groups []string, state *LexerState) Iterator {
+ it, err := state.Lexer.Tokenise(&TokeniseOptions{State: u.State, Nested: true}, groups[0])
+ if err != nil {
+ panic(err)
+ }
+ return it
+}
+
+// UsingSelf is like Using, but uses the current Lexer.
+func UsingSelf(stateName string) Emitter {
+ return &usingSelfEmitter{stateName}
+}
diff --git a/formatters/api.go b/formatters/api.go
index 6da0a24..9ca0d01 100644
--- a/formatters/api.go
+++ b/formatters/api.go
@@ -4,9 +4,9 @@ import (
"io"
"sort"
- "github.com/alecthomas/chroma"
- "github.com/alecthomas/chroma/formatters/html"
- "github.com/alecthomas/chroma/formatters/svg"
+ "github.com/alecthomas/chroma/v2"
+ "github.com/alecthomas/chroma/v2/formatters/html"
+ "github.com/alecthomas/chroma/v2/formatters/svg"
)
var (
diff --git a/formatters/html/html.go b/formatters/html/html.go
index 164c842..e2fb6f9 100644
--- a/formatters/html/html.go
+++ b/formatters/html/html.go
@@ -7,7 +7,7 @@ import (
"sort"
"strings"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Option sets an option of the HTML formatter.
diff --git a/formatters/html/html_test.go b/formatters/html/html_test.go
index 346611f..f2539f1 100644
--- a/formatters/html/html_test.go
+++ b/formatters/html/html_test.go
@@ -9,9 +9,9 @@ import (
"github.com/stretchr/testify/assert"
- "github.com/alecthomas/chroma"
- "github.com/alecthomas/chroma/lexers"
- "github.com/alecthomas/chroma/styles"
+ "github.com/alecthomas/chroma/v2"
+ "github.com/alecthomas/chroma/v2/lexers"
+ "github.com/alecthomas/chroma/v2/styles"
)
func TestCompressStyle(t *testing.T) {
diff --git a/formatters/json.go b/formatters/json.go
index 95df4bb..f167bc0 100644
--- a/formatters/json.go
+++ b/formatters/json.go
@@ -5,7 +5,7 @@ import (
"fmt"
"io"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// JSON formatter outputs the raw token structures as JSON.
diff --git a/formatters/svg/svg.go b/formatters/svg/svg.go
index 5cfd950..8e9ca94 100644
--- a/formatters/svg/svg.go
+++ b/formatters/svg/svg.go
@@ -10,7 +10,7 @@ import (
"path"
"strings"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Option sets an option of the SVG formatter.
diff --git a/formatters/tokens.go b/formatters/tokens.go
index 91d80d1..3bdd57c 100644
--- a/formatters/tokens.go
+++ b/formatters/tokens.go
@@ -4,7 +4,7 @@ import (
"fmt"
"io"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Tokens formatter outputs the raw token structures.
diff --git a/formatters/tty_indexed.go b/formatters/tty_indexed.go
index 47fbb1a..2393f58 100644
--- a/formatters/tty_indexed.go
+++ b/formatters/tty_indexed.go
@@ -5,7 +5,7 @@ import (
"io"
"math"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
type ttyTable struct {
diff --git a/formatters/tty_indexed_test.go b/formatters/tty_indexed_test.go
index 1216a49..cfac27c 100644
--- a/formatters/tty_indexed_test.go
+++ b/formatters/tty_indexed_test.go
@@ -3,7 +3,7 @@ package formatters
import (
"testing"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
"github.com/stretchr/testify/assert"
)
diff --git a/formatters/tty_truecolour.go b/formatters/tty_truecolour.go
index b02e636..7b43c6e 100644
--- a/formatters/tty_truecolour.go
+++ b/formatters/tty_truecolour.go
@@ -4,7 +4,7 @@ import (
"fmt"
"io"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// TTY16m is a true-colour terminal formatter.
diff --git a/go.mod b/go.mod
index c406562..0545836 100644
--- a/go.mod
+++ b/go.mod
@@ -1,8 +1,9 @@
-module github.com/alecthomas/chroma
+module github.com/alecthomas/chroma/v2
-go 1.13
+go 1.17
require (
+ github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dlclark/regexp2 v1.4.0
github.com/stretchr/testify v1.7.0
diff --git a/go.sum b/go.sum
index 734f796..18f0454 100644
--- a/go.sum
+++ b/go.sum
@@ -1,3 +1,5 @@
+github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae h1:zzGwJfFlFGD94CyyYwCJeSuD32Gj9GTaSi5y9hoVzdY=
+github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
diff --git a/lexer.go b/lexer.go
index fe62519..4a1bd0f 100644
--- a/lexer.go
+++ b/lexer.go
@@ -15,30 +15,30 @@ var (
// Config for a lexer.
type Config struct {
// Name of the lexer.
- Name string
+ Name string `xml:"name,omitempty"`
// Shortcuts for the lexer
- Aliases []string
+ Aliases []string `xml:"alias,omitempty"`
// File name globs
- Filenames []string
+ Filenames []string `xml:"filename,omitempty"`
// Secondary file name globs
- AliasFilenames []string
+ AliasFilenames []string `xml:"alias_filename,omitempty"`
// MIME types
- MimeTypes []string
+ MimeTypes []string `xml:"mime_type,omitempty"`
// Regex matching is case-insensitive.
- CaseInsensitive bool
+ CaseInsensitive bool `xml:"case_insensitive,omitempty"`
// Regex matches all characters.
- DotAll bool
+ DotAll bool `xml:"dot_all,omitempty"`
// Regex does not match across lines ($ matches EOL).
//
// Defaults to multiline.
- NotMultiline bool
+ NotMultiline bool `xml:"not_multiline,omitempty"`
// Don't strip leading and trailing newlines from the input.
// DontStripNL bool
@@ -48,7 +48,7 @@ type Config struct {
// Make sure that the input ends with a newline. This
// is required for some lexers that consume input linewise.
- EnsureNL bool
+ EnsureNL bool `xml:"ensure_nl,omitempty"`
// If given and greater than 0, expand tabs in the input.
// TabSize int
@@ -56,7 +56,7 @@ type Config struct {
// Priority of lexer.
//
// If this is 0 it will be treated as a default of 1.
- Priority float32
+ Priority float32 `xml:"priority,omitempty"`
}
// Token output to formatter.
@@ -94,6 +94,20 @@ type Lexer interface {
Config() *Config
// Tokenise returns an Iterator over tokens in text.
Tokenise(options *TokeniseOptions, text string) (Iterator, error)
+ // SetRegistry sets the registry this Lexer is associated with.
+ //
+ // The registry should be used by the Lexer if it needs to look up other
+ // lexers.
+ SetRegistry(registry *LexerRegistry) Lexer
+ // SetAnalyser sets a function the Lexer should use for scoring how
+ // likely a fragment of text is to match this lexer, between 0.0 and 1.0.
+ // A value of 1 indicates high confidence.
+ //
+ // Lexers may ignore this if they implement their own analysers.
+ SetAnalyser(analyser func(text string) float32) Lexer
+ // AnalyseText scores how likely a fragment of text is to match
+ // this lexer, between 0.0 and 1.0. A value of 1 indicates high confidence.
+ AnalyseText(text string) float32
}
// Lexers is a slice of lexers sortable by name.
diff --git a/lexer_test.go b/lexer_test.go
index 412ae9c..75e0d90 100644
--- a/lexer_test.go
+++ b/lexer_test.go
@@ -3,38 +3,34 @@ package chroma
import (
"testing"
- "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func TestTokenTypeClassifiers(t *testing.T) {
- assert.True(t, GenericDeleted.InCategory(Generic))
- assert.True(t, LiteralStringBacktick.InSubCategory(String))
- assert.Equal(t, LiteralStringBacktick.String(), "LiteralStringBacktick")
+ require.True(t, GenericDeleted.InCategory(Generic))
+ require.True(t, LiteralStringBacktick.InSubCategory(String))
+ require.Equal(t, LiteralStringBacktick.String(), "LiteralStringBacktick")
}
func TestSimpleLexer(t *testing.T) {
- lexer, err := NewLexer( // nolint: forbidigo
- &Config{
- Name: "INI",
- Aliases: []string{"ini", "cfg"},
- Filenames: []string{"*.ini", "*.cfg"},
+ lexer := mustNewLexer(t, &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},
},
- 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)
+ require.NoError(t, err)
expected := []Token{
{Whitespace, "\n\t"},
{Comment, "; this is a comment"},
@@ -48,5 +44,5 @@ func TestSimpleLexer(t *testing.T) {
{LiteralString, "10"},
{Whitespace, "\n"},
}
- assert.Equal(t, expected, actual)
+ require.Equal(t, expected, actual)
}
diff --git a/lexers/a/abap.go b/lexers/a/abap.go
deleted file mode 100644
index 268aa6a..0000000
--- a/lexers/a/abap.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// ABAP lexer.
-var Abap = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "ABAP",
- Aliases: []string{"abap"},
- Filenames: []string{"*.abap", "*.ABAP"},
- MimeTypes: []string{"text/x-abap"},
- CaseInsensitive: true,
- },
- abapRules,
-))
-
-func abapRules() Rules {
- return Rules{
- "common": {
- {`\s+`, Text, nil},
- {`^\*.*$`, CommentSingle, nil},
- {`\".*?\n`, CommentSingle, nil},
- {`##\w+`, CommentSpecial, nil},
- },
- "variable-names": {
- {`<\S+>`, NameVariable, nil},
- {`\w[\w~]*(?:(\[\])|->\*)?`, NameVariable, nil},
- },
- "root": {
- Include("common"),
- {`CALL\s+(?:BADI|CUSTOMER-FUNCTION|FUNCTION)`, Keyword, nil},
- {`(CALL\s+(?:DIALOG|SCREEN|SUBSCREEN|SELECTION-SCREEN|TRANSACTION|TRANSFORMATION))\b`, Keyword, nil},
- {`(FORM|PERFORM)(\s+)(\w+)`, ByGroups(Keyword, Text, NameFunction), nil},
- {`(PERFORM)(\s+)(\()(\w+)(\))`, ByGroups(Keyword, Text, Punctuation, NameVariable, Punctuation), nil},
- {`(MODULE)(\s+)(\S+)(\s+)(INPUT|OUTPUT)`, ByGroups(Keyword, Text, NameFunction, Text, Keyword), nil},
- {`(METHOD)(\s+)([\w~]+)`, ByGroups(Keyword, Text, NameFunction), nil},
- {`(\s+)([\w\-]+)([=\-]>)([\w\-~]+)`, ByGroups(Text, NameVariable, Operator, NameFunction), nil},
- {`(?<=(=|-)>)([\w\-~]+)(?=\()`, NameFunction, nil},
- {`(TEXT)(-)(\d{3})`, ByGroups(Keyword, Punctuation, LiteralNumberInteger), nil},
- {`(TEXT)(-)(\w{3})`, ByGroups(Keyword, Punctuation, NameVariable), nil},
- {`(ADD-CORRESPONDING|AUTHORITY-CHECK|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|DELETE-ADJACENT|DIVIDE-CORRESPONDING|EDITOR-CALL|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|EXIT-COMMAND|FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|INTERFACE-POOL|INVERTED-DATE|LOAD-OF-PROGRAM|LOG-POINT|MESSAGE-ID|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|NEW-PAGE|NEW-SECTION|NO-EXTENSION|OUTPUT-LENGTH|PRINT-CONTROL|SELECT-OPTIONS|START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYSTEM-EXCEPTIONS|TYPE-POOL|TYPE-POOLS|NO-DISPLAY)\b`, Keyword, nil},
- {`(?])(CREATE\s+(PUBLIC|PRIVATE|DATA|OBJECT)|(PUBLIC|PRIVATE|PROTECTED)\s+SECTION|(TYPE|LIKE)\s+((LINE\s+OF|REF\s+TO|(SORTED|STANDARD|HASHED)\s+TABLE\s+OF))?|FROM\s+(DATABASE|MEMORY)|CALL\s+METHOD|(GROUP|ORDER) BY|HAVING|SEPARATED BY|GET\s+(BADI|BIT|CURSOR|DATASET|LOCALE|PARAMETER|PF-STATUS|(PROPERTY|REFERENCE)\s+OF|RUN\s+TIME|TIME\s+(STAMP)?)?|SET\s+(BIT|BLANK\s+LINES|COUNTRY|CURSOR|DATASET|EXTENDED\s+CHECK|HANDLER|HOLD\s+DATA|LANGUAGE|LEFT\s+SCROLL-BOUNDARY|LOCALE|MARGIN|PARAMETER|PF-STATUS|PROPERTY\s+OF|RUN\s+TIME\s+(ANALYZER|CLOCK\s+RESOLUTION)|SCREEN|TITLEBAR|UPADTE\s+TASK\s+LOCAL|USER-COMMAND)|CONVERT\s+((INVERTED-)?DATE|TIME|TIME\s+STAMP|TEXT)|(CLOSE|OPEN)\s+(DATASET|CURSOR)|(TO|FROM)\s+(DATA BUFFER|INTERNAL TABLE|MEMORY ID|DATABASE|SHARED\s+(MEMORY|BUFFER))|DESCRIBE\s+(DISTANCE\s+BETWEEN|FIELD|LIST|TABLE)|FREE\s(MEMORY|OBJECT)?|PROCESS\s+(BEFORE\s+OUTPUT|AFTER\s+INPUT|ON\s+(VALUE-REQUEST|HELP-REQUEST))|AT\s+(LINE-SELECTION|USER-COMMAND|END\s+OF|NEW)|AT\s+SELECTION-SCREEN(\s+(ON(\s+(BLOCK|(HELP|VALUE)-REQUEST\s+FOR|END\s+OF|RADIOBUTTON\s+GROUP))?|OUTPUT))?|SELECTION-SCREEN:?\s+((BEGIN|END)\s+OF\s+((TABBED\s+)?BLOCK|LINE|SCREEN)|COMMENT|FUNCTION\s+KEY|INCLUDE\s+BLOCKS|POSITION|PUSHBUTTON|SKIP|ULINE)|LEAVE\s+(LIST-PROCESSING|PROGRAM|SCREEN|TO LIST-PROCESSING|TO TRANSACTION)(ENDING|STARTING)\s+AT|FORMAT\s+(COLOR|INTENSIFIED|INVERSE|HOTSPOT|INPUT|FRAMES|RESET)|AS\s+(CHECKBOX|SUBSCREEN|WINDOW)|WITH\s+(((NON-)?UNIQUE)?\s+KEY|FRAME)|(BEGIN|END)\s+OF|DELETE(\s+ADJACENT\s+DUPLICATES\sFROM)?|COMPARING(\s+ALL\s+FIELDS)?|(INSERT|APPEND)(\s+INITIAL\s+LINE\s+(IN)?TO|\s+LINES\s+OF)?|IN\s+((BYTE|CHARACTER)\s+MODE|PROGRAM)|END-OF-(DEFINITION|PAGE|SELECTION)|WITH\s+FRAME(\s+TITLE)|(REPLACE|FIND)\s+((FIRST|ALL)\s+OCCURRENCES?\s+OF\s+)?(SUBSTRING|REGEX)?|MATCH\s+(LENGTH|COUNT|LINE|OFFSET)|(RESPECTING|IGNORING)\s+CASE|IN\s+UPDATE\s+TASK|(SOURCE|RESULT)\s+(XML)?|REFERENCE\s+INTO|AND\s+(MARK|RETURN)|CLIENT\s+SPECIFIED|CORRESPONDING\s+FIELDS\s+OF|IF\s+FOUND|FOR\s+EVENT|INHERITING\s+FROM|LEAVE\s+TO\s+SCREEN|LOOP\s+AT\s+(SCREEN)?|LOWER\s+CASE|MATCHCODE\s+OBJECT|MODIF\s+ID|MODIFY\s+SCREEN|NESTING\s+LEVEL|NO\s+INTERVALS|OF\s+STRUCTURE|RADIOBUTTON\s+GROUP|RANGE\s+OF|REF\s+TO|SUPPRESS DIALOG|TABLE\s+OF|UPPER\s+CASE|TRANSPORTING\s+NO\s+FIELDS|VALUE\s+CHECK|VISIBLE\s+LENGTH|HEADER\s+LINE|COMMON\s+PART)\b`, Keyword, nil},
- {`(^|(?<=(\s|\.)))(ABBREVIATED|ABSTRACT|ADD|ALIASES|ALIGN|ALPHA|ASSERT|AS|ASSIGN(ING)?|AT(\s+FIRST)?|BACK|BLOCK|BREAK-POINT|CASE|CATCH|CHANGING|CHECK|CLASS|CLEAR|COLLECT|COLOR|COMMIT|CREATE|COMMUNICATION|COMPONENTS?|COMPUTE|CONCATENATE|CONDENSE|CONSTANTS|CONTEXTS|CONTINUE|CONTROLS|COUNTRY|CURRENCY|DATA|DATE|DECIMALS|DEFAULT|DEFINE|DEFINITION|DEFERRED|DEMAND|DETAIL|DIRECTORY|DIVIDE|DO|DUMMY|ELSE(IF)?|ENDAT|ENDCASE|ENDCATCH|ENDCLASS|ENDDO|ENDFORM|ENDFUNCTION|ENDIF|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDSELECT|ENDTRY|ENDWHILE|ENHANCEMENT|EVENTS|EXACT|EXCEPTIONS?|EXIT|EXPONENT|EXPORT|EXPORTING|EXTRACT|FETCH|FIELDS?|FOR|FORM|FORMAT|FREE|FROM|FUNCTION|HIDE|ID|IF|IMPORT|IMPLEMENTATION|IMPORTING|IN|INCLUDE|INCLUDING|INDEX|INFOTYPES|INITIALIZATION|INTERFACE|INTERFACES|INTO|LANGUAGE|LEAVE|LENGTH|LINES|LOAD|LOCAL|JOIN|KEY|NEXT|MAXIMUM|MESSAGE|METHOD[S]?|MINIMUM|MODULE|MODIFIER|MODIFY|MOVE|MULTIPLY|NODES|NUMBER|OBLIGATORY|OBJECT|OF|OFF|ON|OTHERS|OVERLAY|PACK|PAD|PARAMETERS|PERCENTAGE|POSITION|PROGRAM|PROVIDE|PUBLIC|PUT|PF\d\d|RAISE|RAISING|RANGES?|READ|RECEIVE|REDEFINITION|REFRESH|REJECT|REPORT|RESERVE|RESUME|RETRY|RETURN|RETURNING|RIGHT|ROLLBACK|REPLACE|SCROLL|SEARCH|SELECT|SHIFT|SIGN|SINGLE|SIZE|SKIP|SORT|SPLIT|STATICS|STOP|STYLE|SUBMATCHES|SUBMIT|SUBTRACT|SUM(?!\()|SUMMARY|SUMMING|SUPPLY|TABLE|TABLES|TIMESTAMP|TIMES?|TIMEZONE|TITLE|\??TO|TOP-OF-PAGE|TRANSFER|TRANSLATE|TRY|TYPES|ULINE|UNDER|UNPACK|UPDATE|USING|VALUE|VALUES|VIA|VARYING|VARY|WAIT|WHEN|WHERE|WIDTH|WHILE|WITH|WINDOW|WRITE|XSD|ZERO)\b`, Keyword, nil},
- {`(abs|acos|asin|atan|boolc|boolx|bit_set|char_off|charlen|ceil|cmax|cmin|condense|contains|contains_any_of|contains_any_not_of|concat_lines_of|cos|cosh|count|count_any_of|count_any_not_of|dbmaxlen|distance|escape|exp|find|find_end|find_any_of|find_any_not_of|floor|frac|from_mixed|insert|lines|log|log10|match|matches|nmax|nmin|numofchar|repeat|replace|rescale|reverse|round|segment|shift_left|shift_right|sign|sin|sinh|sqrt|strlen|substring|substring_after|substring_from|substring_before|substring_to|tan|tanh|to_upper|to_lower|to_mixed|translate|trunc|xstrlen)(\()\b`, ByGroups(NameBuiltin, Punctuation), nil},
- {`&[0-9]`, Name, nil},
- {`[0-9]+`, LiteralNumberInteger, nil},
- {`(?<=(\s|.))(AND|OR|EQ|NE|GT|LT|GE|LE|CO|CN|CA|NA|CS|NOT|NS|CP|NP|BYTE-CO|BYTE-CN|BYTE-CA|BYTE-NA|BYTE-CS|BYTE-NS|IS\s+(NOT\s+)?(INITIAL|ASSIGNED|REQUESTED|BOUND))\b`, OperatorWord, nil},
- Include("variable-names"),
- {`[?*<>=\-+&]`, Operator, nil},
- {`'(''|[^'])*'`, LiteralStringSingle, nil},
- {"`([^`])*`", LiteralStringSingle, nil},
- {`([|}])([^{}|]*?)([|{])`, ByGroups(Punctuation, LiteralStringSingle, Punctuation), nil},
- {`[/;:()\[\],.]`, Punctuation, nil},
- {`(!)(\w+)`, ByGroups(Operator, Name), nil},
- },
- }
-}
diff --git a/lexers/a/abnf.go b/lexers/a/abnf.go
deleted file mode 100644
index 85c47af..0000000
--- a/lexers/a/abnf.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Abnf lexer.
-var Abnf = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "ABNF",
- Aliases: []string{"abnf"},
- Filenames: []string{"*.abnf"},
- MimeTypes: []string{"text/x-abnf"},
- },
- abnfRules,
-))
-
-func abnfRules() Rules {
- return 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/lexers/a/actionscript.go b/lexers/a/actionscript.go
deleted file mode 100644
index df55d6d..0000000
--- a/lexers/a/actionscript.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Actionscript lexer.
-var Actionscript = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "ActionScript",
- Aliases: []string{"as", "actionscript"},
- Filenames: []string{"*.as"},
- MimeTypes: []string{"application/x-actionscript", "text/x-actionscript", "text/actionscript"},
- NotMultiline: true,
- DotAll: true,
- },
- actionscriptRules,
-))
-
-func actionscriptRules() Rules {
- return 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/lexers/a/actionscript3.go b/lexers/a/actionscript3.go
deleted file mode 100644
index 45596dc..0000000
--- a/lexers/a/actionscript3.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Actionscript 3 lexer.
-var Actionscript3 = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "ActionScript 3",
- Aliases: []string{"as3", "actionscript3"},
- Filenames: []string{"*.as"},
- MimeTypes: []string{"application/x-actionscript3", "text/x-actionscript3", "text/actionscript3"},
- DotAll: true,
- },
- actionscript3Rules,
-))
-
-func actionscript3Rules() Rules {
- return 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/lexers/a/ada.go b/lexers/a/ada.go
deleted file mode 100644
index 9167271..0000000
--- a/lexers/a/ada.go
+++ /dev/null
@@ -1,118 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Ada lexer.
-var Ada = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Ada",
- Aliases: []string{"ada", "ada95", "ada2005"},
- Filenames: []string{"*.adb", "*.ads", "*.ada"},
- MimeTypes: []string{"text/x-ada"},
- CaseInsensitive: true,
- },
- adaRules,
-))
-
-func adaRules() Rules {
- return 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/lexers/a/al.go b/lexers/a/al.go
deleted file mode 100644
index 4055f36..0000000
--- a/lexers/a/al.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Al lexer.
-var Al = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "AL",
- Aliases: []string{"al"},
- Filenames: []string{"*.al", "*.dal"},
- MimeTypes: []string{"text/x-al"},
- DotAll: true,
- CaseInsensitive: true,
- },
- alRules,
-))
-
-// https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage
-func alRules() Rules {
- return Rules{
- "root": {
- {`\s+`, TextWhitespace, nil},
- {`(?s)\/\*.*?\\*\*\/`, CommentMultiline, nil},
- {`(?s)//.*?\n`, CommentSingle, nil},
- {`\"([^\"])*\"`, Text, nil},
- {`'([^'])*'`, LiteralString, nil},
- {`\b(?i:(ARRAY|ASSERTERROR|BEGIN|BREAK|CASE|DO|DOWNTO|ELSE|END|EVENT|EXIT|FOR|FOREACH|FUNCTION|IF|IMPLEMENTS|IN|INDATASET|INTERFACE|INTERNAL|LOCAL|OF|PROCEDURE|PROGRAM|PROTECTED|REPEAT|RUNONCLIENT|SECURITYFILTERING|SUPPRESSDISPOSE|TEMPORARY|THEN|TO|TRIGGER|UNTIL|VAR|WHILE|WITH|WITHEVENTS))\b`, Keyword, nil},
- {`\b(?i:(AND|DIV|MOD|NOT|OR|XOR))\b`, OperatorWord, nil},
- {`\b(?i:(AVERAGE|CONST|COUNT|EXIST|FIELD|FILTER|LOOKUP|MAX|MIN|ORDER|SORTING|SUM|TABLEDATA|UPPERLIMIT|WHERE|ASCENDING|DESCENDING))\b`, Keyword, nil},
- {`\b(?i:(CODEUNIT|PAGE|PAGEEXTENSION|PAGECUSTOMIZATION|DOTNET|ENUM|ENUMEXTENSION|VALUE|QUERY|REPORT|TABLE|TABLEEXTENSION|XMLPORT|PROFILE|CONTROLADDIN|REPORTEXTENSION|INTERFACE|PERMISSIONSET|PERMISSIONSETEXTENSION|ENTITLEMENT))\b`, Keyword, nil},
- {`\b(?i:(Action|Array|Automation|BigInteger|BigText|Blob|Boolean|Byte|Char|ClientType|Code|Codeunit|CompletionTriggerErrorLevel|ConnectionType|Database|DataClassification|DataScope|Date|DateFormula|DateTime|Decimal|DefaultLayout|Dialog|Dictionary|DotNet|DotNetAssembly|DotNetTypeDeclaration|Duration|Enum|ErrorInfo|ErrorType|ExecutionContext|ExecutionMode|FieldClass|FieldRef|FieldType|File|FilterPageBuilder|Guid|InStream|Integer|Joker|KeyRef|List|ModuleDependencyInfo|ModuleInfo|None|Notification|NotificationScope|ObjectType|Option|OutStream|Page|PageResult|Query|Record|RecordId|RecordRef|Report|ReportFormat|SecurityFilter|SecurityFiltering|Table|TableConnectionType|TableFilter|TestAction|TestField|TestFilterField|TestPage|TestPermissions|TestRequestPage|Text|TextBuilder|TextConst|TextEncoding|Time|TransactionModel|TransactionType|Variant|Verbosity|Version|XmlPort|HttpContent|HttpHeaders|HttpClient|HttpRequestMessage|HttpResponseMessage|JsonToken|JsonValue|JsonArray|JsonObject|View|Views|XmlAttribute|XmlAttributeCollection|XmlComment|XmlCData|XmlDeclaration|XmlDocument|XmlDocumentType|XmlElement|XmlNamespaceManager|XmlNameTable|XmlNode|XmlNodeList|XmlProcessingInstruction|XmlReadOptions|XmlText|XmlWriteOptions|WebServiceActionContext|WebServiceActionResultCode|SessionSettings))\b`, Keyword, nil},
- {`\b([<>]=|<>|<|>)\b?`, Operator, nil},
- {`\b(\-|\+|\/|\*)\b`, Operator, nil},
- {`\s*(\:=|\+=|-=|\/=|\*=)\s*?`, Operator, nil},
- {`\b(?i:(ADD|ADDFIRST|ADDLAST|ADDAFTER|ADDBEFORE|ACTION|ACTIONS|AREA|ASSEMBLY|CHARTPART|CUEGROUP|CUSTOMIZES|COLUMN|DATAITEM|DATASET|ELEMENTS|EXTENDS|FIELD|FIELDGROUP|FIELDATTRIBUTE|FIELDELEMENT|FIELDGROUPS|FIELDS|FILTER|FIXED|GRID|GROUP|MOVEAFTER|MOVEBEFORE|KEY|KEYS|LABEL|LABELS|LAYOUT|MODIFY|MOVEFIRST|MOVELAST|MOVEBEFORE|MOVEAFTER|PART|REPEATER|USERCONTROL|REQUESTPAGE|SCHEMA|SEPARATOR|SYSTEMPART|TABLEELEMENT|TEXTATTRIBUTE|TEXTELEMENT|TYPE))\b`, Keyword, nil},
- {`\s*[(\.\.)&\|]\s*`, Operator, nil},
- {`\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b`, LiteralNumber, nil},
- {`[;:,]`, Punctuation, nil},
- {`#[ \t]*(if|else|elif|endif|define|undef|region|endregion|pragma)\b.*?\n`, CommentPreproc, nil},
- {`\w+`, Text, nil},
- {`.`, Text, nil},
- },
- }
-}
diff --git a/lexers/a/angular2.go b/lexers/a/angular2.go
deleted file mode 100644
index a947eda..0000000
--- a/lexers/a/angular2.go
+++ /dev/null
@@ -1,46 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Angular2 lexer.
-var Angular2 = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Angular2",
- Aliases: []string{"ng2"},
- Filenames: []string{},
- MimeTypes: []string{},
- },
- angular2Rules,
-))
-
-func angular2Rules() Rules {
- return 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/lexers/a/antlr.go b/lexers/a/antlr.go
deleted file mode 100644
index c744353..0000000
--- a/lexers/a/antlr.go
+++ /dev/null
@@ -1,105 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// ANTLR lexer.
-var ANTLR = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "ANTLR",
- Aliases: []string{"antlr"},
- Filenames: []string{},
- MimeTypes: []string{},
- },
- antlrRules,
-))
-
-func antlrRules() Rules {
- return 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/lexers/a/apache.go b/lexers/a/apache.go
deleted file mode 100644
index 5685eb1..0000000
--- a/lexers/a/apache.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Apacheconf lexer.
-var Apacheconf = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "ApacheConf",
- Aliases: []string{"apacheconf", "aconf", "apache"},
- Filenames: []string{".htaccess", "apache.conf", "apache2.conf"},
- MimeTypes: []string{"text/x-apacheconf"},
- CaseInsensitive: true,
- },
- apacheconfRules,
-))
-
-func apacheconfRules() Rules {
- return 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/lexers/a/apl.go b/lexers/a/apl.go
deleted file mode 100644
index f929d2e..0000000
--- a/lexers/a/apl.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Apl lexer.
-var Apl = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "APL",
- Aliases: []string{"apl"},
- Filenames: []string{"*.apl"},
- MimeTypes: []string{},
- },
- aplRules,
-))
-
-func aplRules() Rules {
- return 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/lexers/a/applescript.go b/lexers/a/applescript.go
deleted file mode 100644
index b6a53c5..0000000
--- a/lexers/a/applescript.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Applescript lexer.
-var Applescript = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "AppleScript",
- Aliases: []string{"applescript"},
- Filenames: []string{"*.applescript"},
- MimeTypes: []string{},
- DotAll: true,
- },
- applescriptRules,
-))
-
-func applescriptRules() Rules {
- return 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|with|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/lexers/a/arduino.go b/lexers/a/arduino.go
deleted file mode 100644
index 0edbe3f..0000000
--- a/lexers/a/arduino.go
+++ /dev/null
@@ -1,114 +0,0 @@
-package a
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Arduino lexer.
-var Arduino = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Arduino",
- Aliases: []string{"arduino"},
- Filenames: []string{"*.ino"},
- MimeTypes: []string{"text/x-arduino"},
- EnsureNL: true,
- },
- arduinoRules,
-))
-
-func arduinoRules() Rules {
- return 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)\b`, 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|_Complex|_Imaginary|array|atomic_bool|atomic_char|atomic_int|atomic_llong|atomic_long|atomic_schar|atomic_short|atomic_uchar|atomic_uint|atomic_ullong|atomic_ulong|atomic_ushort|auto|bool|boolean|BooleanVariables|Byte|byte|Char|char|char16_t|char32_t|class|complex|Const|const|const_cast|delete|double|dynamic_cast|enum|explicit|extern|Float|float|friend|inline|Int|int|int16_t|int32_t|int64_t|int8_t|Long|long|new|NULL|null|operator|private|PROGMEM|protected|public|register|reinterpret_cast|short|signed|sizeof|Static|static|static_cast|String|struct|typedef|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|virtual|Void|void|Volatile|volatile|word)\b`, KeywordType, nil},
- // Start of: Arduino-specific syntax
- {`(and|final|If|Loop|loop|not|or|override|setup|Setup|throw|try|xor)\b`, Keyword, nil}, // Addition to keywords already defined by C++
- {`(ANALOG_MESSAGE|BIN|CHANGE|DEC|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FALLING|FIRMATA_STRING|HALF_PI|HEX|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL1V1|INTERNAL2V56|INTERNAL2V56|LED_BUILTIN|LED_BUILTIN_RX|LED_BUILTIN_TX|LOW|LSBFIRST|MSBFIRST|OCT|OUTPUT|PI|REPORT_ANALOG|REPORT_DIGITAL|RISING|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET|TWO_PI)\b`, KeywordConstant, nil},
- {`(boolean|const|byte|word|string|String|array)\b`, NameVariable, nil},
- {`(Keyboard|KeyboardController|MouseController|SoftwareSerial|EthernetServer|EthernetClient|LiquidCrystal|RobotControl|GSMVoiceCall|EthernetUDP|EsploraTFT|HttpClient|RobotMotor|WiFiClient|GSMScanner|FileSystem|Scheduler|GSMServer|YunClient|YunServer|IPAddress|GSMClient|GSMModem|Keyboard|Ethernet|Console|GSMBand|Esplora|Stepper|Process|WiFiUDP|GSM_SMS|Mailbox|USBHost|Firmata|PImage|Client|Server|GSMPIN|FileIO|Bridge|Serial|EEPROM|Stream|Mouse|Audio|Servo|File|Task|GPRS|WiFi|Wire|TFT|GSM|SPI|SD)\b`, NameClass, nil},
- {`(abs|Abs|accept|ACos|acos|acosf|addParameter|analogRead|AnalogRead|analogReadResolution|AnalogReadResolution|analogReference|AnalogReference|analogWrite|AnalogWrite|analogWriteResolution|AnalogWriteResolution|answerCall|asin|ASin|asinf|atan|ATan|atan2|ATan2|atan2f|atanf|attach|attached|attachGPRS|attachInterrupt|AttachInterrupt|autoscroll|available|availableForWrite|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|Bit|BitClear|bitClear|bitRead|BitRead|bitSet|BitSet|BitWrite|bitWrite|blink|blinkVersion|BSSID|buffer|byte|cbrt|cbrtf|Ceil|ceil|ceilf|changePIN|char|charAt|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compareTo|compassRead|concat|config|connect|connected|constrain|Constrain|copysign|copysignf|cos|Cos|cosf|cosh|coshf|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|degrees|Delay|delay|DelayMicroseconds|delayMicroseconds|detach|DetachInterrupt|detachInterrupt|DigitalPinToInterrupt|digitalPinToInterrupt|DigitalRead|digitalRead|DigitalWrite|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endsWith|endTransmission|endWrite|equals|equalsIgnoreCase|exists|exitValue|Exp|exp|expf|fabs|fabsf|fdim|fdimf|fill|find|findUntil|float|floor|Floor|floorf|flush|fma|fmaf|fmax|fmaxf|fmin|fminf|fmod|fmodf|gatewayIP|get|getAsynchronously|getBand|getButton|getBytes|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|HighByte|home|hypot|hypotf|image|indexOf|int|interrupts|IPAddress|IRread|isActionDone|isAlpha|isAlphaNumeric|isAscii|isControl|isDigit|isDirectory|isfinite|isGraph|isHexadecimalDigit|isinf|isListening|isLowerCase|isnan|isPIN|isPressed|isPrintable|isPunct|isSpace|isUpperCase|isValid|isWhitespace|keyboardRead|keyPressed|keyReleased|knobRead|lastIndexOf|ldexp|ldexpf|leftToRight|length|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|log|Log|log10|log10f|logf|long|lowByte|LowByte|lrint|lrintf|lround|lroundf|macAddress|maintain|map|Map|Max|max|messageAvailable|Micros|micros|millis|Millis|Min|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|NoInterrupts|noListenOnLocalhost|noStroke|noTone|NoTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|PinMode|pinMode|playFile|playMelody|point|pointTo|position|Pow|pow|powf|prepare|press|print|printFirmwareVersion|println|printVersion|process|processInput|PulseIn|pulseIn|pulseInLong|PulseInLong|put|radians|random|Random|randomSeed|RandomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|replace|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|round|roundf|RSSI|run|runAsynchronously|running|runShellCommand|runShellCommandAsynchronously|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|Serial_Available|Serial_Begin|Serial_End|Serial_Flush|Serial_Peek|Serial_Print|Serial_Println|Serial_Read|serialEvent|setBand|setBitOrder|setCharAt|setClockDivider|setCursor|setDataMode|setDNS|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|ShiftIn|shiftIn|ShiftOut|shiftOut|shutdown|signbit|sin|Sin|sinf|sinh|sinhf|size|sizeof|Sq|sq|Sqrt|sqrt|sqrtf|SSID|startLoop|startsWith|step|stop|stroke|subnetMask|substring|switchPIN|tan|Tan|tanf|tanh|tanhf|tempoWrite|text|toCharArray|toInt|toLowerCase|tone|Tone|toUpperCase|transfer|trim|trunc|truncf|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|WiFiServer|word|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRed|writeRGB|yield|Yield)\b`, NameFunction, nil},
- // End of: Arduino-specific syntax
- {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.*?(?+*%\^/!=|])=?`, Operator, Push("slashstartsregex")},
- {`[{(\[;,]`, Punctuation, Push("slashstartsregex")},
- {`[})\].]`, Punctuation, nil},
- {`(break|continue|do|while|exit|for|if|else|return|switch|case|default)\b`, Keyword, Push("slashstartsregex")},
- {`function\b`, KeywordDeclaration, Push("slashstartsregex")},
- {`(atan2|cos|exp|int|log|rand|sin|sqrt|srand|gensub|gsub|index|length|match|split|patsplit|sprintf|sub|substr|tolower|toupper|close|fflush|getline|next(file)|print|printf|strftime|systime|mktime|delete|system|strtonum|and|compl|lshift|or|rshift|asorti?|isarray|bindtextdomain|dcn?gettext|@(include|load|namespace))\b`, KeywordReserved, nil},
- {`(ARGC|ARGIND|ARGV|BEGIN(FILE)?|BINMODE|CONVFMT|ENVIRON|END(FILE)?|ERRNO|FIELDWIDTHS|FILENAME|FNR|FPAT|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS|PROCINFO|RLENGTH|RS|RSTART|RT|SUBSEP|TEXTDOMAIN)\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/lexers/b/ballerina.go b/lexers/b/ballerina.go
deleted file mode 100644
index d8916d0..0000000
--- a/lexers/b/ballerina.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package b
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Ballerina lexer.
-var Ballerina = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Ballerina",
- Aliases: []string{"ballerina"},
- Filenames: []string{"*.bal"},
- MimeTypes: []string{"text/x-ballerina"},
- DotAll: true,
- },
- ballerinaRules,
-))
-
-func ballerinaRules() Rules {
- return Rules{
- "root": {
- {`[^\S\n]+`, Text, nil},
- {`//.*?\n`, CommentSingle, nil},
- {`/\*.*?\*/`, CommentMultiline, nil},
- {`(break|catch|continue|done|else|finally|foreach|forever|fork|if|lock|match|return|throw|transaction|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},
- {`(annotation|bind|but|endpoint|error|function|object|private|public|returns|service|type|var|with|worker)\b`, KeywordDeclaration, nil},
- {`(boolean|byte|decimal|float|int|json|map|nil|record|string|table|xml)\b`, KeywordType, nil},
- {`(true|false|null)\b`, KeywordConstant, nil},
- {`(import)(\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},
- },
- "import": {
- {`[\w.]+`, NameNamespace, Pop(1)},
- },
- }
-}
diff --git a/lexers/b/bash.go b/lexers/b/bash.go
deleted file mode 100644
index 34b1e22..0000000
--- a/lexers/b/bash.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package b
-
-import (
- "regexp"
-
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// TODO(moorereason): can this be factored away?
-var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:env |)(?:bash|zsh|sh|ksh)`)
-
-// Bash lexer.
-var Bash = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Bash",
- Aliases: []string{"bash", "sh", "ksh", "zsh", "shell"},
- Filenames: []string{"*.sh", "*.ksh", "*.bash", "*.ebuild", "*.eclass", ".env", "*.env", "*.exheres-0", "*.exlib", "*.zsh", "*.zshrc", ".bashrc", "bashrc", ".bash_*", "bash_*", "zshrc", ".zshrc", "PKGBUILD"},
- MimeTypes: []string{"application/x-sh", "application/x-shellscript"},
- },
- bashRules,
-).SetAnalyser(func(text string) float32 {
- if bashAnalyserRe.FindString(text) != "" {
- return 1.0
- }
- return 0.0
-}))
-
-func bashRules() Rules {
- return 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},
- {`#.*(\S|$)`, 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+(?= |$)`, 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"),
- },
- }
-}
diff --git a/lexers/b/batch.go b/lexers/b/batch.go
deleted file mode 100644
index f7a8677..0000000
--- a/lexers/b/batch.go
+++ /dev/null
@@ -1,198 +0,0 @@
-package b
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Batchfile lexer.
-var Batchfile = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Batchfile",
- Aliases: []string{"bat", "batch", "dosbatch", "winbatch"},
- Filenames: []string{"*.bat", "*.cmd"},
- MimeTypes: []string{"application/x-dos-batch"},
- CaseInsensitive: true,
- },
- batchfileRules,
-))
-
-func batchfileRules() Rules {
- return 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/lexers/b/bibtex.go b/lexers/b/bibtex.go
deleted file mode 100644
index d6a0ae3..0000000
--- a/lexers/b/bibtex.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package b
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Bibtex lexer.
-var Bibtex = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "BibTeX",
- Aliases: []string{"bib", "bibtex"},
- Filenames: []string{"*.bib"},
- MimeTypes: []string{"text/x-bibtex"},
- NotMultiline: true,
- CaseInsensitive: true,
- },
- bibtexRules,
-))
-
-func bibtexRules() Rules {
- return Rules{
- "root": {
- Include("whitespace"),
- {`@comment`, Comment, nil},
- {`@preamble`, NameClass, Push("closing-brace", "value", "opening-brace")},
- {`@string`, NameClass, Push("closing-brace", "field", "opening-brace")},
- {"@[a-z_@!$&*+\\-./:;<>?\\[\\\\\\]^`|~][\\w@!$&*+\\-./:;<>?\\[\\\\\\]^`|~]*", NameClass, Push("closing-brace", "command-body", "opening-brace")},
- {`.+`, Comment, nil},
- },
- "opening-brace": {
- Include("whitespace"),
- {`[{(]`, Punctuation, Pop(1)},
- },
- "closing-brace": {
- Include("whitespace"),
- {`[})]`, Punctuation, Pop(1)},
- },
- "command-body": {
- Include("whitespace"),
- {`[^\s\,\}]+`, NameLabel, Push("#pop", "fields")},
- },
- "fields": {
- Include("whitespace"),
- {`,`, Punctuation, Push("field")},
- Default(Pop(1)),
- },
- "field": {
- Include("whitespace"),
- {"[a-z_@!$&*+\\-./:;<>?\\[\\\\\\]^`|~][\\w@!$&*+\\-./:;<>?\\[\\\\\\]^`|~]*", NameAttribute, Push("value", "=")},
- Default(Pop(1)),
- },
- "=": {
- Include("whitespace"),
- {`=`, Punctuation, Pop(1)},
- },
- "value": {
- Include("whitespace"),
- {"[a-z_@!$&*+\\-./:;<>?\\[\\\\\\]^`|~][\\w@!$&*+\\-./:;<>?\\[\\\\\\]^`|~]*", NameVariable, nil},
- {`"`, LiteralString, Push("quoted-string")},
- {`\{`, LiteralString, Push("braced-string")},
- {`[\d]+`, LiteralNumber, nil},
- {`#`, Punctuation, nil},
- Default(Pop(1)),
- },
- "quoted-string": {
- {`\{`, LiteralString, Push("braced-string")},
- {`"`, LiteralString, Pop(1)},
- {`[^\{\"]+`, LiteralString, nil},
- },
- "braced-string": {
- {`\{`, LiteralString, Push()},
- {`\}`, LiteralString, Pop(1)},
- {`[^\{\}]+`, LiteralString, nil},
- },
- "whitespace": {
- {`\s+`, Text, nil},
- },
- }
-}
diff --git a/lexers/b/bicep.go b/lexers/b/bicep.go
deleted file mode 100644
index ec136fb..0000000
--- a/lexers/b/bicep.go
+++ /dev/null
@@ -1,112 +0,0 @@
-package b
-
-import (
- "strings"
-
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Bicep lexer.
-var Bicep = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Bicep",
- Aliases: []string{"bicep"},
- Filenames: []string{"*.bicep"},
- },
- bicepRules,
-))
-
-func bicepRules() Rules {
- bicepFunctions := []string{
- "any",
- "array",
- "concat",
- "contains",
- "empty",
- "first",
- "intersection",
- "items",
- "last",
- "length",
- "min",
- "max",
- "range",
- "skip",
- "take",
- "union",
- "dateTimeAdd",
- "utcNow",
- "deployment",
- "environment",
- "loadFileAsBase64",
- "loadTextContent",
- "int",
- "json",
- "extensionResourceId",
- "getSecret",
- "list",
- "listKeys",
- "listKeyValue",
- "listAccountSas",
- "listSecrets",
- "pickZones",
- "reference",
- "resourceId",
- "subscriptionResourceId",
- "tenantResourceId",
- "managementGroup",
- "resourceGroup",
- "subscription",
- "tenant",
- "base64",
- "base64ToJson",
- "base64ToString",
- "dataUri",
- "dataUriToString",
- "endsWith",
- "format",
- "guid",
- "indexOf",
- "lastIndexOf",
- "length",
- "newGuid",
- "padLeft",
- "replace",
- "split",
- "startsWith",
- "string",
- "substring",
- "toLower",
- "toUpper",
- "trim",
- "uniqueString",
- "uri",
- "uriComponent",
- "uriComponentToString",
- }
-
- return Rules{
- "root": {
- {`//[^\n\r]+`, CommentSingle, nil},
- {`/\*.*?\*/`, CommentMultiline, nil},
- {`([']?\w+[']?)(:)`, ByGroups(NameProperty, Punctuation), nil},
- {`\b('(resourceGroup|subscription|managementGroup|tenant)')\b`, KeywordNamespace, nil},
- {`'[\w\$\{\(\)\}\.]{1,}?'`, LiteralStringInterpol, nil},
- {`('''|').*?('''|')`, LiteralString, nil},
- {`\b(allowed|batchSize|description|maxLength|maxValue|metadata|minLength|minValue|secure)\b`, NameDecorator, nil},
- {`\b(az|sys)\.`, NameNamespace, nil},
- {`\b(` + strings.Join(bicepFunctions, "|") + `)\b`, NameFunction, nil},
- // https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-logical
- {`\b(bool)(\()`, ByGroups(NameFunction, Punctuation), nil},
- {`\b(for|if|in)\b`, Keyword, nil},
- {`\b(module|output|param|resource|var)\b`, KeywordDeclaration, nil},
- {`\b(array|bool|int|object|string)\b`, KeywordType, nil},
- // https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/operators
- {`(>=|>|<=|<|==|!=|=~|!~|::|&&|\?\?|!|-|%|\*|\/|\+)`, Operator, nil},
- {`[\(\)\[\]\.:\?{}@=]`, Punctuation, nil},
- {`[\w_-]+`, Text, nil},
- {`\s+`, TextWhitespace, nil},
- },
- }
-}
diff --git a/lexers/b/blitz.go b/lexers/b/blitz.go
deleted file mode 100644
index 119f96b..0000000
--- a/lexers/b/blitz.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package b
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Blitzbasic lexer.
-var Blitzbasic = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "BlitzBasic",
- Aliases: []string{"blitzbasic", "b3d", "bplus"},
- Filenames: []string{"*.bb", "*.decls"},
- MimeTypes: []string{"text/x-bb"},
- CaseInsensitive: true,
- },
- blitzbasicRules,
-))
-
-func blitzbasicRules() Rules {
- return 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/lexers/b/bnf.go b/lexers/b/bnf.go
deleted file mode 100644
index dcf7360..0000000
--- a/lexers/b/bnf.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package b
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Bnf lexer.
-var Bnf = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "BNF",
- Aliases: []string{"bnf"},
- Filenames: []string{"*.bnf"},
- MimeTypes: []string{"text/x-bnf"},
- },
- bnfRules,
-))
-
-func bnfRules() Rules {
- return Rules{
- "root": {
- {`(<)([ -;=?-~]+)(>)`, ByGroups(Punctuation, NameClass, Punctuation), nil},
- {`::=`, Operator, nil},
- {`[^<>:]+`, Text, nil},
- {`.`, Text, nil},
- },
- }
-}
diff --git a/lexers/b/brainfuck.go b/lexers/b/brainfuck.go
deleted file mode 100644
index d35e9c6..0000000
--- a/lexers/b/brainfuck.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package b
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Brainfuck lexer.
-var Brainfuck = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Brainfuck",
- Aliases: []string{"brainfuck", "bf"},
- Filenames: []string{"*.bf", "*.b"},
- MimeTypes: []string{"application/x-brainfuck"},
- },
- brainfuckRules,
-))
-
-func brainfuckRules() Rules {
- return 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/lexers/bash.go b/lexers/bash.go
new file mode 100644
index 0000000..1ea30f2
--- /dev/null
+++ b/lexers/bash.go
@@ -0,0 +1,17 @@
+package lexers
+
+import (
+ "regexp"
+)
+
+// TODO(moorereason): can this be factored away?
+var bashAnalyserRe = regexp.MustCompile(`(?m)^#!.*/bin/(?:env |)(?:bash|zsh|sh|ksh)`)
+
+func init() { // nolint: gochecknoinits
+ Get("bash").SetAnalyser(func(text string) float32 {
+ if bashAnalyserRe.FindString(text) != "" {
+ return 1.0
+ }
+ return 0.0
+ })
+}
diff --git a/lexers/b/bashsession.go b/lexers/bashsession.go
similarity index 68%
rename from lexers/b/bashsession.go
rename to lexers/bashsession.go
index 055cbb3..bea9393 100644
--- a/lexers/b/bashsession.go
+++ b/lexers/bashsession.go
@@ -1,12 +1,11 @@
-package b
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// BashSession lexer.
-var BashSession = internal.Register(MustNewLazyLexer(
+var BashSession = Register(MustNewLexer(
&Config{
Name: "BashSession",
Aliases: []string{"bash-session", "console", "shell-session"},
@@ -20,7 +19,7 @@ var BashSession = internal.Register(MustNewLazyLexer(
func bashsessionRules() Rules {
return Rules{
"root": {
- {`^((?:\[[^]]+@[^]]+\]\s?)?[#$%>])(\s*)(.*\n?)`, ByGroups(GenericPrompt, Text, Using(Bash)), nil},
+ {`^((?:\[[^]]+@[^]]+\]\s?)?[#$%>])(\s*)(.*\n?)`, ByGroups(GenericPrompt, Text, Using("Bash")), nil},
{`^.+\n?`, GenericOutput, nil},
},
}
diff --git a/lexers/c/c.go b/lexers/c/c.go
deleted file mode 100644
index 3698c4f..0000000
--- a/lexers/c/c.go
+++ /dev/null
@@ -1,96 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// C lexer.
-var C = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "C",
- Aliases: []string{"c"},
- Filenames: []string{"*.c", "*.h", "*.idc", "*.x[bp]m"},
- MimeTypes: []string{"text/x-chdr", "text/x-csrc", "image/x-xbitmap", "image/x-xpixmap"},
- EnsureNL: true,
- },
- cRules,
-))
-
-func cRules() Rules {
- return 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((8|16|32)_t)?|unsigned|signed|void|u?int(_fast|_least|)(8|16|32|64)_t)\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/lexers/c/cfengine3.go b/lexers/c/cfengine3.go
deleted file mode 100644
index f305034..0000000
--- a/lexers/c/cfengine3.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Cfengine3 lexer.
-var Cfengine3 = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "CFEngine3",
- Aliases: []string{"cfengine3", "cf3"},
- Filenames: []string{"*.cf"},
- MimeTypes: []string{},
- },
- cfengine3Rules,
-))
-
-func cfengine3Rules() Rules {
- return 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/lexers/c/chaiscript.go b/lexers/c/chaiscript.go
deleted file mode 100644
index 58db9aa..0000000
--- a/lexers/c/chaiscript.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Chaiscript lexer.
-var Chaiscript = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "ChaiScript",
- Aliases: []string{"chai", "chaiscript"},
- Filenames: []string{"*.chai"},
- MimeTypes: []string{"text/x-chaiscript", "application/x-chaiscript"},
- DotAll: true,
- },
- chaiscriptRules,
-))
-
-func chaiscriptRules() Rules {
- return 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/lexers/c/clojure.go b/lexers/c/clojure.go
deleted file mode 100644
index f99f906..0000000
--- a/lexers/c/clojure.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Clojure lexer.
-var Clojure = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Clojure",
- Aliases: []string{"clojure", "clj"},
- Filenames: []string{"*.clj"},
- MimeTypes: []string{"text/x-clojure", "application/x-clojure"},
- },
- clojureRules,
-))
-
-func clojureRules() Rules {
- return 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/lexers/c/cmake.go b/lexers/c/cmake.go
deleted file mode 100644
index 0e0708d..0000000
--- a/lexers/c/cmake.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Cmake lexer.
-var Cmake = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "CMake",
- Aliases: []string{"cmake"},
- Filenames: []string{"*.cmake", "CMakeLists.txt"},
- MimeTypes: []string{"text/x-cmake"},
- },
- cmakeRules,
-))
-
-func cmakeRules() Rules {
- return 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/lexers/c/cobol.go b/lexers/c/cobol.go
deleted file mode 100644
index 8b2f6d9..0000000
--- a/lexers/c/cobol.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Cobol lexer.
-var Cobol = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "COBOL",
- Aliases: []string{"cobol"},
- Filenames: []string{"*.cob", "*.COB", "*.cpy", "*.CPY"},
- MimeTypes: []string{"text/x-cobol"},
- CaseInsensitive: true,
- },
- cobolRules,
-))
-
-func cobolRules() Rules {
- return 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/lexers/c/coffee.go b/lexers/c/coffee.go
deleted file mode 100644
index 381a8fe..0000000
--- a/lexers/c/coffee.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Coffeescript lexer.
-var Coffeescript = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "CoffeeScript",
- Aliases: []string{"coffee-script", "coffeescript", "coffee"},
- Filenames: []string{"*.coffee"},
- MimeTypes: []string{"text/coffeescript"},
- NotMultiline: true,
- DotAll: true,
- },
- coffeescriptRules,
-))
-
-func coffeescriptRules() Rules {
- return 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/lexers/c/coq.go b/lexers/c/coq.go
deleted file mode 100644
index e0103ef..0000000
--- a/lexers/c/coq.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Coq lexer.
-var Coq = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Coq",
- Aliases: []string{"coq"},
- Filenames: []string{"*.v"},
- MimeTypes: []string{"text/x-coq"},
- },
- coqRules,
-))
-
-func coqRules() Rules {
- return 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/lexers/c/cpp.go b/lexers/c/cpp.go
deleted file mode 100644
index 3f4a1fd..0000000
--- a/lexers/c/cpp.go
+++ /dev/null
@@ -1,110 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// CPP lexer.
-var CPP = internal.Register(MustNewLazyLexer(
- &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"},
- EnsureNL: true,
- },
- cppRules,
-))
-
-func cppRules() Rules {
- return 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`, `concept`, `requires`, `consteval`, `co_await`, `co_return`, `co_yield`), Keyword, nil},
- {`(enum)\b(\s+)(class)\b(\s*)`, ByGroups(Keyword, Text, Keyword, Text), Push("classname")},
- {`(class|struct|enum|union)\b(\s*)`, ByGroups(Keyword, Text), Push("classname")},
- {`\[\[.+\]\]`, NameAttribute, nil},
- {`(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},
- {`0[xX]([0-9A-Fa-f]('?[0-9A-Fa-f]+)*)[LlUu]*`, LiteralNumberHex, nil},
- {`0('?[0-7]+)+[LlUu]*`, LiteralNumberOct, nil},
- {`0[Bb][01]('?[01]+)*[LlUu]*`, LiteralNumberBin, nil},
- {`[0-9]('?[0-9]+)*[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((8|16|32)_t)?|wchar_t|unsigned|signed|void|u?int(_fast|_least|)(8|16|32|64)_t)\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`, `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": {
- {`(\[\[.+\]\])(\s*)`, ByGroups(NameAttribute, Text), nil},
- {`[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, Push("root")},
- {`[;}]`, 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/lexers/c/csharp.go b/lexers/c/csharp.go
deleted file mode 100644
index 4776864..0000000
--- a/lexers/c/csharp.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// CSharp lexer.
-var CSharp = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "C#",
- Aliases: []string{"csharp", "c#"},
- Filenames: []string{"*.cs"},
- MimeTypes: []string{"text/x-csharp"},
- DotAll: true,
- EnsureNL: true,
- },
- cSharpRules,
-))
-
-func cSharpRules() Rules {
- return Rules{
- "root": {
- {`^\s*\[.*?\]`, NameAttribute, nil},
- {`[^\S\n]+`, Text, nil},
- {`\\\n`, Text, nil},
- {`///[^\n\r]+`, CommentSpecial, nil},
- {`//[^\n\r]+`, CommentSingle, nil},
- {`/[*].*?[*]/`, CommentMultiline, nil},
- {`\n`, Text, nil},
- {`[~!%^&*()+=|\[\]:;,.<>/?-]`, Punctuation, nil},
- {`[{}]`, Punctuation, nil},
- {`@"(""|[^"])*"`, LiteralString, nil},
- {`\$@?"(""|[^"])*"`, LiteralString, nil},
- {`"(\\\\|\\"|[^"\n])*["\n]`, LiteralString, nil},
- {`'\\.'|'[^\\]'`, LiteralStringChar, nil},
- {`0[xX][0-9a-fA-F]+[Ll]?|[0-9_](\.[0-9]*)?([eE][+-]?[0-9]+)?[flFLdD]?`, LiteralNumber, nil},
- {`#[ \t]*(if|endif|else|elif|define|undef|line|error|warning|region|endregion|pragma|nullable)\b[^\n\r]+`, 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|init|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|record|interface)(\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/lexers/c/css.go b/lexers/c/css.go
deleted file mode 100644
index 9f3a01d..0000000
--- a/lexers/c/css.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// CSS lexer.
-var CSS = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "CSS",
- Aliases: []string{"css"},
- Filenames: []string{"*.css"},
- MimeTypes: []string{"text/css"},
- },
- cssRules,
-))
-
-func cssRules() Rules {
- return 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)},
- },
- "atparenthesis": {
- Include("common-values"),
- {`/\*(?:.|\n)*?\*/`, Comment, nil},
- Include("numeric-values"),
- {`[*+/-]`, Operator, nil},
- {`[,]`, Punctuation, nil},
- {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil},
- {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil},
- {`[a-zA-Z_-]\w*`, Name, nil},
- {`\(`, Punctuation, Push("atparenthesis")},
- {`\)`, Punctuation, Pop(1)},
- },
- "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(NameVariable, Text, Punctuation), Push("value-start")},
- {`([a-zA-Z_][\w-]*)(\s*)(\:)`, ByGroups(Name, Text, Punctuation), Push("value-start")},
- {`/\*(?:.|\n)*?\*/`, Comment, nil},
- },
- "value-start": {
- Include("common-values"),
- {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": {
- Include("common-values"),
- {`/\*(?:.|\n)*?\*/`, Comment, nil},
- Include("numeric-values"),
- {`[*+/-]`, Operator, nil},
- {`[,]`, Punctuation, nil},
- {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil},
- {`'(\\\\|\\'|[^'])*'`, LiteralStringSingle, nil},
- {`[a-zA-Z_-]\w*`, Name, nil},
- {`\(`, Punctuation, Push("atparenthesis")},
- {`\)`, Punctuation, Pop(1)},
- },
- "common-values": {
- {`\s+`, Text, nil},
- {Words(``, ``, `-ms-`, `mso-`, `-moz-`, `-o-`, `-xv-`, `-atsc-`, `-wap-`, `-khtml-`, `-webkit-`, `prince-`, `-ah-`, `-hp-`, `-ro-`, `-rim-`, `-tc-`), KeywordPseudo, 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},
- },
- "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/lexers/c/cython.go b/lexers/c/cython.go
deleted file mode 100644
index 0cce204..0000000
--- a/lexers/c/cython.go
+++ /dev/null
@@ -1,139 +0,0 @@
-package c
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Cython lexer.
-var Cython = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Cython",
- Aliases: []string{"cython", "pyx", "pyrex"},
- Filenames: []string{"*.pyx", "*.pxd", "*.pxi"},
- MimeTypes: []string{"text/x-cython", "application/x-cython"},
- },
- cythonRules,
-))
-
-func cythonRules() Rules {
- return 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(`(?`, 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[\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/lexers/c/cl.go b/lexers/cl.go
similarity index 80%
rename from lexers/c/cl.go
rename to lexers/cl.go
index bb16273..3eb0c23 100644
--- a/lexers/c/cl.go
+++ b/lexers/cl.go
@@ -1,8 +1,7 @@
-package c
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
var (
@@ -230,15 +229,9 @@ var (
)
// Common Lisp lexer.
-var CommonLisp = internal.Register(TypeRemappingLexer(MustNewLazyLexer(
- &Config{
- Name: "Common Lisp",
- Aliases: []string{"common-lisp", "cl", "lisp"},
- Filenames: []string{"*.cl", "*.lisp"},
- MimeTypes: []string{"text/x-common-lisp"},
- CaseInsensitive: true,
- },
- commonLispRules,
+var CommonLisp = Register(TypeRemappingLexer(MustNewXMLLexer(
+ embedded,
+ "embedded/common_lisp.xml",
), TypeMapping{
{NameVariable, NameFunction, clBuiltinFunctions},
{NameVariable, Keyword, clSpecialForms},
@@ -248,63 +241,3 @@ var CommonLisp = internal.Register(TypeRemappingLexer(MustNewLazyLexer(
{NameVariable, KeywordType, clBuiltinTypes},
{NameVariable, NameClass, clBuiltinClasses},
}))
-
-func commonLispRules() Rules {
- return 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/lexers/c/cpp_test.go b/lexers/cpp_test.go
similarity index 82%
rename from lexers/c/cpp_test.go
rename to lexers/cpp_test.go
index ef9e41d..16a8ba2 100644
--- a/lexers/c/cpp_test.go
+++ b/lexers/cpp_test.go
@@ -1,12 +1,12 @@
-package c_test
+package lexers_test
import (
"testing"
"github.com/stretchr/testify/assert"
- "github.com/alecthomas/chroma"
- "github.com/alecthomas/chroma/lexers/c"
+ "github.com/alecthomas/chroma/v2"
+ "github.com/alecthomas/chroma/v2/lexers"
)
func TestIssue290(t *testing.T) {
@@ -16,7 +16,7 @@ double b = 0011111111001001100110011001100110011001100110011001100110011010;
double c = 0011111111010011001100110011001100110011001100110011001100110011; // imperfect representation of 0.3
double a + b = 0011111111010011001100110011001100110011001100110011001100110100; // Note that this is not quite equal to the "canonical" 0.3!a
`
- it, err := c.CPP.Tokenise(nil, input)
+ it, err := lexers.GlobalLexerRegistry.Get("C++").Tokenise(nil, input)
assert.NoError(t, err)
for {
token := it()
diff --git a/lexers/c/cql.go b/lexers/cql.go
similarity index 93%
rename from lexers/c/cql.go
rename to lexers/cql.go
index 56de99f..32f7a28 100644
--- a/lexers/c/cql.go
+++ b/lexers/cql.go
@@ -1,12 +1,11 @@
-package c
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// CassandraCQL lexer.
-var CassandraCQL = internal.Register(MustNewLazyLexer(
+var CassandraCQL = Register(MustNewLexer(
&Config{
Name: "Cassandra CQL",
Aliases: []string{"cassandra", "cql"},
@@ -29,12 +28,9 @@ func cassandraCQLRules() Rules {
{"[+*/<>=~!@#%^&|`?-]+", Operator, nil},
{
`(?s)(java|javascript)(\s+)(AS)(\s+)('|\$\$)(.*?)(\5)`,
- UsingByGroup(
- internal.Get,
- 1, 6,
+ UsingByGroup(1, 6,
NameBuiltin, TextWhitespace, Keyword, TextWhitespace,
- LiteralStringHeredoc, LiteralStringHeredoc, LiteralStringHeredoc,
- ),
+ LiteralStringHeredoc, LiteralStringHeredoc, LiteralStringHeredoc),
nil,
},
{`(true|false|null)\b`, KeywordConstant, nil},
diff --git a/lexers/d/d.go b/lexers/d/d.go
deleted file mode 100644
index ac12d2e..0000000
--- a/lexers/d/d.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package d
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// D lexer. https://dlang.org/spec/lex.html
-var D = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "D",
- Aliases: []string{"d"},
- Filenames: []string{"*.d", "*.di"},
- MimeTypes: []string{"text/x-d"},
- EnsureNL: true,
- },
- dRules,
-))
-
-func dRules() Rules {
- return Rules{
- "root": {
- {`[^\S\n]+`, Text, nil},
-
- // https://dlang.org/spec/lex.html#comment
- {`//.*?\n`, CommentSingle, nil},
- {`/\*.*?\*/`, CommentMultiline, nil},
- {`/\+.*?\+/`, CommentMultiline, nil},
-
- // https://dlang.org/spec/lex.html#keywords
- {`(asm|assert|body|break|case|cast|catch|continue|default|debug|delete|deprecated|do|else|finally|for|foreach|foreach_reverse|goto|if|in|invariant|is|macro|mixin|new|out|pragma|return|super|switch|this|throw|try|version|while|with)\b`, Keyword, nil},
- {`__(FILE|FILE_FULL_PATH|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__\b`, NameBuiltin, nil},
- {`__(traits|vector|parameters)\b`, NameBuiltin, nil},
- {`((?:(?:[^\W\d]|\$)[\w.\[\]$<>]*\s+)+?)((?:[^\W\d]|\$)[\w$]*)(\s*)(\()`, ByGroups(UsingSelf("root"), NameFunction, Text, Operator), nil},
-
- // https://dlang.org/spec/attribute.html#uda
- {`@[\w.]*`, NameDecorator, nil},
- {`(abstract|auto|alias|align|const|delegate|enum|export|final|function|inout|lazy|nothrow|override|package|private|protected|public|pure|static|synchronized|template|volatile|__gshared)\b`, KeywordDeclaration, nil},
-
- // https://dlang.org/spec/type.html#basic-data-types
- {`(void|bool|byte|ubyte|short|ushort|int|uint|long|ulong|cent|ucent|float|double|real|ifloat|idouble|ireal|cfloat|cdouble|creal|char|wchar|dchar|string|wstring|dstring)\b`, KeywordType, nil},
- {`(module)(\s+)`, ByGroups(KeywordNamespace, Text), Push("import")},
- {`(true|false|null)\b`, KeywordConstant, nil},
- {`(class|interface|struct|template|union)(\s+)`, ByGroups(KeywordDeclaration, Text), Push("class")},
- {`(import)(\s+)`, ByGroups(KeywordNamespace, Text), Push("import")},
-
- // https://dlang.org/spec/lex.html#string_literals
- // TODO support delimited strings
- {`[qr]?"(\\\\|\\"|[^"])*"[cwd]?`, LiteralString, nil},
- {"(`)([^`]*)(`)[cwd]?", LiteralString, nil},
- {`'\\.'|'[^\\]'|'\\u[0-9a-fA-F]{4}'`, LiteralStringChar, nil},
- {`(\.)((?:[^\W\d]|\$)[\w$]*)`, ByGroups(Operator, NameAttribute), nil},
- {`^\s*([^\W\d]|\$)[\w$]*:`, NameLabel, nil},
-
- // https://dlang.org/spec/lex.html#floatliteral
- {`([0-9][0-9_]*\.([0-9][0-9_]*)?|\.[0-9][0-9_]*)([eE][+\-]?[0-9][0-9_]*)?[fFL]?i?|[0-9][eE][+\-]?[0-9][0-9_]*[fFL]?|[0-9]([eE][+\-]?[0-9][0-9_]*)?[fFL]|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_]*[fFL]?`, LiteralNumberFloat, nil},
- // https://dlang.org/spec/lex.html#integerliteral
- {`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},
- {`([~^*!%&\[\](){}<>|+=:;,./?-]|q{)`, Operator, nil},
- {`([^\W\d]|\$)[\w$]*`, Name, nil},
- {`\n`, Text, nil},
- },
- "class": {
- {`([^\W\d]|\$)[\w$]*`, NameClass, Pop(1)},
- },
- "import": {
- {`[\w.]+\*?`, NameNamespace, Pop(1)},
- },
- }
-}
diff --git a/lexers/d/dart.go b/lexers/d/dart.go
deleted file mode 100644
index c1dbb5c..0000000
--- a/lexers/d/dart.go
+++ /dev/null
@@ -1,95 +0,0 @@
-package d
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Dart lexer.
-var Dart = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Dart",
- Aliases: []string{"dart"},
- Filenames: []string{"*.dart"},
- MimeTypes: []string{"text/x-dart"},
- DotAll: true,
- },
- dartRules,
-))
-
-func dartRules() Rules {
- return Rules{
- "root": {
- Include("string_literal"),
- {`#!(.*?)$`, CommentPreproc, nil},
- {`\b(import|export)\b`, Keyword, Push("import_decl")},
- {`\b(library|source|part of|part)\b`, Keyword, nil},
- {`[^\S\n]+`, Text, nil},
- {`//.*?\n`, CommentSingle, nil},
- {`/\*.*?\*/`, CommentMultiline, nil},
- {`\b(class)\b(\s+)`, ByGroups(KeywordDeclaration, Text), Push("class")},
- {`\b(assert|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|this|throw|try|while)\b`, Keyword, nil},
- {`\b(abstract|async|await|const|extends|factory|final|get|implements|native|operator|set|static|sync|typedef|var|with|yield)\b`, KeywordDeclaration, nil},
- {`\b(bool|double|dynamic|int|num|Object|String|void)\b`, KeywordType, nil},
- {`\b(false|null|true)\b`, KeywordConstant, nil},
- {`[~!%^&*+=|?:<>/-]|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/lexers/d/diff.go b/lexers/d/diff.go
deleted file mode 100644
index d4d6db4..0000000
--- a/lexers/d/diff.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package d
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Diff lexer.
-var Diff = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Diff",
- Aliases: []string{"diff", "udiff"},
- EnsureNL: true,
- Filenames: []string{"*.diff", "*.patch"},
- MimeTypes: []string{"text/x-diff", "text/x-patch"},
- },
- diffRules,
-))
-
-func diffRules() Rules {
- return 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/lexers/d/django.go b/lexers/d/django.go
deleted file mode 100644
index 5d3baa9..0000000
--- a/lexers/d/django.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package d
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Django/Jinja lexer.
-var DjangoJinja = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Django/Jinja",
- Aliases: []string{"django", "jinja"},
- Filenames: []string{},
- MimeTypes: []string{"application/x-django-templating", "application/x-jinja"},
- DotAll: true,
- },
- djangoJinjaRules,
-))
-
-func djangoJinjaRules() Rules {
- return 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/lexers/d/dtd.go b/lexers/d/dtd.go
deleted file mode 100644
index aeec6b1..0000000
--- a/lexers/d/dtd.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package d
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Dtd lexer.
-var Dtd = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "DTD",
- Aliases: []string{"dtd"},
- Filenames: []string{"*.dtd"},
- MimeTypes: []string{"application/xml-dtd"},
- DotAll: true,
- },
- dtdRules,
-))
-
-func dtdRules() Rules {
- return 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/lexers/d/dylan.go b/lexers/d/dylan.go
deleted file mode 100644
index feda748..0000000
--- a/lexers/d/dylan.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package d
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Dylan lexer.
-var Dylan = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Dylan",
- Aliases: []string{"dylan"},
- Filenames: []string{"*.dylan", "*.dyl", "*.intr"},
- MimeTypes: []string{"text/x-dylan"},
- CaseInsensitive: true,
- },
- func() Rules {
- return Rules{
- "root": {
- {`\s+`, Whitespace, nil},
- {`//.*?\n`, CommentSingle, nil},
- {`([a-z0-9-]+:)([ \t]*)(.*(?:\n[ \t].+)*)`, ByGroups(NameAttribute, Whitespace, LiteralString), nil},
- Default(Push("code")),
- },
- "code": {
- {`\s+`, Whitespace, nil},
- {`//.*?\n`, CommentSingle, nil},
- {`/\*`, CommentMultiline, Push("comment")},
- {`"`, LiteralString, Push("string")},
- {`'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\\'\n])'`, LiteralStringChar, nil},
- {`#b[01]+`, LiteralNumberBin, nil},
- {`#o[0-7]+`, LiteralNumberOct, nil},
- {`[-+]?(\d*\.\d+([ed][-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)`, LiteralNumberFloat, nil},
- {`[-+]?\d+`, LiteralNumberInteger, nil},
- {`#x[0-9a-f]+`, LiteralNumberHex, nil},
-
- {`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)(:)(token|name|variable|expression|body|case-body|\*)`,
- ByGroups(Operator, NameVariable, Operator, NameBuiltin), nil},
- {`(\?)(:)(token|name|variable|expression|body|case-body|\*)`,
- ByGroups(Operator, Operator, NameVariable), nil},
- {`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, NameVariable), nil},
-
- {`(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],.;])`, Punctuation, nil},
- {`:=`, Operator, nil},
- {`#[tf]`, Literal, nil},
- {`#"`, LiteralStringSymbol, Push("symbol")},
- {`#[a-z0-9-]+`, Keyword, nil},
- {`#(all-keys|include|key|next|rest)`, Keyword, nil},
- {`[\w!&*<>|^$%@+~?/=-]+:`, KeywordConstant, nil},
- {`<[\w!&*<>|^$%@+~?/=-]+>`, NameClass, nil},
- {`\*[\w!&*<>|^$%@+~?/=-]+\*`, NameVariableGlobal, nil},
- {`\$[\w!&*<>|^$%@+~?/=-]+`, NameConstant, nil},
- {`(let|method|function)([ \t]+)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(NameBuiltin, Whitespace, NameVariable), nil},
- {`(error|signal|return|break)`, NameException, nil},
- {`(\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, Name), nil},
- },
- "comment": {
- {`[^*/]`, CommentMultiline, nil},
- {`/\*`, CommentMultiline, Push()},
- {`\*/`, CommentMultiline, Pop(1)},
- {`[*/]`, CommentMultiline, nil},
- },
- "symbol": {
- {`"`, LiteralStringSymbol, Pop(1)},
- {`[^\\"]+`, LiteralStringSymbol, nil},
- },
- "string": {
- {`"`, LiteralString, Pop(1)},
- {`\\([\\abfnrtv"\']|x[a-f0-9]{2,4}|[0-7]{1,3})`, LiteralStringEscape, nil},
- {`[^\\"\n]+`, LiteralString, nil},
- {`\\\n`, LiteralString, nil},
- {`\\`, LiteralString, nil},
- },
- }
- },
-))
diff --git a/lexers/d/docker.go b/lexers/docker.go
similarity index 61%
rename from lexers/d/docker.go
rename to lexers/docker.go
index ea808f0..e14654a 100644
--- a/lexers/d/docker.go
+++ b/lexers/docker.go
@@ -1,14 +1,11 @@
-package d
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/b"
- "github.com/alecthomas/chroma/lexers/internal"
- "github.com/alecthomas/chroma/lexers/j"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// Docker lexer.
-var Docker = internal.Register(MustNewLazyLexer(
+var Docker = Register(MustNewLexer(
&Config{
Name: "Docker",
Aliases: []string{"docker", "dockerfile"},
@@ -23,13 +20,13 @@ func dockerRules() Rules {
return Rules{
"root": {
{`#.*`, Comment, nil},
- {`(ONBUILD)((?:\s*\\?\s*))`, ByGroups(Keyword, Using(b.Bash)), nil},
- {`(HEALTHCHECK)(((?:\s*\\?\s*)--\w+=\w+(?:\s*\\?\s*))*)`, ByGroups(Keyword, Using(b.Bash)), nil},
- {`(VOLUME|ENTRYPOINT|CMD|SHELL)((?:\s*\\?\s*))(\[.*?\])`, ByGroups(Keyword, Using(b.Bash), Using(j.JSON)), nil},
- {`(LABEL|ENV|ARG)((?:(?:\s*\\?\s*)\w+=\w+(?:\s*\\?\s*))*)`, ByGroups(Keyword, Using(b.Bash)), nil},
+ {`(ONBUILD)((?:\s*\\?\s*))`, ByGroups(Keyword, Using("Bash")), nil},
+ {`(HEALTHCHECK)(((?:\s*\\?\s*)--\w+=\w+(?:\s*\\?\s*))*)`, ByGroups(Keyword, Using("Bash")), nil},
+ {`(VOLUME|ENTRYPOINT|CMD|SHELL)((?:\s*\\?\s*))(\[.*?\])`, ByGroups(Keyword, Using("Bash"), Using("JSON")), nil},
+ {`(LABEL|ENV|ARG)((?:(?:\s*\\?\s*)\w+=\w+(?:\s*\\?\s*))*)`, ByGroups(Keyword, Using("Bash")), nil},
{`((?:FROM|MAINTAINER|EXPOSE|WORKDIR|USER|STOPSIGNAL)|VOLUME)\b(.*)`, ByGroups(Keyword, LiteralString), nil},
{`((?:RUN|CMD|ENTRYPOINT|ENV|ARG|LABEL|ADD|COPY))`, Keyword, nil},
- {`(.*\\\n)*.+`, Using(b.Bash), nil},
+ {`(.*\\\n)*.+`, Using("Bash"), nil},
},
}
}
diff --git a/lexers/e/ebnf.go b/lexers/e/ebnf.go
deleted file mode 100644
index 5ccdd38..0000000
--- a/lexers/e/ebnf.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package e
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Ebnf lexer.
-var Ebnf = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "EBNF",
- Aliases: []string{"ebnf"},
- Filenames: []string{"*.ebnf"},
- MimeTypes: []string{"text/x-ebnf"},
- },
- ebnfRules,
-))
-
-func ebnfRules() Rules {
- return 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/lexers/e/elixir.go b/lexers/e/elixir.go
deleted file mode 100644
index f283f84..0000000
--- a/lexers/e/elixir.go
+++ /dev/null
@@ -1,281 +0,0 @@
-package e
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Elixir lexer.
-var Elixir = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Elixir",
- Aliases: []string{"elixir", "ex", "exs"},
- Filenames: []string{"*.ex", "*.exs"},
- MimeTypes: []string{"text/x-elixir"},
- },
- elixirRules,
-))
-
-func elixirRules() Rules {
- return 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},
- {`(fn|do|end|after|else|rescue|catch)\b`, Keyword, nil},
- {`(not|and|or|when|in)\b`, OperatorWord, nil},
- {`(case|cond|for|if|unless|try|receive|raise|quote|unquote|unquote_splicing|throw|super|while)\b`, Keyword, nil},
- {`(def|defp|defmodule|defprotocol|defmacro|defmacrop|defdelegate|defexception|defstruct|defimpl|defcallback)\b`, KeywordDeclaration, nil},
- {`(import|require|use|alias)\b`, KeywordNamespace, nil},
- {`(nil|true|false)\b`, NameConstant, nil},
- {`(_|__MODULE__|__DIR__|__ENV__|__CALLER__)\b`, NamePseudo, 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](_?[01])*`, LiteralNumberBin, nil},
- {`0o[0-7](_?[0-7])*`, LiteralNumberOct, nil},
- {`0x[\da-fA-F](_?[\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/lexers/e/elm.go b/lexers/e/elm.go
deleted file mode 100644
index 0fb6689..0000000
--- a/lexers/e/elm.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package e
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Elm lexer.
-var Elm = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Elm",
- Aliases: []string{"elm"},
- Filenames: []string{"*.elm"},
- MimeTypes: []string{"text/x-elm"},
- },
- elmRules,
-))
-
-func elmRules() Rules {
- return 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/lexers/e/erlang.go b/lexers/e/erlang.go
deleted file mode 100644
index 5f5c9ca..0000000
--- a/lexers/e/erlang.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package e
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Erlang lexer.
-var Erlang = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Erlang",
- Aliases: []string{"erlang"},
- Filenames: []string{"*.erl", "*.hrl", "*.es", "*.escript"},
- MimeTypes: []string{"text/x-erlang"},
- },
- erlangRules,
-))
-
-func erlangRules() Rules {
- return 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/lexers/e/emacs.go b/lexers/emacs.go
similarity index 92%
rename from lexers/e/emacs.go
rename to lexers/emacs.go
index 51c4910..869b0f3 100644
--- a/lexers/e/emacs.go
+++ b/lexers/emacs.go
@@ -1,8 +1,7 @@
-package e
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
var (
@@ -522,14 +521,9 @@ var (
)
// EmacsLisp lexer.
-var EmacsLisp = internal.Register(TypeRemappingLexer(MustNewLazyLexer(
- &Config{
- Name: "EmacsLisp",
- Aliases: []string{"emacs", "elisp", "emacs-lisp"},
- Filenames: []string{"*.el"},
- MimeTypes: []string{"text/x-elisp", "application/x-elisp"},
- },
- emacsLispRules,
+var EmacsLisp = Register(TypeRemappingLexer(MustNewXMLLexer(
+ embedded,
+ "embedded/emacslisp.xml",
), TypeMapping{
{NameVariable, NameFunction, emacsBuiltinFunction},
{NameVariable, NameBuiltin, emacsSpecialForms},
@@ -537,50 +531,3 @@ var EmacsLisp = internal.Register(TypeRemappingLexer(MustNewLazyLexer(
{NameVariable, NameBuiltin, append(emacsBuiltinFunctionHighlighted, emacsMacros...)},
{NameVariable, KeywordPseudo, emacsLambdaListKeywords},
}))
-
-func emacsLispRules() Rules {
- return 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)},
- },
- }
-}
diff --git a/lexers/embedded/abap.xml b/lexers/embedded/abap.xml
new file mode 100644
index 0000000..e8140b7
--- /dev/null
+++ b/lexers/embedded/abap.xml
@@ -0,0 +1,154 @@
+
+
+ ABAP
+ abap
+ *.abap
+ *.ABAP
+ text/x-abap
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/abnf.xml b/lexers/embedded/abnf.xml
new file mode 100644
index 0000000..3ffd51c
--- /dev/null
+++ b/lexers/embedded/abnf.xml
@@ -0,0 +1,66 @@
+
+
+ ABNF
+ abnf
+ *.abnf
+ text/x-abnf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/actionscript.xml b/lexers/embedded/actionscript.xml
new file mode 100644
index 0000000..d6727a1
--- /dev/null
+++ b/lexers/embedded/actionscript.xml
@@ -0,0 +1,68 @@
+
+
+ ActionScript
+ as
+ actionscript
+ *.as
+ application/x-actionscript
+ text/x-actionscript
+ text/actionscript
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/actionscript_3.xml b/lexers/embedded/actionscript_3.xml
new file mode 100644
index 0000000..e5f6538
--- /dev/null
+++ b/lexers/embedded/actionscript_3.xml
@@ -0,0 +1,163 @@
+
+
+ ActionScript 3
+ as3
+ actionscript3
+ *.as
+ application/x-actionscript3
+ text/x-actionscript3
+ text/actionscript3
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/ada.xml b/lexers/embedded/ada.xml
new file mode 100644
index 0000000..5854a20
--- /dev/null
+++ b/lexers/embedded/ada.xml
@@ -0,0 +1,321 @@
+
+
+ Ada
+ ada
+ ada95
+ ada2005
+ *.adb
+ *.ads
+ *.ada
+ text/x-ada
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/al.xml b/lexers/embedded/al.xml
new file mode 100644
index 0000000..30bad5a
--- /dev/null
+++ b/lexers/embedded/al.xml
@@ -0,0 +1,75 @@
+
+
+ AL
+ al
+ *.al
+ *.dal
+ text/x-al
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/angular2.xml b/lexers/embedded/angular2.xml
new file mode 100644
index 0000000..84fe20b
--- /dev/null
+++ b/lexers/embedded/angular2.xml
@@ -0,0 +1,108 @@
+
+
+ Angular2
+ ng2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/antlr.xml b/lexers/embedded/antlr.xml
new file mode 100644
index 0000000..e57edd4
--- /dev/null
+++ b/lexers/embedded/antlr.xml
@@ -0,0 +1,317 @@
+
+
+ ANTLR
+ antlr
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/apacheconf.xml b/lexers/embedded/apacheconf.xml
new file mode 100644
index 0000000..7643541
--- /dev/null
+++ b/lexers/embedded/apacheconf.xml
@@ -0,0 +1,74 @@
+
+
+ ApacheConf
+ apacheconf
+ aconf
+ apache
+ .htaccess
+ apache.conf
+ apache2.conf
+ text/x-apacheconf
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/apl.xml b/lexers/embedded/apl.xml
new file mode 100644
index 0000000..959448c
--- /dev/null
+++ b/lexers/embedded/apl.xml
@@ -0,0 +1,59 @@
+
+
+ APL
+ apl
+ *.apl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/applescript.xml b/lexers/embedded/applescript.xml
new file mode 100644
index 0000000..1de6c67
--- /dev/null
+++ b/lexers/embedded/applescript.xml
@@ -0,0 +1,130 @@
+
+
+ AppleScript
+ applescript
+ *.applescript
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/arduino.xml b/lexers/embedded/arduino.xml
new file mode 100644
index 0000000..00399c2
--- /dev/null
+++ b/lexers/embedded/arduino.xml
@@ -0,0 +1,309 @@
+
+
+ Arduino
+ arduino
+ *.ino
+ text/x-arduino
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/armasm.xml b/lexers/embedded/armasm.xml
new file mode 100644
index 0000000..e5966cf
--- /dev/null
+++ b/lexers/embedded/armasm.xml
@@ -0,0 +1,126 @@
+
+
+ ArmAsm
+ armasm
+ *.s
+ *.S
+ text/x-armasm
+ text/x-asm
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/awk.xml b/lexers/embedded/awk.xml
new file mode 100644
index 0000000..07476ff
--- /dev/null
+++ b/lexers/embedded/awk.xml
@@ -0,0 +1,95 @@
+
+
+ Awk
+ awk
+ gawk
+ mawk
+ nawk
+ *.awk
+ application/x-awk
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/ballerina.xml b/lexers/embedded/ballerina.xml
new file mode 100644
index 0000000..d13c123
--- /dev/null
+++ b/lexers/embedded/ballerina.xml
@@ -0,0 +1,97 @@
+
+
+ Ballerina
+ ballerina
+ *.bal
+ text/x-ballerina
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/bash.xml b/lexers/embedded/bash.xml
new file mode 100644
index 0000000..10c8dbe
--- /dev/null
+++ b/lexers/embedded/bash.xml
@@ -0,0 +1,217 @@
+
+
+ Bash
+ bash
+ sh
+ ksh
+ zsh
+ shell
+ *.sh
+ *.ksh
+ *.bash
+ *.ebuild
+ *.eclass
+ .env
+ *.env
+ *.exheres-0
+ *.exlib
+ *.zsh
+ *.zshrc
+ .bashrc
+ bashrc
+ .bash_*
+ bash_*
+ zshrc
+ .zshrc
+ PKGBUILD
+ application/x-sh
+ application/x-shellscript
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/batchfile.xml b/lexers/embedded/batchfile.xml
new file mode 100644
index 0000000..d3e0627
--- /dev/null
+++ b/lexers/embedded/batchfile.xml
@@ -0,0 +1,660 @@
+
+
+ Batchfile
+ bat
+ batch
+ dosbatch
+ winbatch
+ *.bat
+ *.cmd
+ application/x-dos-batch
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/bibtex.xml b/lexers/embedded/bibtex.xml
new file mode 100644
index 0000000..8fde161
--- /dev/null
+++ b/lexers/embedded/bibtex.xml
@@ -0,0 +1,152 @@
+
+
+ BibTeX
+ bib
+ bibtex
+ *.bib
+ text/x-bibtex
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/bicep.xml b/lexers/embedded/bicep.xml
new file mode 100644
index 0000000..1efc9c8
--- /dev/null
+++ b/lexers/embedded/bicep.xml
@@ -0,0 +1,68 @@
+
+
+ Bicep
+ bicep
+ *.bicep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/blitzbasic.xml b/lexers/embedded/blitzbasic.xml
new file mode 100644
index 0000000..591b1ad
--- /dev/null
+++ b/lexers/embedded/blitzbasic.xml
@@ -0,0 +1,141 @@
+
+
+ BlitzBasic
+ blitzbasic
+ b3d
+ bplus
+ *.bb
+ *.decls
+ text/x-bb
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/bnf.xml b/lexers/embedded/bnf.xml
new file mode 100644
index 0000000..5c98424
--- /dev/null
+++ b/lexers/embedded/bnf.xml
@@ -0,0 +1,28 @@
+
+
+ BNF
+ bnf
+ *.bnf
+ text/x-bnf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/brainfuck.xml b/lexers/embedded/brainfuck.xml
new file mode 100644
index 0000000..4c84c33
--- /dev/null
+++ b/lexers/embedded/brainfuck.xml
@@ -0,0 +1,51 @@
+
+
+ Brainfuck
+ brainfuck
+ bf
+ *.bf
+ *.b
+ application/x-brainfuck
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/c++.xml b/lexers/embedded/c++.xml
new file mode 100644
index 0000000..e8702c5
--- /dev/null
+++ b/lexers/embedded/c++.xml
@@ -0,0 +1,326 @@
+
+
+ C++
+ cpp
+ c++
+ *.cpp
+ *.hpp
+ *.c++
+ *.h++
+ *.cc
+ *.hh
+ *.cxx
+ *.hxx
+ *.C
+ *.H
+ *.cp
+ *.CPP
+ text/x-c++hdr
+ text/x-c++src
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/c.xml b/lexers/embedded/c.xml
new file mode 100644
index 0000000..d63d9b7
--- /dev/null
+++ b/lexers/embedded/c.xml
@@ -0,0 +1,253 @@
+
+
+ C
+ c
+ *.c
+ *.h
+ *.idc
+ *.x[bp]m
+ text/x-chdr
+ text/x-csrc
+ image/x-xbitmap
+ image/x-xpixmap
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/cap_n_proto.xml b/lexers/embedded/cap_n_proto.xml
new file mode 100644
index 0000000..3e7d147
--- /dev/null
+++ b/lexers/embedded/cap_n_proto.xml
@@ -0,0 +1,122 @@
+
+
+ Cap'n Proto
+ capnp
+ *.capnp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/ceylon.xml b/lexers/embedded/ceylon.xml
new file mode 100644
index 0000000..4c41218
--- /dev/null
+++ b/lexers/embedded/ceylon.xml
@@ -0,0 +1,151 @@
+
+
+ Ceylon
+ ceylon
+ *.ceylon
+ text/x-ceylon
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/cfengine3.xml b/lexers/embedded/cfengine3.xml
new file mode 100644
index 0000000..537a6cd
--- /dev/null
+++ b/lexers/embedded/cfengine3.xml
@@ -0,0 +1,157 @@
+
+
+ CFEngine3
+ cfengine3
+ cf3
+ *.cf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/cfstatement.xml b/lexers/embedded/cfstatement.xml
new file mode 100644
index 0000000..46a84cf
--- /dev/null
+++ b/lexers/embedded/cfstatement.xml
@@ -0,0 +1,92 @@
+
+
+ cfstatement
+ cfs
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/chaiscript.xml b/lexers/embedded/chaiscript.xml
new file mode 100644
index 0000000..860439a
--- /dev/null
+++ b/lexers/embedded/chaiscript.xml
@@ -0,0 +1,134 @@
+
+
+ ChaiScript
+ chai
+ chaiscript
+ *.chai
+ text/x-chaiscript
+ application/x-chaiscript
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/clojure.xml b/lexers/embedded/clojure.xml
new file mode 100644
index 0000000..ee83a6a
--- /dev/null
+++ b/lexers/embedded/clojure.xml
@@ -0,0 +1,68 @@
+
+
+ Clojure
+ clojure
+ clj
+ *.clj
+ text/x-clojure
+ application/x-clojure
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/cmake.xml b/lexers/embedded/cmake.xml
new file mode 100644
index 0000000..b041cfd
--- /dev/null
+++ b/lexers/embedded/cmake.xml
@@ -0,0 +1,90 @@
+
+
+ CMake
+ cmake
+ *.cmake
+ CMakeLists.txt
+ text/x-cmake
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/cobol.xml b/lexers/embedded/cobol.xml
new file mode 100644
index 0000000..a8a8029
--- /dev/null
+++ b/lexers/embedded/cobol.xml
@@ -0,0 +1,90 @@
+
+
+ COBOL
+ cobol
+ *.cob
+ *.COB
+ *.cpy
+ *.CPY
+ text/x-cobol
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/coffeescript.xml b/lexers/embedded/coffeescript.xml
new file mode 100644
index 0000000..e29722f
--- /dev/null
+++ b/lexers/embedded/coffeescript.xml
@@ -0,0 +1,210 @@
+
+
+ CoffeeScript
+ coffee-script
+ coffeescript
+ coffee
+ *.coffee
+ text/coffeescript
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/common_lisp.xml b/lexers/embedded/common_lisp.xml
new file mode 100644
index 0000000..0fb9a7a
--- /dev/null
+++ b/lexers/embedded/common_lisp.xml
@@ -0,0 +1,184 @@
+
+
+ Common Lisp
+ common-lisp
+ cl
+ lisp
+ *.cl
+ *.lisp
+ text/x-common-lisp
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/coq.xml b/lexers/embedded/coq.xml
new file mode 100644
index 0000000..62f64ff
--- /dev/null
+++ b/lexers/embedded/coq.xml
@@ -0,0 +1,136 @@
+
+
+ Coq
+ coq
+ *.v
+ text/x-coq
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/crystal.xml b/lexers/embedded/crystal.xml
new file mode 100644
index 0000000..94853db
--- /dev/null
+++ b/lexers/embedded/crystal.xml
@@ -0,0 +1,762 @@
+
+
+ Crystal
+ cr
+ crystal
+ *.cr
+ text/x-crystal
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/csharp.xml b/lexers/embedded/csharp.xml
new file mode 100644
index 0000000..e194d48
--- /dev/null
+++ b/lexers/embedded/csharp.xml
@@ -0,0 +1,115 @@
+
+
+ C#
+ csharp
+ c#
+ *.cs
+ text/x-csharp
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/css.xml b/lexers/embedded/css.xml
new file mode 100644
index 0000000..0faa06e
--- /dev/null
+++ b/lexers/embedded/css.xml
@@ -0,0 +1,323 @@
+
+
+ CSS
+ css
+ *.css
+ text/css
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/cython.xml b/lexers/embedded/cython.xml
new file mode 100644
index 0000000..15dfe4d
--- /dev/null
+++ b/lexers/embedded/cython.xml
@@ -0,0 +1,372 @@
+
+
+ Cython
+ cython
+ pyx
+ pyrex
+ *.pyx
+ *.pxd
+ *.pxi
+ text/x-cython
+ application/x-cython
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/d.xml b/lexers/embedded/d.xml
new file mode 100644
index 0000000..49d7843
--- /dev/null
+++ b/lexers/embedded/d.xml
@@ -0,0 +1,130 @@
+
+
+ D
+ d
+ *.d
+ *.di
+ text/x-d
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/dart.xml b/lexers/embedded/dart.xml
new file mode 100644
index 0000000..9fef38d
--- /dev/null
+++ b/lexers/embedded/dart.xml
@@ -0,0 +1,213 @@
+
+
+ Dart
+ dart
+ *.dart
+ text/x-dart
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/diff.xml b/lexers/embedded/diff.xml
new file mode 100644
index 0000000..c10963e
--- /dev/null
+++ b/lexers/embedded/diff.xml
@@ -0,0 +1,40 @@
+
+
+ Diff
+ diff
+ udiff
+ *.diff
+ *.patch
+ text/x-diff
+ text/x-patch
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/django_jinja.xml b/lexers/embedded/django_jinja.xml
new file mode 100644
index 0000000..3c97c22
--- /dev/null
+++ b/lexers/embedded/django_jinja.xml
@@ -0,0 +1,153 @@
+
+
+ Django/Jinja
+ django
+ jinja
+ application/x-django-templating
+ application/x-jinja
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/dtd.xml b/lexers/embedded/dtd.xml
new file mode 100644
index 0000000..0edbbde
--- /dev/null
+++ b/lexers/embedded/dtd.xml
@@ -0,0 +1,168 @@
+
+
+ DTD
+ dtd
+ *.dtd
+ application/xml-dtd
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/dylan.xml b/lexers/embedded/dylan.xml
new file mode 100644
index 0000000..3660d14
--- /dev/null
+++ b/lexers/embedded/dylan.xml
@@ -0,0 +1,176 @@
+
+
+ Dylan
+ dylan
+ *.dylan
+ *.dyl
+ *.intr
+ text/x-dylan
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/ebnf.xml b/lexers/embedded/ebnf.xml
new file mode 100644
index 0000000..df5d62f
--- /dev/null
+++ b/lexers/embedded/ebnf.xml
@@ -0,0 +1,90 @@
+
+
+ EBNF
+ ebnf
+ *.ebnf
+ text/x-ebnf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/elixir.xml b/lexers/embedded/elixir.xml
new file mode 100644
index 0000000..a3308d6
--- /dev/null
+++ b/lexers/embedded/elixir.xml
@@ -0,0 +1,743 @@
+
+
+ Elixir
+ elixir
+ ex
+ exs
+ *.ex
+ *.exs
+ text/x-elixir
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/elm.xml b/lexers/embedded/elm.xml
new file mode 100644
index 0000000..ed65efc
--- /dev/null
+++ b/lexers/embedded/elm.xml
@@ -0,0 +1,119 @@
+
+
+ Elm
+ elm
+ *.elm
+ text/x-elm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/emacslisp.xml b/lexers/embedded/emacslisp.xml
new file mode 100644
index 0000000..668bc62
--- /dev/null
+++ b/lexers/embedded/emacslisp.xml
@@ -0,0 +1,132 @@
+
+
+ EmacsLisp
+ emacs
+ elisp
+ emacs-lisp
+ *.el
+ text/x-elisp
+ application/x-elisp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/erlang.xml b/lexers/embedded/erlang.xml
new file mode 100644
index 0000000..b186588
--- /dev/null
+++ b/lexers/embedded/erlang.xml
@@ -0,0 +1,166 @@
+
+
+ Erlang
+ erlang
+ *.erl
+ *.hrl
+ *.es
+ *.escript
+ text/x-erlang
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/factor.xml b/lexers/embedded/factor.xml
new file mode 100644
index 0000000..4743b9a
--- /dev/null
+++ b/lexers/embedded/factor.xml
@@ -0,0 +1,412 @@
+
+
+ Factor
+ factor
+ *.factor
+ text/x-factor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/fennel.xml b/lexers/embedded/fennel.xml
new file mode 100644
index 0000000..b9b6d59
--- /dev/null
+++ b/lexers/embedded/fennel.xml
@@ -0,0 +1,68 @@
+
+
+ Fennel
+ fennel
+ fnl
+ *.fennel
+ text/x-fennel
+ application/x-fennel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/fish.xml b/lexers/embedded/fish.xml
new file mode 100644
index 0000000..deb7814
--- /dev/null
+++ b/lexers/embedded/fish.xml
@@ -0,0 +1,159 @@
+
+
+ Fish
+ fish
+ fishshell
+ *.fish
+ *.load
+ application/x-fish
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/forth.xml b/lexers/embedded/forth.xml
new file mode 100644
index 0000000..31096a2
--- /dev/null
+++ b/lexers/embedded/forth.xml
@@ -0,0 +1,78 @@
+
+
+ Forth
+ forth
+ *.frt
+ *.fth
+ *.fs
+ application/x-forth
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/fortran.xml b/lexers/embedded/fortran.xml
new file mode 100644
index 0000000..012808b
--- /dev/null
+++ b/lexers/embedded/fortran.xml
@@ -0,0 +1,82 @@
+
+
+ Fortran
+ fortran
+ *.f03
+ *.f90
+ *.F03
+ *.F90
+ text/x-fortran
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/fsharp.xml b/lexers/embedded/fsharp.xml
new file mode 100644
index 0000000..f1601bc
--- /dev/null
+++ b/lexers/embedded/fsharp.xml
@@ -0,0 +1,245 @@
+
+
+ FSharp
+ fsharp
+ *.fs
+ *.fsi
+ text/x-fsharp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/gas.xml b/lexers/embedded/gas.xml
new file mode 100644
index 0000000..1ef31de
--- /dev/null
+++ b/lexers/embedded/gas.xml
@@ -0,0 +1,121 @@
+
+
+ GAS
+ gas
+ asm
+ *.s
+ *.S
+ text/x-gas
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/gdscript.xml b/lexers/embedded/gdscript.xml
new file mode 100644
index 0000000..fb75fc8
--- /dev/null
+++ b/lexers/embedded/gdscript.xml
@@ -0,0 +1,265 @@
+
+
+ GDScript
+ gdscript
+ gd
+ *.gd
+ text/x-gdscript
+ application/x-gdscript
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/gherkin.xml b/lexers/embedded/gherkin.xml
new file mode 100644
index 0000000..c53a2cb
--- /dev/null
+++ b/lexers/embedded/gherkin.xml
@@ -0,0 +1,263 @@
+
+
+ Gherkin
+ cucumber
+ Cucumber
+ gherkin
+ Gherkin
+ *.feature
+ *.FEATURE
+ text/x-gherkin
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/glsl.xml b/lexers/embedded/glsl.xml
new file mode 100644
index 0000000..ca0b696
--- /dev/null
+++ b/lexers/embedded/glsl.xml
@@ -0,0 +1,65 @@
+
+
+ GLSL
+ glsl
+ *.vert
+ *.frag
+ *.geo
+ text/x-glslsrc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/gnuplot.xml b/lexers/embedded/gnuplot.xml
new file mode 100644
index 0000000..ee6a245
--- /dev/null
+++ b/lexers/embedded/gnuplot.xml
@@ -0,0 +1,289 @@
+
+
+ Gnuplot
+ gnuplot
+ *.plot
+ *.plt
+ text/x-gnuplot
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/go_template.xml b/lexers/embedded/go_template.xml
new file mode 100644
index 0000000..a293330
--- /dev/null
+++ b/lexers/embedded/go_template.xml
@@ -0,0 +1,112 @@
+
+
+ Go HTML Template
+ go-html-template
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/graphql.xml b/lexers/embedded/graphql.xml
new file mode 100644
index 0000000..b062273
--- /dev/null
+++ b/lexers/embedded/graphql.xml
@@ -0,0 +1,88 @@
+
+
+ GraphQL
+ graphql
+ graphqls
+ gql
+ *.graphql
+ *.graphqls
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/groff.xml b/lexers/embedded/groff.xml
new file mode 100644
index 0000000..3af0a43
--- /dev/null
+++ b/lexers/embedded/groff.xml
@@ -0,0 +1,90 @@
+
+
+ Groff
+ groff
+ nroff
+ man
+ *.[1-9]
+ *.1p
+ *.3pm
+ *.man
+ application/x-troff
+ text/troff
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/groovy.xml b/lexers/embedded/groovy.xml
new file mode 100644
index 0000000..0dd7b82
--- /dev/null
+++ b/lexers/embedded/groovy.xml
@@ -0,0 +1,135 @@
+
+
+ Groovy
+ groovy
+ *.groovy
+ *.gradle
+ text/x-groovy
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/handlebars.xml b/lexers/embedded/handlebars.xml
new file mode 100644
index 0000000..7cf2a64
--- /dev/null
+++ b/lexers/embedded/handlebars.xml
@@ -0,0 +1,147 @@
+
+
+ Handlebars
+ handlebars
+ hbs
+ *.handlebars
+ *.hbs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/haskell.xml b/lexers/embedded/haskell.xml
new file mode 100644
index 0000000..6dc6912
--- /dev/null
+++ b/lexers/embedded/haskell.xml
@@ -0,0 +1,272 @@
+
+
+ Haskell
+ haskell
+ hs
+ *.hs
+ text/x-haskell
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/hcl.xml b/lexers/embedded/hcl.xml
new file mode 100644
index 0000000..d3ed208
--- /dev/null
+++ b/lexers/embedded/hcl.xml
@@ -0,0 +1,143 @@
+
+
+ HCL
+ hcl
+ *.hcl
+ application/x-hcl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/hexdump.xml b/lexers/embedded/hexdump.xml
new file mode 100644
index 0000000..a6f28ea
--- /dev/null
+++ b/lexers/embedded/hexdump.xml
@@ -0,0 +1,189 @@
+
+
+ Hexdump
+ hexdump
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/hlb.xml b/lexers/embedded/hlb.xml
new file mode 100644
index 0000000..64e667d
--- /dev/null
+++ b/lexers/embedded/hlb.xml
@@ -0,0 +1,149 @@
+
+
+ HLB
+ hlb
+ *.hlb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/hy.xml b/lexers/embedded/hy.xml
new file mode 100644
index 0000000..a0dae46
--- /dev/null
+++ b/lexers/embedded/hy.xml
@@ -0,0 +1,104 @@
+
+
+ Hy
+ hylang
+ *.hy
+ text/x-hy
+ application/x-hy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/idris.xml b/lexers/embedded/idris.xml
new file mode 100644
index 0000000..9592d88
--- /dev/null
+++ b/lexers/embedded/idris.xml
@@ -0,0 +1,216 @@
+
+
+ Idris
+ idris
+ idr
+ *.idr
+ text/x-idris
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/igor.xml b/lexers/embedded/igor.xml
new file mode 100644
index 0000000..1cc0205
--- /dev/null
+++ b/lexers/embedded/igor.xml
@@ -0,0 +1,47 @@
+
+
+ Igor
+ igor
+ igorpro
+ *.ipf
+ text/ipf
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/ini.xml b/lexers/embedded/ini.xml
new file mode 100644
index 0000000..88a742b
--- /dev/null
+++ b/lexers/embedded/ini.xml
@@ -0,0 +1,40 @@
+
+
+ INI
+ ini
+ cfg
+ dosini
+ *.ini
+ *.cfg
+ *.inf
+ .gitconfig
+ .editorconfig
+ text/x-ini
+ text/inf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/io.xml b/lexers/embedded/io.xml
new file mode 100644
index 0000000..9ad94fa
--- /dev/null
+++ b/lexers/embedded/io.xml
@@ -0,0 +1,71 @@
+
+
+ Io
+ io
+ *.io
+ text/x-iosrc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/j.xml b/lexers/embedded/j.xml
new file mode 100644
index 0000000..872d081
--- /dev/null
+++ b/lexers/embedded/j.xml
@@ -0,0 +1,157 @@
+
+
+ J
+ j
+ *.ijs
+ text/x-j
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/java.xml b/lexers/embedded/java.xml
new file mode 100644
index 0000000..715f043
--- /dev/null
+++ b/lexers/embedded/java.xml
@@ -0,0 +1,118 @@
+
+
+ Java
+ java
+ *.java
+ text/x-java
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/javascript.xml b/lexers/embedded/javascript.xml
new file mode 100644
index 0000000..f8e7b1b
--- /dev/null
+++ b/lexers/embedded/javascript.xml
@@ -0,0 +1,159 @@
+
+
+ JavaScript
+ js
+ javascript
+ *.js
+ *.jsm
+ *.mjs
+ application/javascript
+ application/x-javascript
+ text/x-javascript
+ text/javascript
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/json.xml b/lexers/embedded/json.xml
new file mode 100644
index 0000000..bbe10b1
--- /dev/null
+++ b/lexers/embedded/json.xml
@@ -0,0 +1,110 @@
+
+
+ JSON
+ json
+ *.json
+ application/json
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/julia.xml b/lexers/embedded/julia.xml
new file mode 100644
index 0000000..776dcdb
--- /dev/null
+++ b/lexers/embedded/julia.xml
@@ -0,0 +1,400 @@
+
+
+ Julia
+ julia
+ jl
+ *.jl
+ text/x-julia
+ application/x-julia
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/jungle.xml b/lexers/embedded/jungle.xml
new file mode 100644
index 0000000..92c785d
--- /dev/null
+++ b/lexers/embedded/jungle.xml
@@ -0,0 +1,98 @@
+
+
+ Jungle
+ jungle
+ *.jungle
+ text/x-jungle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/kotlin.xml b/lexers/embedded/kotlin.xml
new file mode 100644
index 0000000..3091822
--- /dev/null
+++ b/lexers/embedded/kotlin.xml
@@ -0,0 +1,220 @@
+
+
+ Kotlin
+ kotlin
+ *.kt
+ text/x-kotlin
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/lighttpd.xml b/lexers/embedded/lighttpd.xml
new file mode 100644
index 0000000..1319e5c
--- /dev/null
+++ b/lexers/embedded/lighttpd.xml
@@ -0,0 +1,42 @@
+
+
+ Lighttpd configuration file
+ lighty
+ lighttpd
+ text/x-lighttpd-conf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/llvm.xml b/lexers/embedded/llvm.xml
new file mode 100644
index 0000000..f24f152
--- /dev/null
+++ b/lexers/embedded/llvm.xml
@@ -0,0 +1,73 @@
+
+
+ LLVM
+ llvm
+ *.ll
+ text/x-llvm
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/lua.xml b/lexers/embedded/lua.xml
new file mode 100644
index 0000000..903d458
--- /dev/null
+++ b/lexers/embedded/lua.xml
@@ -0,0 +1,158 @@
+
+
+ Lua
+ lua
+ *.lua
+ *.wlua
+ text/x-lua
+ application/x-lua
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/mathematica.xml b/lexers/embedded/mathematica.xml
new file mode 100644
index 0000000..5f57470
--- /dev/null
+++ b/lexers/embedded/mathematica.xml
@@ -0,0 +1,56 @@
+
+
+ Mathematica
+ mathematica
+ mma
+ nb
+ *.nb
+ *.cdf
+ *.nbp
+ *.ma
+ application/mathematica
+ application/vnd.wolfram.mathematica
+ application/vnd.wolfram.mathematica.package
+ application/vnd.wolfram.cdf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/matlab.xml b/lexers/embedded/matlab.xml
new file mode 100644
index 0000000..ebb4e2c
--- /dev/null
+++ b/lexers/embedded/matlab.xml
@@ -0,0 +1,114 @@
+
+
+ Matlab
+ matlab
+ *.m
+ text/matlab
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/mcfunction.xml b/lexers/embedded/mcfunction.xml
new file mode 100644
index 0000000..b1ff183
--- /dev/null
+++ b/lexers/embedded/mcfunction.xml
@@ -0,0 +1,182 @@
+
+
+ mcfunction
+ mcfunction
+ *.mcfunction
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/meson.xml b/lexers/embedded/meson.xml
new file mode 100644
index 0000000..130047d
--- /dev/null
+++ b/lexers/embedded/meson.xml
@@ -0,0 +1,85 @@
+
+
+ Meson
+ meson
+ meson.build
+ meson.build
+ meson_options.txt
+ text/x-meson
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/metal.xml b/lexers/embedded/metal.xml
new file mode 100644
index 0000000..62d04ba
--- /dev/null
+++ b/lexers/embedded/metal.xml
@@ -0,0 +1,270 @@
+
+
+ Metal
+ metal
+ *.metal
+ text/x-metal
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/minizinc.xml b/lexers/embedded/minizinc.xml
new file mode 100644
index 0000000..1ad6860
--- /dev/null
+++ b/lexers/embedded/minizinc.xml
@@ -0,0 +1,82 @@
+
+
+ MiniZinc
+ minizinc
+ MZN
+ mzn
+ *.mzn
+ *.dzn
+ *.fzn
+ text/minizinc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/mlir.xml b/lexers/embedded/mlir.xml
new file mode 100644
index 0000000..025c3dc
--- /dev/null
+++ b/lexers/embedded/mlir.xml
@@ -0,0 +1,73 @@
+
+
+ MLIR
+ mlir
+ *.mlir
+ text/x-mlir
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/modula-2.xml b/lexers/embedded/modula-2.xml
new file mode 100644
index 0000000..0bf37bc
--- /dev/null
+++ b/lexers/embedded/modula-2.xml
@@ -0,0 +1,245 @@
+
+
+ Modula-2
+ modula2
+ m2
+ *.def
+ *.mod
+ text/x-modula2
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/monkeyc.xml b/lexers/embedded/monkeyc.xml
new file mode 100644
index 0000000..7445a63
--- /dev/null
+++ b/lexers/embedded/monkeyc.xml
@@ -0,0 +1,153 @@
+
+
+ MonkeyC
+ monkeyc
+ *.mc
+ text/x-monkeyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/morrowindscript.xml b/lexers/embedded/morrowindscript.xml
new file mode 100644
index 0000000..724a19f
--- /dev/null
+++ b/lexers/embedded/morrowindscript.xml
@@ -0,0 +1,90 @@
+
+
+ MorrowindScript
+ morrowind
+ mwscript
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/mysql.xml b/lexers/embedded/mysql.xml
new file mode 100644
index 0000000..b6c2046
--- /dev/null
+++ b/lexers/embedded/mysql.xml
@@ -0,0 +1,121 @@
+
+
+ MySQL
+ mysql
+ mariadb
+ *.sql
+ text/x-mysql
+ text/x-mariadb
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/nasm.xml b/lexers/embedded/nasm.xml
new file mode 100644
index 0000000..a6107b5
--- /dev/null
+++ b/lexers/embedded/nasm.xml
@@ -0,0 +1,124 @@
+
+
+ NASM
+ nasm
+ *.asm
+ *.ASM
+ text/x-nasm
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/newspeak.xml b/lexers/embedded/newspeak.xml
new file mode 100644
index 0000000..b932657
--- /dev/null
+++ b/lexers/embedded/newspeak.xml
@@ -0,0 +1,121 @@
+
+
+ Newspeak
+ newspeak
+ *.ns2
+ text/x-newspeak
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/nginx.xml b/lexers/embedded/nginx.xml
new file mode 100644
index 0000000..46bdf57
--- /dev/null
+++ b/lexers/embedded/nginx.xml
@@ -0,0 +1,98 @@
+
+
+ Nginx configuration file
+ nginx
+ nginx.conf
+ text/x-nginx-conf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/nim.xml b/lexers/embedded/nim.xml
new file mode 100644
index 0000000..a1bfcf7
--- /dev/null
+++ b/lexers/embedded/nim.xml
@@ -0,0 +1,207 @@
+
+
+ Nim
+ nim
+ nimrod
+ *.nim
+ *.nimrod
+ text/x-nim
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/nix.xml b/lexers/embedded/nix.xml
new file mode 100644
index 0000000..0ed040c
--- /dev/null
+++ b/lexers/embedded/nix.xml
@@ -0,0 +1,258 @@
+
+
+ Nix
+ nixos
+ nix
+ *.nix
+ text/x-nix
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/objective-c.xml b/lexers/embedded/objective-c.xml
new file mode 100644
index 0000000..0dc9328
--- /dev/null
+++ b/lexers/embedded/objective-c.xml
@@ -0,0 +1,510 @@
+
+
+ Objective-C
+ objective-c
+ objectivec
+ obj-c
+ objc
+ *.m
+ *.h
+ text/x-objective-c
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/ocaml.xml b/lexers/embedded/ocaml.xml
new file mode 100644
index 0000000..77f67ac
--- /dev/null
+++ b/lexers/embedded/ocaml.xml
@@ -0,0 +1,145 @@
+
+
+ OCaml
+ ocaml
+ *.ml
+ *.mli
+ *.mll
+ *.mly
+ text/x-ocaml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/octave.xml b/lexers/embedded/octave.xml
new file mode 100644
index 0000000..0515d28
--- /dev/null
+++ b/lexers/embedded/octave.xml
@@ -0,0 +1,101 @@
+
+
+ Octave
+ octave
+ *.m
+ text/octave
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/onesenterprise.xml b/lexers/embedded/onesenterprise.xml
new file mode 100644
index 0000000..530bad7
--- /dev/null
+++ b/lexers/embedded/onesenterprise.xml
@@ -0,0 +1,92 @@
+
+
+ OnesEnterprise
+ ones
+ onesenterprise
+ 1S
+ 1S:Enterprise
+ *.EPF
+ *.epf
+ *.ERF
+ *.erf
+ application/octet-stream
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/openscad.xml b/lexers/embedded/openscad.xml
new file mode 100644
index 0000000..84d0fe1
--- /dev/null
+++ b/lexers/embedded/openscad.xml
@@ -0,0 +1,96 @@
+
+
+ OpenSCAD
+ openscad
+ *.scad
+ text/x-scad
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/pacmanconf.xml b/lexers/embedded/pacmanconf.xml
new file mode 100644
index 0000000..caf7236
--- /dev/null
+++ b/lexers/embedded/pacmanconf.xml
@@ -0,0 +1,37 @@
+
+
+ PacmanConf
+ pacmanconf
+ pacman.conf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/perl.xml b/lexers/embedded/perl.xml
new file mode 100644
index 0000000..8ac02ab
--- /dev/null
+++ b/lexers/embedded/perl.xml
@@ -0,0 +1,400 @@
+
+
+ Perl
+ perl
+ pl
+ *.pl
+ *.pm
+ *.t
+ text/x-perl
+ application/x-perl
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/php.xml b/lexers/embedded/php.xml
new file mode 100644
index 0000000..69e9e85
--- /dev/null
+++ b/lexers/embedded/php.xml
@@ -0,0 +1,211 @@
+
+
+ PHP
+ php
+ php3
+ php4
+ php5
+ *.php
+ *.php[345]
+ *.inc
+ text/x-php
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/pig.xml b/lexers/embedded/pig.xml
new file mode 100644
index 0000000..5acd773
--- /dev/null
+++ b/lexers/embedded/pig.xml
@@ -0,0 +1,105 @@
+
+
+ Pig
+ pig
+ *.pig
+ text/x-pig
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/pkgconfig.xml b/lexers/embedded/pkgconfig.xml
new file mode 100644
index 0000000..875dcba
--- /dev/null
+++ b/lexers/embedded/pkgconfig.xml
@@ -0,0 +1,73 @@
+
+
+ PkgConfig
+ pkgconfig
+ *.pc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/pl_pgsql.xml b/lexers/embedded/pl_pgsql.xml
new file mode 100644
index 0000000..e3e813a
--- /dev/null
+++ b/lexers/embedded/pl_pgsql.xml
@@ -0,0 +1,119 @@
+
+
+ PL/pgSQL
+ plpgsql
+ text/x-plpgsql
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/plutus_core.xml b/lexers/embedded/plutus_core.xml
new file mode 100644
index 0000000..4ff5a97
--- /dev/null
+++ b/lexers/embedded/plutus_core.xml
@@ -0,0 +1,105 @@
+
+
+ Plutus Core
+ plutus-core
+ plc
+ *.plc
+ text/x-plutus-core
+ application/x-plutus-core
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/pony.xml b/lexers/embedded/pony.xml
new file mode 100644
index 0000000..4efa9db
--- /dev/null
+++ b/lexers/embedded/pony.xml
@@ -0,0 +1,135 @@
+
+
+ Pony
+ pony
+ *.pony
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/postscript.xml b/lexers/embedded/postscript.xml
new file mode 100644
index 0000000..15a3422
--- /dev/null
+++ b/lexers/embedded/postscript.xml
@@ -0,0 +1,89 @@
+
+
+ PostScript
+ postscript
+ postscr
+ *.ps
+ *.eps
+ application/postscript
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/povray.xml b/lexers/embedded/povray.xml
new file mode 100644
index 0000000..f37dab9
--- /dev/null
+++ b/lexers/embedded/povray.xml
@@ -0,0 +1,58 @@
+
+
+ POVRay
+ pov
+ *.pov
+ *.inc
+ text/x-povray
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/powerquery.xml b/lexers/embedded/powerquery.xml
new file mode 100644
index 0000000..0ff1e35
--- /dev/null
+++ b/lexers/embedded/powerquery.xml
@@ -0,0 +1,51 @@
+
+
+ PowerQuery
+ powerquery
+ pq
+ *.pq
+ text/x-powerquery
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/powershell.xml b/lexers/embedded/powershell.xml
new file mode 100644
index 0000000..d7bd02a
--- /dev/null
+++ b/lexers/embedded/powershell.xml
@@ -0,0 +1,150 @@
+
+
+ PowerShell
+ powershell
+ posh
+ ps1
+ psm1
+ psd1
+ *.ps1
+ *.psm1
+ *.psd1
+ text/x-powershell
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/prolog.xml b/lexers/embedded/prolog.xml
new file mode 100644
index 0000000..391bae3
--- /dev/null
+++ b/lexers/embedded/prolog.xml
@@ -0,0 +1,115 @@
+
+
+ Prolog
+ prolog
+ *.ecl
+ *.prolog
+ *.pro
+ *.pl
+ text/x-prolog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/promql.xml b/lexers/embedded/promql.xml
new file mode 100644
index 0000000..e95e333
--- /dev/null
+++ b/lexers/embedded/promql.xml
@@ -0,0 +1,123 @@
+
+
+ PromQL
+ promql
+ *.promql
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/protobuf.xml b/lexers/embedded/protobuf.xml
new file mode 100644
index 0000000..98ae7c8
--- /dev/null
+++ b/lexers/embedded/protobuf.xml
@@ -0,0 +1,118 @@
+
+
+ Protocol Buffer
+ protobuf
+ proto
+ *.proto
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/puppet.xml b/lexers/embedded/puppet.xml
new file mode 100644
index 0000000..fbb587c
--- /dev/null
+++ b/lexers/embedded/puppet.xml
@@ -0,0 +1,100 @@
+
+
+ Puppet
+ puppet
+ *.pp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/python.xml b/lexers/embedded/python.xml
new file mode 100644
index 0000000..e928672
--- /dev/null
+++ b/lexers/embedded/python.xml
@@ -0,0 +1,589 @@
+
+
+ Python
+ python
+ py
+ sage
+ python3
+ py3
+ *.py
+ *.pyi
+ *.pyw
+ *.jy
+ *.sage
+ *.sc
+ SConstruct
+ SConscript
+ *.bzl
+ BUCK
+ BUILD
+ BUILD.bazel
+ WORKSPACE
+ *.tac
+ text/x-python
+ application/x-python
+ text/x-python3
+ application/x-python3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/python_2.xml b/lexers/embedded/python_2.xml
new file mode 100644
index 0000000..3297a22
--- /dev/null
+++ b/lexers/embedded/python_2.xml
@@ -0,0 +1,356 @@
+
+
+ Python 2
+ python2
+ py2
+ text/x-python2
+ application/x-python2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/qbasic.xml b/lexers/embedded/qbasic.xml
new file mode 100644
index 0000000..193fe18
--- /dev/null
+++ b/lexers/embedded/qbasic.xml
@@ -0,0 +1,173 @@
+
+
+ QBasic
+ qbasic
+ basic
+ *.BAS
+ *.bas
+ text/basic
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/qml.xml b/lexers/embedded/qml.xml
new file mode 100644
index 0000000..43eb3eb
--- /dev/null
+++ b/lexers/embedded/qml.xml
@@ -0,0 +1,113 @@
+
+
+ QML
+ qml
+ qbs
+ *.qml
+ *.qbs
+ application/x-qml
+ application/x-qt.qbs+qml
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/r.xml b/lexers/embedded/r.xml
new file mode 100644
index 0000000..6dbfcba
--- /dev/null
+++ b/lexers/embedded/r.xml
@@ -0,0 +1,127 @@
+
+
+ R
+ splus
+ s
+ r
+ *.S
+ *.R
+ *.r
+ .Rhistory
+ .Rprofile
+ .Renviron
+ text/S-plus
+ text/S
+ text/x-r-source
+ text/x-r
+ text/x-R
+ text/x-r-history
+ text/x-r-profile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/racket.xml b/lexers/embedded/racket.xml
new file mode 100644
index 0000000..6cdd303
--- /dev/null
+++ b/lexers/embedded/racket.xml
@@ -0,0 +1,260 @@
+
+
+ Racket
+ racket
+ rkt
+ *.rkt
+ *.rktd
+ *.rktl
+ text/x-racket
+ application/x-racket
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/ragel.xml b/lexers/embedded/ragel.xml
new file mode 100644
index 0000000..69638d2
--- /dev/null
+++ b/lexers/embedded/ragel.xml
@@ -0,0 +1,149 @@
+
+
+ Ragel
+ ragel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/react.xml b/lexers/embedded/react.xml
new file mode 100644
index 0000000..a4109b0
--- /dev/null
+++ b/lexers/embedded/react.xml
@@ -0,0 +1,236 @@
+
+
+ react
+ jsx
+ react
+ *.jsx
+ *.react
+ text/jsx
+ text/typescript-jsx
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/reasonml.xml b/lexers/embedded/reasonml.xml
new file mode 100644
index 0000000..8b7bcc5
--- /dev/null
+++ b/lexers/embedded/reasonml.xml
@@ -0,0 +1,147 @@
+
+
+ ReasonML
+ reason
+ reasonml
+ *.re
+ *.rei
+ text/x-reasonml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/reg.xml b/lexers/embedded/reg.xml
new file mode 100644
index 0000000..501d380
--- /dev/null
+++ b/lexers/embedded/reg.xml
@@ -0,0 +1,68 @@
+
+
+ reg
+ registry
+ *.reg
+ text/x-windows-registry
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/rexx.xml b/lexers/embedded/rexx.xml
new file mode 100644
index 0000000..e682500
--- /dev/null
+++ b/lexers/embedded/rexx.xml
@@ -0,0 +1,127 @@
+
+
+ Rexx
+ rexx
+ arexx
+ *.rexx
+ *.rex
+ *.rx
+ *.arexx
+ text/x-rexx
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/ruby.xml b/lexers/embedded/ruby.xml
new file mode 100644
index 0000000..b47b1ab
--- /dev/null
+++ b/lexers/embedded/ruby.xml
@@ -0,0 +1,723 @@
+
+
+ Ruby
+ rb
+ ruby
+ duby
+ *.rb
+ *.rbw
+ Rakefile
+ *.rake
+ *.gemspec
+ *.rbx
+ *.duby
+ Gemfile
+ text/x-ruby
+ application/x-ruby
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/rust.xml b/lexers/embedded/rust.xml
new file mode 100644
index 0000000..f41049c
--- /dev/null
+++ b/lexers/embedded/rust.xml
@@ -0,0 +1,329 @@
+
+
+ Rust
+ rust
+ rs
+ *.rs
+ *.rs.in
+ text/rust
+ text/x-rust
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/sas.xml b/lexers/embedded/sas.xml
new file mode 100644
index 0000000..af1107b
--- /dev/null
+++ b/lexers/embedded/sas.xml
@@ -0,0 +1,191 @@
+
+
+ SAS
+ sas
+ *.SAS
+ *.sas
+ text/x-sas
+ text/sas
+ application/x-sas
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/sass.xml b/lexers/embedded/sass.xml
new file mode 100644
index 0000000..f801594
--- /dev/null
+++ b/lexers/embedded/sass.xml
@@ -0,0 +1,362 @@
+
+
+ Sass
+ sass
+ *.sass
+ text/x-sass
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/scala.xml b/lexers/embedded/scala.xml
new file mode 100644
index 0000000..2f8ddd4
--- /dev/null
+++ b/lexers/embedded/scala.xml
@@ -0,0 +1,274 @@
+
+
+ Scala
+ scala
+ *.scala
+ text/x-scala
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/scheme.xml b/lexers/embedded/scheme.xml
new file mode 100644
index 0000000..0198bd7
--- /dev/null
+++ b/lexers/embedded/scheme.xml
@@ -0,0 +1,106 @@
+
+
+ Scheme
+ scheme
+ scm
+ *.scm
+ *.ss
+ text/x-scheme
+ application/x-scheme
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/scilab.xml b/lexers/embedded/scilab.xml
new file mode 100644
index 0000000..9e10949
--- /dev/null
+++ b/lexers/embedded/scilab.xml
@@ -0,0 +1,98 @@
+
+
+ Scilab
+ scilab
+ *.sci
+ *.sce
+ *.tst
+ text/scilab
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/scss.xml b/lexers/embedded/scss.xml
new file mode 100644
index 0000000..ee060fc
--- /dev/null
+++ b/lexers/embedded/scss.xml
@@ -0,0 +1,373 @@
+
+
+ SCSS
+ scss
+ *.scss
+ text/x-scss
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/sieve.xml b/lexers/embedded/sieve.xml
new file mode 100644
index 0000000..fc60563
--- /dev/null
+++ b/lexers/embedded/sieve.xml
@@ -0,0 +1,61 @@
+
+
+ Sieve
+ sieve
+ *.siv
+ *.sieve
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/smalltalk.xml b/lexers/embedded/smalltalk.xml
new file mode 100644
index 0000000..0027111
--- /dev/null
+++ b/lexers/embedded/smalltalk.xml
@@ -0,0 +1,294 @@
+
+
+ Smalltalk
+ smalltalk
+ squeak
+ st
+ *.st
+ text/x-smalltalk
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/snobol.xml b/lexers/embedded/snobol.xml
new file mode 100644
index 0000000..f53dbcb
--- /dev/null
+++ b/lexers/embedded/snobol.xml
@@ -0,0 +1,95 @@
+
+
+ Snobol
+ snobol
+ *.snobol
+ text/x-snobol
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/solidity.xml b/lexers/embedded/solidity.xml
new file mode 100644
index 0000000..04403c8
--- /dev/null
+++ b/lexers/embedded/solidity.xml
@@ -0,0 +1,279 @@
+
+
+ Solidity
+ sol
+ solidity
+ *.sol
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/sparql.xml b/lexers/embedded/sparql.xml
new file mode 100644
index 0000000..7dc65af
--- /dev/null
+++ b/lexers/embedded/sparql.xml
@@ -0,0 +1,160 @@
+
+
+ SPARQL
+ sparql
+ *.rq
+ *.sparql
+ application/sparql-query
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/sql.xml b/lexers/embedded/sql.xml
new file mode 100644
index 0000000..b542b65
--- /dev/null
+++ b/lexers/embedded/sql.xml
@@ -0,0 +1,90 @@
+
+
+ SQL
+ sql
+ *.sql
+ text/x-sql
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/squidconf.xml b/lexers/embedded/squidconf.xml
new file mode 100644
index 0000000..cbd8dbc
--- /dev/null
+++ b/lexers/embedded/squidconf.xml
@@ -0,0 +1,63 @@
+
+
+ SquidConf
+ squidconf
+ squid.conf
+ squid
+ squid.conf
+ text/x-squidconf
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/standard_ml.xml b/lexers/embedded/standard_ml.xml
new file mode 100644
index 0000000..39cf4f2
--- /dev/null
+++ b/lexers/embedded/standard_ml.xml
@@ -0,0 +1,548 @@
+
+
+ Standard ML
+ sml
+ *.sml
+ *.sig
+ *.fun
+ text/x-standardml
+ application/x-standardml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/stylus.xml b/lexers/embedded/stylus.xml
new file mode 100644
index 0000000..c2d8807
--- /dev/null
+++ b/lexers/embedded/stylus.xml
@@ -0,0 +1,132 @@
+
+
+ Stylus
+ stylus
+ *.styl
+ text/x-styl
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/swift.xml b/lexers/embedded/swift.xml
new file mode 100644
index 0000000..416bf90
--- /dev/null
+++ b/lexers/embedded/swift.xml
@@ -0,0 +1,207 @@
+
+
+ Swift
+ swift
+ *.swift
+ text/x-swift
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/systemd.xml b/lexers/embedded/systemd.xml
new file mode 100644
index 0000000..e31bfc2
--- /dev/null
+++ b/lexers/embedded/systemd.xml
@@ -0,0 +1,63 @@
+
+
+ SYSTEMD
+ systemd
+ *.automount
+ *.device
+ *.dnssd
+ *.link
+ *.mount
+ *.netdev
+ *.network
+ *.path
+ *.scope
+ *.service
+ *.slice
+ *.socket
+ *.swap
+ *.target
+ *.timer
+ text/plain
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/systemverilog.xml b/lexers/embedded/systemverilog.xml
new file mode 100644
index 0000000..fac3da2
--- /dev/null
+++ b/lexers/embedded/systemverilog.xml
@@ -0,0 +1,181 @@
+
+
+ systemverilog
+ systemverilog
+ sv
+ *.sv
+ *.svh
+ text/x-systemverilog
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/tablegen.xml b/lexers/embedded/tablegen.xml
new file mode 100644
index 0000000..a020ce8
--- /dev/null
+++ b/lexers/embedded/tablegen.xml
@@ -0,0 +1,69 @@
+
+
+ TableGen
+ tablegen
+ *.td
+ text/x-tablegen
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/tasm.xml b/lexers/embedded/tasm.xml
new file mode 100644
index 0000000..1347f53
--- /dev/null
+++ b/lexers/embedded/tasm.xml
@@ -0,0 +1,135 @@
+
+
+ TASM
+ tasm
+ *.asm
+ *.ASM
+ *.tasm
+ text/x-tasm
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/tcl.xml b/lexers/embedded/tcl.xml
new file mode 100644
index 0000000..7ed69bc
--- /dev/null
+++ b/lexers/embedded/tcl.xml
@@ -0,0 +1,272 @@
+
+
+ Tcl
+ tcl
+ *.tcl
+ *.rvt
+ text/x-tcl
+ text/x-script.tcl
+ application/x-tcl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/tcsh.xml b/lexers/embedded/tcsh.xml
new file mode 100644
index 0000000..9895643
--- /dev/null
+++ b/lexers/embedded/tcsh.xml
@@ -0,0 +1,121 @@
+
+
+ Tcsh
+ tcsh
+ csh
+ *.tcsh
+ *.csh
+ application/x-csh
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/termcap.xml b/lexers/embedded/termcap.xml
new file mode 100644
index 0000000..e863bbd
--- /dev/null
+++ b/lexers/embedded/termcap.xml
@@ -0,0 +1,75 @@
+
+
+ Termcap
+ termcap
+ termcap
+ termcap.src
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/terminfo.xml b/lexers/embedded/terminfo.xml
new file mode 100644
index 0000000..9e8f56e
--- /dev/null
+++ b/lexers/embedded/terminfo.xml
@@ -0,0 +1,84 @@
+
+
+ Terminfo
+ terminfo
+ terminfo
+ terminfo.src
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/terraform.xml b/lexers/embedded/terraform.xml
new file mode 100644
index 0000000..452f211
--- /dev/null
+++ b/lexers/embedded/terraform.xml
@@ -0,0 +1,140 @@
+
+
+ Terraform
+ terraform
+ tf
+ *.tf
+ application/x-tf
+ application/x-terraform
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/tex.xml b/lexers/embedded/tex.xml
new file mode 100644
index 0000000..809bb9a
--- /dev/null
+++ b/lexers/embedded/tex.xml
@@ -0,0 +1,113 @@
+
+
+ TeX
+ tex
+ latex
+ *.tex
+ *.aux
+ *.toc
+ text/x-tex
+ text/x-latex
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/thrift.xml b/lexers/embedded/thrift.xml
new file mode 100644
index 0000000..f14257d
--- /dev/null
+++ b/lexers/embedded/thrift.xml
@@ -0,0 +1,154 @@
+
+
+ Thrift
+ thrift
+ *.thrift
+ application/x-thrift
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/toml.xml b/lexers/embedded/toml.xml
new file mode 100644
index 0000000..3598cd7
--- /dev/null
+++ b/lexers/embedded/toml.xml
@@ -0,0 +1,42 @@
+
+
+ TOML
+ toml
+ *.toml
+ text/x-toml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/tradingview.xml b/lexers/embedded/tradingview.xml
new file mode 100644
index 0000000..3671f61
--- /dev/null
+++ b/lexers/embedded/tradingview.xml
@@ -0,0 +1,81 @@
+
+
+ TradingView
+ tradingview
+ tv
+ *.tv
+ text/x-tradingview
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/transact-sql.xml b/lexers/embedded/transact-sql.xml
new file mode 100644
index 0000000..1c9f38e
--- /dev/null
+++ b/lexers/embedded/transact-sql.xml
@@ -0,0 +1,137 @@
+
+
+ Transact-SQL
+ tsql
+ t-sql
+ text/x-tsql
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/turing.xml b/lexers/embedded/turing.xml
new file mode 100644
index 0000000..4eab69b
--- /dev/null
+++ b/lexers/embedded/turing.xml
@@ -0,0 +1,82 @@
+
+
+ Turing
+ turing
+ *.turing
+ *.tu
+ text/x-turing
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/turtle.xml b/lexers/embedded/turtle.xml
new file mode 100644
index 0000000..7c572f9
--- /dev/null
+++ b/lexers/embedded/turtle.xml
@@ -0,0 +1,170 @@
+
+
+ Turtle
+ turtle
+ *.ttl
+ text/turtle
+ application/x-turtle
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/twig.xml b/lexers/embedded/twig.xml
new file mode 100644
index 0000000..5b0496d
--- /dev/null
+++ b/lexers/embedded/twig.xml
@@ -0,0 +1,154 @@
+
+
+ Twig
+ twig
+ application/x-twig
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/typescript.xml b/lexers/embedded/typescript.xml
new file mode 100644
index 0000000..cae5a76
--- /dev/null
+++ b/lexers/embedded/typescript.xml
@@ -0,0 +1,261 @@
+
+
+ TypeScript
+ ts
+ tsx
+ typescript
+ *.ts
+ *.tsx
+ text/x-typescript
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/typoscriptcssdata.xml b/lexers/embedded/typoscriptcssdata.xml
new file mode 100644
index 0000000..62c42c1
--- /dev/null
+++ b/lexers/embedded/typoscriptcssdata.xml
@@ -0,0 +1,52 @@
+
+
+ TypoScriptCssData
+ typoscriptcssdata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/typoscripthtmldata.xml b/lexers/embedded/typoscripthtmldata.xml
new file mode 100644
index 0000000..1b0af3a
--- /dev/null
+++ b/lexers/embedded/typoscripthtmldata.xml
@@ -0,0 +1,52 @@
+
+
+ TypoScriptHtmlData
+ typoscripthtmldata
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/vb_net.xml b/lexers/embedded/vb_net.xml
new file mode 100644
index 0000000..9f85afd
--- /dev/null
+++ b/lexers/embedded/vb_net.xml
@@ -0,0 +1,162 @@
+
+
+ VB.net
+ vb.net
+ vbnet
+ *.vb
+ *.bas
+ text/x-vbnet
+ text/x-vba
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/verilog.xml b/lexers/embedded/verilog.xml
new file mode 100644
index 0000000..cd4b9ff
--- /dev/null
+++ b/lexers/embedded/verilog.xml
@@ -0,0 +1,158 @@
+
+
+ verilog
+ verilog
+ v
+ *.v
+ text/x-verilog
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/vhdl.xml b/lexers/embedded/vhdl.xml
new file mode 100644
index 0000000..aa42044
--- /dev/null
+++ b/lexers/embedded/vhdl.xml
@@ -0,0 +1,171 @@
+
+
+ VHDL
+ vhdl
+ *.vhdl
+ *.vhd
+ text/x-vhdl
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/vue.xml b/lexers/embedded/vue.xml
new file mode 100644
index 0000000..7518020
--- /dev/null
+++ b/lexers/embedded/vue.xml
@@ -0,0 +1,305 @@
+
+
+ vue
+ vue
+ vuejs
+ *.vue
+ text/x-vue
+ application/x-vue
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/wdte.xml b/lexers/embedded/wdte.xml
new file mode 100644
index 0000000..c663ee2
--- /dev/null
+++ b/lexers/embedded/wdte.xml
@@ -0,0 +1,43 @@
+
+
+ WDTE
+ *.wdte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/xml.xml b/lexers/embedded/xml.xml
new file mode 100644
index 0000000..2c6a4d9
--- /dev/null
+++ b/lexers/embedded/xml.xml
@@ -0,0 +1,95 @@
+
+
+ XML
+ xml
+ *.xml
+ *.xsl
+ *.rss
+ *.xslt
+ *.xsd
+ *.wsdl
+ *.wsf
+ *.svg
+ *.csproj
+ *.vcxproj
+ *.fsproj
+ text/xml
+ application/xml
+ image/svg+xml
+ application/rss+xml
+ application/atom+xml
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/xorg.xml b/lexers/embedded/xorg.xml
new file mode 100644
index 0000000..53bf432
--- /dev/null
+++ b/lexers/embedded/xorg.xml
@@ -0,0 +1,35 @@
+
+
+ Xorg
+ xorg.conf
+ xorg.conf
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/yaml.xml b/lexers/embedded/yaml.xml
new file mode 100644
index 0000000..baa7bd5
--- /dev/null
+++ b/lexers/embedded/yaml.xml
@@ -0,0 +1,122 @@
+
+
+ YAML
+ yaml
+ *.yaml
+ *.yml
+ text/x-yaml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/yang.xml b/lexers/embedded/yang.xml
new file mode 100644
index 0000000..f3da7ce
--- /dev/null
+++ b/lexers/embedded/yang.xml
@@ -0,0 +1,99 @@
+
+
+ YANG
+ yang
+ *.yang
+ application/yang
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/zed.xml b/lexers/embedded/zed.xml
new file mode 100644
index 0000000..929f495
--- /dev/null
+++ b/lexers/embedded/zed.xml
@@ -0,0 +1,51 @@
+
+
+ Zed
+ zed
+ *.zed
+ text/zed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/embedded/zig.xml b/lexers/embedded/zig.xml
new file mode 100644
index 0000000..fb51cc1
--- /dev/null
+++ b/lexers/embedded/zig.xml
@@ -0,0 +1,112 @@
+
+
+ Zig
+ zig
+ *.zig
+ text/zig
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lexers/f/factor.go b/lexers/f/factor.go
deleted file mode 100644
index d88beb2..0000000
--- a/lexers/f/factor.go
+++ /dev/null
@@ -1,119 +0,0 @@
-package f
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Factor lexer.
-var Factor = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Factor",
- Aliases: []string{"factor"},
- Filenames: []string{"*.factor"},
- MimeTypes: []string{"text/x-factor"},
- },
- factorRules,
-))
-
-func factorRules() Rules {
- return 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/lexers/f/fennel.go b/lexers/f/fennel.go
deleted file mode 100644
index 23134d4..0000000
--- a/lexers/f/fennel.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package f
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Fennel lexer.
-var Fennel = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Fennel",
- Aliases: []string{"fennel", "fnl"},
- Filenames: []string{"*.fennel"},
- MimeTypes: []string{"text/x-fennel", "application/x-fennel"},
- },
- fennelRules,
-))
-
-// Here's some Fennel code used to generate the lists of keywords:
-// (local fennel (require :fennel))
-//
-// (fn member? [t x] (each [_ y (ipairs t)] (when (= y x) (lua "return true"))))
-//
-// (local declarations [:fn :lambda :λ :local :var :global :macro :macros])
-// (local keywords [])
-// (local globals [])
-//
-// (each [name data (pairs (fennel.syntax))]
-// (if (member? declarations name) nil ; already populated
-// data.special? (table.insert keywords name)
-// data.macro? (table.insert keywords name)
-// data.global? (table.insert globals name)))
-//
-// (fn quoted [tbl]
-// (table.sort tbl)
-// (table.concat (icollect [_ k (ipairs tbl)]
-// (string.format "`%s`" k)) ", "))
-//
-// (print :Keyword (quoted keywords))
-// (print :KeywordDeclaration (quoted declarations))
-// (print :NameBuiltin (quoted globals))
-
-func fennelRules() Rules {
- return Rules{
- "root": {
- {`;.*$`, CommentSingle, nil},
- {`\s+`, Whitespace, 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(``, ` `, `#`, `%`, `*`, `+`, `-`, `->`, `->>`, `-?>`, `-?>>`, `.`, `..`, `/`, `//`, `:`, `<`, `<=`, `=`, `>`, `>=`, `?.`, `^`, `accumulate`, `and`, `band`, `bnot`, `bor`, `bxor`, `collect`, `comment`, `do`, `doc`, `doto`, `each`, `eval-compiler`, `for`, `hashfn`, `icollect`, `if`, `import-macros`, `include`, `length`, `let`, `lshift`, `lua`, `macrodebug`, `match`, `not`, `not=`, `or`, `partial`, `pick-args`, `pick-values`, `quote`, `require-macros`, `rshift`, `set`, `set-forcibly!`, `tset`, `values`, `when`, `while`, `with-open`, `~=`), Keyword, nil},
- {Words(``, ` `, `fn`, `global`, `lambda`, `local`, `macro`, `macros`, `var`, `λ`), KeywordDeclaration, nil},
- {Words(``, ` `, `_G`, `arg`, `assert`, `bit32`, `bit32.arshift`, `bit32.band`, `bit32.bnot`, `bit32.bor`, `bit32.btest`, `bit32.bxor`, `bit32.extract`, `bit32.lrotate`, `bit32.lshift`, `bit32.replace`, `bit32.rrotate`, `bit32.rshift`, `collectgarbage`, `coroutine`, `coroutine.create`, `coroutine.resume`, `coroutine.running`, `coroutine.status`, `coroutine.wrap`, `coroutine.yield`, `debug`, `debug.debug`, `debug.gethook`, `debug.getinfo`, `debug.getlocal`, `debug.getmetatable`, `debug.getregistry`, `debug.getupvalue`, `debug.getuservalue`, `debug.sethook`, `debug.setlocal`, `debug.setmetatable`, `debug.setupvalue`, `debug.setuservalue`, `debug.traceback`, `debug.upvalueid`, `debug.upvaluejoin`, `dofile`, `error`, `getmetatable`, `io`, `io.close`, `io.flush`, `io.input`, `io.lines`, `io.open`, `io.output`, `io.popen`, `io.read`, `io.tmpfile`, `io.type`, `io.write`, `ipairs`, `load`, `loadfile`, `loadstring`, `math`, `math.abs`, `math.acos`, `math.asin`, `math.atan`, `math.atan2`, `math.ceil`, `math.cos`, `math.cosh`, `math.deg`, `math.exp`, `math.floor`, `math.fmod`, `math.frexp`, `math.ldexp`, `math.log`, `math.log10`, `math.max`, `math.min`, `math.modf`, `math.pow`, `math.rad`, `math.random`, `math.randomseed`, `math.sin`, `math.sinh`, `math.sqrt`, `math.tan`, `math.tanh`, `module`, `next`, `os`, `os.clock`, `os.date`, `os.difftime`, `os.execute`, `os.exit`, `os.getenv`, `os.remove`, `os.rename`, `os.setlocale`, `os.time`, `os.tmpname`, `package`, `package.loadlib`, `package.searchpath`, `package.seeall`, `pairs`, `pcall`, `print`, `rawequal`, `rawget`, `rawlen`, `rawset`, `require`, `select`, `setmetatable`, `string`, `string.byte`, `string.char`, `string.dump`, `string.find`, `string.format`, `string.gmatch`, `string.gsub`, `string.len`, `string.lower`, `string.match`, `string.rep`, `string.reverse`, `string.sub`, `string.upper`, `table`, `table.concat`, `table.insert`, `table.maxn`, `table.pack`, `table.remove`, `table.sort`, `table.unpack`, `tonumber`, `tostring`, `type`, `unpack`, `xpcall`), NameBuiltin, nil},
- {`(?<=\()(?!#)[\w!$%*+<=>?/.#-]+`, NameFunction, nil},
- {`(?!#)[\w!$%*+<=>?/.#-]+`, NameVariable, nil},
- {`(\[|\])`, Punctuation, nil},
- {`(\{|\})`, Punctuation, nil},
- {`(\(|\))`, Punctuation, nil},
- },
- }
-}
diff --git a/lexers/f/fish.go b/lexers/f/fish.go
deleted file mode 100644
index 29d5028..0000000
--- a/lexers/f/fish.go
+++ /dev/null
@@ -1,98 +0,0 @@
-package f
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Fish lexer.
-var Fish = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Fish",
- Aliases: []string{"fish", "fishshell"},
- Filenames: []string{"*.fish", "*.load"},
- MimeTypes: []string{"application/x-fish"},
- },
- fishRules,
-))
-
-func fishRules() Rules {
- keywords := []string{
- `begin`, `end`, `if`, `else`, `while`, `break`, `for`, `return`, `function`, `block`,
- `case`, `continue`, `switch`, `not`, `and`, `or`, `set`, `echo`, `exit`, `pwd`, `true`,
- `false`, `cd`, `cdh`, `count`, `test`,
- }
- keywordsPattern := Words(`\b`, `\b`, keywords...)
-
- builtins := []string{
- `alias`, `bg`, `bind`, `breakpoint`, `builtin`, `argparse`, `abbr`, `string`, `command`,
- `commandline`, `complete`, `contains`, `dirh`, `dirs`, `disown`, `emit`, `eval`, `exec`,
- `fg`, `fish`, `fish_add_path`, `fish_breakpoint_prompt`, `fish_command_not_found`,
- `fish_config`, `fish_git_prompt`, `fish_greeting`, `fish_hg_prompt`, `fish_indent`,
- `fish_is_root_user`, `fish_key_reader`, `fish_mode_prompt`, `fish_opt`, `fish_pager`,
- `fish_prompt`, `fish_right_prompt`, `fish_status_to_signal`, `fish_svn_prompt`,
- `fish_title`, `fish_update_completions`, `fish_vcs_prompt`, `fishd`, `funced`,
- `funcsave`, `functions`, `help`, `history`, `isatty`, `jobs`, `math`, `mimedb`, `nextd`,
- `open`, `prompt_pwd`, `realpath`, `popd`, `prevd`, `psub`, `pushd`, `random`, `read`,
- `set_color`, `source`, `status`, `suspend`, `trap`, `type`, `ulimit`, `umask`, `vared`,
- `fc`, `getopts`, `hash`, `kill`, `printf`, `time`, `wait`,
- }
-
- return Rules{
- "root": {
- Include("basic"),
- Include("interp"),
- Include("data"),
- },
- "interp": {
- {`\$\(\(`, Keyword, Push("math")},
- {`\(`, Keyword, Push("paren")},
- {`\$#?(\w+|.)`, NameVariable, nil},
- },
- "basic": {
- {Words(`(?<=(?:^|\A|;|&&|\|\||\||`+keywordsPattern+`)\s*)`, `(?=;?\b)`, keywords...), Keyword, nil},
- {`(?<=for\s+\S+\s+)in\b`, Keyword, nil},
- {Words(`\b`, `\s*\b(?!\.)`, builtins...), NameBuiltin, nil},
- {`#!.*\n`, CommentHashbang, nil},
- {`#.*\n`, Comment, nil},
- {`\\[\w\W]`, LiteralStringEscape, nil},
- {`(\b\w+)(\s*)(=)`, ByGroups(NameVariable, Text, Operator), nil},
- {`[\[\]()={}]`, Operator, nil},
- {`(?<=\[[^\]]+)\.\.|-(?=[^\[]+\])`, Operator, nil},
- {`<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2`, LiteralString, nil},
- {`(?<=set\s+(?:--?[^\d\W][\w-]*\s+)?)\w+`, NameVariable, nil},
- {`(?<=for\s+)\w[\w-]*(?=\s+in)`, NameVariable, nil},
- {`(?<=function\s+)\w(?:[^\n])*?(?= *[-\n])`, NameFunction, nil},
- {`(?<=(?:^|\b(?:and|or|sudo)\b|;|\|\||&&|\||\(|(?:\b\w+\s*=\S+\s)) *)\w[\w-]*`, NameFunction, 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},
- {`\b\d+\b`, LiteralNumber, nil},
- {`(?<=\s+)--?[^\d][\w-]*`, NameAttribute, nil},
- {".+?", 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/lexers/f/forth.go b/lexers/f/forth.go
deleted file mode 100644
index 8d66708..0000000
--- a/lexers/f/forth.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package f
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Forth lexer.
-var Forth = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Forth",
- Aliases: []string{"forth"},
- Filenames: []string{"*.frt", "*.fth", "*.fs"},
- MimeTypes: []string{"application/x-forth"},
- CaseInsensitive: true,
- },
- forthRules,
-))
-
-func forthRules() Rules {
- return 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/lexers/f/fortran.go b/lexers/f/fortran.go
deleted file mode 100644
index af4a969..0000000
--- a/lexers/f/fortran.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package f
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Fortran lexer.
-var Fortran = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Fortran",
- Aliases: []string{"fortran"},
- Filenames: []string{"*.f03", "*.f90", "*.F03", "*.F90"},
- MimeTypes: []string{"text/x-fortran"},
- CaseInsensitive: true,
- },
- fortranRules,
-))
-
-func fortranRules() Rules {
- return 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/lexers/f/fsharp.go b/lexers/f/fsharp.go
deleted file mode 100644
index 44fced4..0000000
--- a/lexers/f/fsharp.go
+++ /dev/null
@@ -1,98 +0,0 @@
-package f
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Fsharp lexer.
-var Fsharp = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "FSharp",
- Aliases: []string{"fsharp"},
- Filenames: []string{"*.fs", "*.fsi"},
- MimeTypes: []string{"text/x-fsharp"},
- },
- fsharpRules,
-))
-
-func fsharpRules() Rules {
- return 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/lexers/f/fortran_fixed.go b/lexers/fortran_fixed.go
similarity index 67%
rename from lexers/f/fortran_fixed.go
rename to lexers/fortran_fixed.go
index 7c64638..d93ac1e 100644
--- a/lexers/f/fortran_fixed.go
+++ b/lexers/fortran_fixed.go
@@ -1,12 +1,11 @@
-package f
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// FortranFixed lexer.
-var FortranFixed = internal.Register(MustNewLazyLexer(
+var FortranFixed = Register(MustNewLexer(
&Config{
Name: "FortranFixed",
Aliases: []string{"fortranfixed"},
@@ -22,7 +21,7 @@ var FortranFixed = internal.Register(MustNewLazyLexer(
{`#.*\n`, CommentPreproc, nil},
{`[\t ]*!.*\n`, Comment, nil},
{`(.{5})`, NameLabel, Push("cont-char")},
- {`.*\n`, Using(Fortran), nil},
+ {`.*\n`, Using("Fortran"), nil},
},
"cont-char": {
{` `, Text, Push("code")},
@@ -30,8 +29,8 @@ var FortranFixed = internal.Register(MustNewLazyLexer(
{`.`, GenericStrong, Push("code")},
},
"code": {
- {`(.{66})(.*)(\n)`, ByGroups(Using(Fortran), Comment, Text), Push("root")},
- {`.*\n`, Using(Fortran), Push("root")},
+ {`(.{66})(.*)(\n)`, ByGroups(Using("Fortran"), Comment, Text), Push("root")},
+ {`.*\n`, Using("Fortran"), Push("root")},
Default(Push("root")),
},
}
diff --git a/lexers/g/gas.go b/lexers/g/gas.go
deleted file mode 100644
index 1f733f6..0000000
--- a/lexers/g/gas.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package g
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Gas lexer.
-var Gas = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "GAS",
- Aliases: []string{"gas", "asm"},
- Filenames: []string{"*.s", "*.S"},
- MimeTypes: []string{"text/x-gas"},
- },
- gasRules,
-))
-
-func gasRules() Rules {
- return 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/lexers/g/gdscript.go b/lexers/g/gdscript.go
deleted file mode 100644
index 2b6af97..0000000
--- a/lexers/g/gdscript.go
+++ /dev/null
@@ -1,128 +0,0 @@
-package g
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// GDScript lexer.
-var GDScript = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "GDScript",
- Aliases: []string{"gdscript", "gd"},
- Filenames: []string{"*.gd"},
- MimeTypes: []string{"text/x-gdscript", "application/x-gdscript"},
- },
- gdscriptRules,
-))
-
-func gdscriptRules() Rules {
- return 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(`(?]+>)`, NameVariable, nil},
- },
- "numbers": {
- {`(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?`, LiteralString, nil},
- },
- "string": {
- Include("tableVars"),
- {`(\s|.)`, LiteralString, nil},
- },
- "pyString": {
- {`"""`, Keyword, Pop(1)},
- Include("string"),
- },
- "stepContentRoot": {
- {`$`, Keyword, Pop(1)},
- Include("stepContent"),
- },
- "stepContentStack": {
- {`$`, Keyword, Pop(2)},
- Include("stepContent"),
- },
- "stepContent": {
- {`"`, NameFunction, Push("doubleString")},
- Include("tableVars"),
- Include("numbers"),
- Include("comments"),
- {`(\s|.)`, NameFunction, nil},
- },
- "tableContent": {
- {`\s+\|\s*$`, Keyword, Pop(1)},
- Include("comments"),
- {`\\\|`, LiteralString, nil},
- {`\s*\|`, Keyword, nil},
- {`"`, LiteralString, Push("doubleStringTable")},
- Include("string"),
- },
- "doubleString": {
- {`"`, NameFunction, Pop(1)},
- Include("string"),
- },
- "doubleStringTable": {
- {`"`, LiteralString, Pop(1)},
- Include("string"),
- },
- "root": {
- {`\n`, NameFunction, nil},
- Include("comments"),
- {`"""`, Keyword, Push("pyString")},
- {`\s+\|`, Keyword, Push("tableContent")},
- {`"`, NameFunction, Push("doubleString")},
- Include("tableVars"),
- Include("numbers"),
- {`(\s*)(@[^@\r\n\t ]+)`, ByGroups(NameFunction, NameTag), nil},
- {stepKeywords, ByGroups(NameFunction, Keyword), Push("stepContentRoot")},
- {featureKeywords, ByGroups(Keyword, Keyword, NameFunction), Push("narrative")},
- {featureElementKeywords, ByGroups(NameFunction, Keyword, Keyword, NameFunction), Push("featureElements")},
- {examplesKeywords, ByGroups(NameFunction, Keyword, Keyword, NameFunction), Push("examplesTable")},
- {`(\s|.)`, NameFunction, nil},
- },
- }
-}
diff --git a/lexers/g/glsl.go b/lexers/g/glsl.go
deleted file mode 100644
index 14aa58d..0000000
--- a/lexers/g/glsl.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package g
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// GLSL lexer.
-var GLSL = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "GLSL",
- Aliases: []string{"glsl"},
- Filenames: []string{"*.vert", "*.frag", "*.geo"},
- MimeTypes: []string{"text/x-glslsrc"},
- },
- glslRules,
-))
-
-func glslRules() Rules {
- return Rules{
- "root": {
- {`^#.*`, CommentPreproc, nil},
- {`//.*`, CommentSingle, nil},
- {`/(\\\n)?[*](.|\n)*?[*](\\\n)?/`, CommentMultiline, nil},
- {`\+|-|~|!=?|\*|/|%|<<|>>|<=?|>=?|==?|&&?|\^|\|\|?`, 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/lexers/g/gnuplot.go b/lexers/g/gnuplot.go
deleted file mode 100644
index a7a2509..0000000
--- a/lexers/g/gnuplot.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package g
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Gnuplot lexer.
-var Gnuplot = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Gnuplot",
- Aliases: []string{"gnuplot"},
- Filenames: []string{"*.plot", "*.plt"},
- MimeTypes: []string{"text/x-gnuplot"},
- },
- gnuplotRules,
-))
-
-func gnuplotRules() Rules {
- return 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/lexers/g/graphql.go b/lexers/g/graphql.go
deleted file mode 100644
index 7d465cd..0000000
--- a/lexers/g/graphql.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package g
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Go lexer.
-var Graphql = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "GraphQL",
- Aliases: []string{"graphql", "graphqls", "gql"},
- Filenames: []string{"*.graphql", "*.graphqls"},
- },
- graphqlRules,
-))
-
-func graphqlRules() Rules {
- return Rules{
- "root": {
- {`(query|mutation|subscription|fragment|scalar|implements|interface|union|enum|input|type)`, KeywordDeclaration, Push("type")},
- {`(on|extend|schema|directive|\.\.\.)`, KeywordDeclaration, nil},
- {`(QUERY|MUTATION|SUBSCRIPTION|FIELD|FRAGMENT_DEFINITION|FRAGMENT_SPREAD|INLINE_FRAGMENT|SCHEMA|SCALAR|OBJECT|FIELD_DEFINITION|ARGUMENT_DEFINITION|INTERFACE|UNION|ENUM|ENUM_VALUE|INPUT_OBJECT|INPUT_FIELD_DEFINITION)\b`, KeywordConstant, nil},
- {`[^\W\d]\w*`, NameProperty, nil},
- {`\@\w+`, NameDecorator, nil},
- {`:`, Punctuation, Push("type")},
- {`[\(\)\{\}\[\],!\|=]`, Punctuation, nil},
- {`\$\w+`, NameVariable, 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|[1-9][0-9]*)`, LiteralNumberInteger, nil},
- {`"""[\x00-\x7F]*?"""`, LiteralString, 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},
- {`"(true|false|null)*"`, Literal, nil},
- {`[\r\n\s]+`, Whitespace, nil},
- {`#[^\r\n]*`, Comment, nil},
- },
- // Treats the next word as a class, default rules it would be a property
- "type": {
- {`[^\W\d]\w*`, NameClass, Pop(1)},
- Include("root"),
- },
- }
-}
diff --git a/lexers/g/groff.go b/lexers/g/groff.go
deleted file mode 100644
index 65a7093..0000000
--- a/lexers/g/groff.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package g
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Groff lexer.
-var Groff = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Groff",
- Aliases: []string{"groff", "nroff", "man"},
- Filenames: []string{"*.[1-9]", "*.1p", "*.3pm", "*.man"},
- MimeTypes: []string{"application/x-troff", "text/troff"},
- },
- func() Rules {
- return Rules{
- "root": {
- {`(\.)(\w+)`, ByGroups(Text, Keyword), Push("request")},
- {`\.`, Punctuation, Push("request")},
- {`[^\\\n]+`, Text, Push("textline")},
- Default(Push("textline")),
- },
- "textline": {
- Include("escapes"),
- {`[^\\\n]+`, Text, nil},
- {`\n`, Text, Pop(1)},
- },
- "escapes": {
- {`\\"[^\n]*`, Comment, nil},
- {`\\[fn]\w`, LiteralStringEscape, nil},
- {`\\\(.{2}`, LiteralStringEscape, nil},
- {`\\.\[.*\]`, LiteralStringEscape, nil},
- {`\\.`, LiteralStringEscape, nil},
- {`\\\n`, Text, Push("request")},
- },
- "request": {
- {`\n`, Text, Pop(1)},
- Include("escapes"),
- {`"[^\n"]+"`, LiteralStringDouble, nil},
- {`\d+`, LiteralNumber, nil},
- {`\S+`, LiteralString, nil},
- {`\s+`, Text, nil},
- },
- }
- },
-))
diff --git a/lexers/g/groovy.go b/lexers/g/groovy.go
deleted file mode 100644
index 8d37bd8..0000000
--- a/lexers/g/groovy.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package g
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Groovy lexer.
-var Groovy = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Groovy",
- Aliases: []string{"groovy"},
- Filenames: []string{"*.groovy", "*.gradle"},
- MimeTypes: []string{"text/x-groovy"},
- DotAll: true,
- },
- groovyRules,
-))
-
-func groovyRules() Rules {
- return 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/lexers/g/genshi.go b/lexers/genshi.go
similarity index 75%
rename from lexers/g/genshi.go
rename to lexers/genshi.go
index dc4d4b1..7f396f4 100644
--- a/lexers/g/genshi.go
+++ b/lexers/genshi.go
@@ -1,13 +1,11 @@
-package g
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
- . "github.com/alecthomas/chroma/lexers/p"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// Genshi Text lexer.
-var GenshiText = internal.Register(MustNewLazyLexer(
+var GenshiText = Register(MustNewLexer(
&Config{
Name: "Genshi Text",
Aliases: []string{"genshitext"},
@@ -28,20 +26,20 @@ func genshiTextRules() Rules {
},
"directive": {
{`\n`, Text, Pop(1)},
- {`(?:def|for|if)\s+.*`, Using(Python), Pop(1)},
- {`(choose|when|with)([^\S\n]+)(.*)`, ByGroups(Keyword, Text, Using(Python)), Pop(1)},
+ {`(?:def|for|if)\s+.*`, Using("Python"), Pop(1)},
+ {`(choose|when|with)([^\S\n]+)(.*)`, ByGroups(Keyword, Text, Using("Python")), Pop(1)},
{`(choose|otherwise)\b`, Keyword, Pop(1)},
{`(end\w*)([^\S\n]*)(.*)`, ByGroups(Keyword, Text, Comment), Pop(1)},
},
"variable": {
- {`(?)`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
+ {`(<\?python)(.*?)(\?>)`, ByGroups(CommentPreproc, Using("Python"), 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")},
@@ -83,8 +81,8 @@ func genshiMarkupRules() Rules {
{`/?\s*>`, NameTag, Pop(1)},
},
"pyattr": {
- {`(")(.*?)(")`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)},
- {`(')(.*?)(')`, ByGroups(LiteralString, Using(Python), LiteralString), Pop(1)},
+ {`(")(.*?)(")`, ByGroups(LiteralString, Using("Python"), LiteralString), Pop(1)},
+ {`(')(.*?)(')`, ByGroups(LiteralString, Using("Python"), LiteralString), Pop(1)},
{`[^\s>]+`, LiteralString, Pop(1)},
},
"tag": {
@@ -113,7 +111,7 @@ func genshiMarkupRules() Rules {
Include("variable"),
},
"variable": {
- {`(?>=|<<|>>|<=|>=|&\^=|&\^|\+=|-=|\*=|/=|%=|&=|\|=|&&|\|\||<-|\+\+|--|==|!=|:=|\.\.\.|[+\-*/%&])`, Operator, nil},
{`([a-zA-Z_]\w*)(\s*)(\()`, ByGroups(NameFunction, UsingSelf("root"), Punctuation), nil},
@@ -63,61 +61,22 @@ func goRules() Rules {
}
}
-func goTemplateRules() Rules {
- return Rules{
- "root": {
- {`{{(- )?/\*(.|\n)*?\*/( -)?}}`, CommentMultiline, nil},
- {`{{[-]?`, CommentPreproc, Push("template")},
- {`[^{]+`, Other, nil},
- {`{`, Other, nil},
- },
- "template": {
- {`[-]?}}`, CommentPreproc, Pop(1)},
- {`(?=}})`, CommentPreproc, Pop(1)}, // Terminate the pipeline
- {`\(`, Operator, Push("subexpression")},
- {`"(\\\\|\\"|[^"])*"`, LiteralString, nil},
- Include("expression"),
- },
- "subexpression": {
- {`\)`, Operator, Pop(1)},
- Include("expression"),
- },
- "expression": {
- {`\s+`, Whitespace, nil},
- {`\(`, Operator, Push("subexpression")},
- {`(range|if|else|while|with|template|end|true|false|nil|and|call|html|index|js|len|not|or|print|printf|println|urlquery|eq|ne|lt|le|gt|ge)\b`, Keyword, nil},
- {`\||:?=|,`, Operator, nil},
- {`[$]?[^\W\d]\w*`, NameOther, nil},
- {`\$|[$]?\.(?:[^\W\d]\w*)?`, NameAttribute, nil},
- {`"(\\\\|\\"|[^"])*"`, LiteralString, 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},
- {`-?0b[01_]+`, LiteralNumberBin, 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},
- },
- }
-}
-
-var GoHTMLTemplate = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer(
+var GoHTMLTemplate = Register(DelegatingLexer(HTML, MustNewXMLLexer(
+ embedded,
+ "embedded/go_template.xml",
+).SetConfig(
&Config{
Name: "Go HTML Template",
Aliases: []string{"go-html-template"},
},
- goTemplateRules,
)))
-var GoTextTemplate = internal.Register(MustNewLazyLexer(
+var GoTextTemplate = Register(MustNewXMLLexer(
+ embedded,
+ "embedded/go_template.xml",
+).SetConfig(
&Config{
Name: "Go Text Template",
Aliases: []string{"go-text-template"},
},
- goTemplateRules,
))
diff --git a/lexers/g/go_test.go b/lexers/go_test.go
similarity index 98%
rename from lexers/g/go_test.go
rename to lexers/go_test.go
index 050ff88..3713f24 100644
--- a/lexers/g/go_test.go
+++ b/lexers/go_test.go
@@ -1,9 +1,9 @@
-package g
+package lexers
import (
"testing"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
"github.com/stretchr/testify/assert"
)
diff --git a/lexers/h/handlebars.go b/lexers/h/handlebars.go
deleted file mode 100644
index d34ef3a..0000000
--- a/lexers/h/handlebars.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package h
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Handlebars lexer.
-var Handlebars = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Handlebars",
- Aliases: []string{"handlebars", "hbs"},
- Filenames: []string{"*.handlebars", "*.hbs"},
- MimeTypes: []string{},
- },
- handlebarsRules,
-))
-
-func handlebarsRules() Rules {
- return 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/lexers/h/haskell.go b/lexers/h/haskell.go
deleted file mode 100644
index e34f03e..0000000
--- a/lexers/h/haskell.go
+++ /dev/null
@@ -1,103 +0,0 @@
-package h
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Haskell lexer.
-var Haskell = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Haskell",
- Aliases: []string{"haskell", "hs"},
- Filenames: []string{"*.hs"},
- MimeTypes: []string{"text/x-haskell"},
- },
- haskellRules,
-))
-
-func haskellRules() Rules {
- return 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},
- {`^[_\p{Ll}][\w\']*`, NameFunction, nil},
- {`'?[_\p{Ll}][\w']*`, Name, nil},
- {`('')?[\p{Lu}][\w\']*`, KeywordType, nil},
- {`(')[\p{Lu}][\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},
- {`([\p{Lu}][\w.]*)(\s+)(as)(\s+)([\p{Lu}][\w.]*)`, ByGroups(NameNamespace, Text, Keyword, Text, Name), Pop(1)},
- {`([\p{Lu}][\w.]*)(\s+)(hiding)(\s+)(\()`, ByGroups(NameNamespace, Text, Keyword, Text, Punctuation), Push("funclist")},
- {`([\p{Lu}][\w.]*)(\s+)(\()`, ByGroups(NameNamespace, Text, Punctuation), Push("funclist")},
- {`[\w.]+`, NameNamespace, Pop(1)},
- },
- "module": {
- {`\s+`, Text, nil},
- {`([\p{Lu}][\w.]*)(\s+)(\()`, ByGroups(NameNamespace, Text, Punctuation), Push("funclist")},
- {`[\p{Lu}][\w.]*`, NameNamespace, Pop(1)},
- },
- "funclist": {
- {`\s+`, Text, nil},
- {`[\p{Lu}]\w*`, KeywordType, nil},
- {`(_[\w\']+|[\p{Ll}][\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)},
- {`\^[][\p{Lu}@^_]`, 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/lexers/h/hcl.go b/lexers/h/hcl.go
deleted file mode 100644
index 7206fba..0000000
--- a/lexers/h/hcl.go
+++ /dev/null
@@ -1,73 +0,0 @@
-package h
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// HCL lexer.
-var HCL = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "HCL",
- Aliases: []string{"hcl"},
- Filenames: []string{"*.hcl"},
- MimeTypes: []string{"application/x-hcl"},
- },
- hclRules,
-))
-
-func hclRules() Rules {
- return 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(Name, Text, Operator), nil},
- {`\d+`, Number, nil},
- {`\b\w+\b`, Keyword, 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/lexers/h/hexdump.go b/lexers/h/hexdump.go
deleted file mode 100644
index 0893537..0000000
--- a/lexers/h/hexdump.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package h
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Hexdump lexer.
-var Hexdump = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Hexdump",
- Aliases: []string{"hexdump"},
- Filenames: []string{},
- MimeTypes: []string{},
- },
- hexdumpRules,
-))
-
-func hexdumpRules() Rules {
- return 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/lexers/h/hlb.go b/lexers/h/hlb.go
deleted file mode 100644
index 6c5f637..0000000
--- a/lexers/h/hlb.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package h
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// HLB lexer.
-var HLB = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "HLB",
- Aliases: []string{"hlb"},
- Filenames: []string{"*.hlb"},
- MimeTypes: []string{},
- },
- hlbRules,
-))
-
-func hlbRules() Rules {
- return Rules{
- "root": {
- {`(#.*)`, ByGroups(CommentSingle), nil},
- {`((\b(0(b|B|o|O|x|X)[a-fA-F0-9]+)\b)|(\b(0|[1-9][0-9]*)\b))`, ByGroups(LiteralNumber), nil},
- {`((\b(true|false)\b))`, ByGroups(NameBuiltin), nil},
- {`(\bstring\b|\bint\b|\bbool\b|\bfs\b|\boption\b)`, ByGroups(KeywordType), nil},
- {`(\b[a-zA-Z_][a-zA-Z0-9]*\b)(\()`, ByGroups(NameFunction, Punctuation), Push("params")},
- {`(\{)`, ByGroups(Punctuation), Push("block")},
- {`(\n|\r|\r\n)`, Text, nil},
- {`.`, Text, nil},
- },
- "string": {
- {`"`, LiteralString, Pop(1)},
- {`\\"`, LiteralString, nil},
- {`[^\\"]+`, LiteralString, nil},
- },
- "block": {
- {`(\})`, ByGroups(Punctuation), Pop(1)},
- {`(#.*)`, ByGroups(CommentSingle), nil},
- {`((\b(0(b|B|o|O|x|X)[a-fA-F0-9]+)\b)|(\b(0|[1-9][0-9]*)\b))`, ByGroups(LiteralNumber), nil},
- {`((\b(true|false)\b))`, ByGroups(KeywordConstant), nil},
- {`"`, LiteralString, Push("string")},
- {`(with)`, ByGroups(KeywordReserved), nil},
- {`(as)([\t ]+)(\b[a-zA-Z_][a-zA-Z0-9]*\b)`, ByGroups(KeywordReserved, Text, NameFunction), nil},
- {`(\bstring\b|\bint\b|\bbool\b|\bfs\b|\boption\b)([\t ]+)(\{)`, ByGroups(KeywordType, Text, Punctuation), Push("block")},
- {`(?!\b(?:scratch|image|resolve|http|checksum|chmod|filename|git|keepGitDir|local|includePatterns|excludePatterns|followPaths|generate|frontendInput|shell|run|readonlyRootfs|env|dir|user|network|security|host|ssh|secret|mount|target|localPath|uid|gid|mode|readonly|tmpfs|sourcePath|cache|mkdir|createParents|chown|createdTime|mkfile|rm|allowNotFound|allowWildcards|copy|followSymlinks|contentsOnly|unpack|createDestPath)\b)(\b[a-zA-Z_][a-zA-Z0-9]*\b)`, ByGroups(NameOther), nil},
- {`(\n|\r|\r\n)`, Text, nil},
- {`.`, Text, nil},
- },
- "params": {
- {`(\))`, ByGroups(Punctuation), Pop(1)},
- {`(variadic)`, ByGroups(Keyword), nil},
- {`(\bstring\b|\bint\b|\bbool\b|\bfs\b|\boption\b)`, ByGroups(KeywordType), nil},
- {`(\b[a-zA-Z_][a-zA-Z0-9]*\b)`, ByGroups(NameOther), nil},
- {`(\n|\r|\r\n)`, Text, nil},
- {`.`, Text, nil},
- },
- }
-}
diff --git a/lexers/h/hy.go b/lexers/h/hy.go
deleted file mode 100644
index 7a07897..0000000
--- a/lexers/h/hy.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package h
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Hy lexer.
-var Hy = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Hy",
- Aliases: []string{"hylang"},
- Filenames: []string{"*.hy"},
- MimeTypes: []string{"text/x-hy", "application/x-hy"},
- },
- hyRules,
-))
-
-func hyRules() Rules {
- return 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(Punctuation, Text, Punctuation, Text, NameTag, Text, Punctuation), Pop(1)},
- {`.+?(?=<\s*/\s*script\s*>)`, Using(Javascript), nil},
+ {`.+?(?=<\s*/\s*script\s*>)`, Using("Javascript"), nil},
},
"style-content": {
{`(<)(\s*)(/)(\s*)(style)(\s*)(>)`, ByGroups(Punctuation, Text, Punctuation, Text, NameTag, Text, Punctuation), Pop(1)},
- {`.+?(?=<\s*/\s*style\s*>)`, Using(CSS), nil},
+ {`.+?(?=<\s*/\s*style\s*>)`, Using("CSS"), nil},
},
"attr": {
{`".*?"`, LiteralString, Pop(1)},
diff --git a/lexers/h/http.go b/lexers/http.go
similarity index 92%
rename from lexers/h/http.go
rename to lexers/http.go
index c515ed4..e756202 100644
--- a/lexers/h/http.go
+++ b/lexers/http.go
@@ -1,14 +1,13 @@
-package h
+package lexers
import (
"strings"
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// HTTP lexer.
-var HTTP = internal.Register(httpBodyContentTypeLexer(MustNewLazyLexer(
+var HTTP = Register(httpBodyContentTypeLexer(MustNewLexer(
&Config{
Name: "HTTP",
Aliases: []string{"http"},
@@ -105,7 +104,7 @@ func (d *httpBodyContentTyper) Tokenise(options *TokeniseOptions, text string) (
}
case token.Type == Generic && contentType != "":
{
- lexer := internal.MatchMimeType(contentType)
+ lexer := MatchMimeType(contentType)
// application/calendar+xml can be treated as application/xml
// if there's not a better match.
@@ -113,7 +112,7 @@ func (d *httpBodyContentTyper) Tokenise(options *TokeniseOptions, text string) (
slashPos := strings.Index(contentType, "/")
plusPos := strings.LastIndex(contentType, "+")
contentType = contentType[:slashPos+1] + contentType[plusPos+1:]
- lexer = internal.MatchMimeType(contentType)
+ lexer = MatchMimeType(contentType)
}
if lexer == nil {
diff --git a/lexers/i/idris.go b/lexers/i/idris.go
deleted file mode 100644
index fb5378e..0000000
--- a/lexers/i/idris.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package i
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Idris lexer.
-var Idris = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Idris",
- Aliases: []string{"idris", "idr"},
- Filenames: []string{"*.idr"},
- MimeTypes: []string{"text/x-idris"},
- },
- idrisRules,
-))
-
-func idrisRules() Rules {
- return Rules{
- "root": {
- {`^(\s*)(%lib|link|flag|include|hide|freeze|access|default|logging|dynamic|name|error_handlers|language)`, ByGroups(Text, KeywordReserved), nil},
- {`(\s*)(--(?![!#$%&*+./<=>?@^|_~:\\]).*?)$`, 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/lexers/i/igor.go b/lexers/i/igor.go
deleted file mode 100644
index bbb1d72..0000000
--- a/lexers/i/igor.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package i
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Igor lexer.
-var Igor = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Igor",
- Aliases: []string{"igor", "igorpro"},
- Filenames: []string{"*.ipf"},
- MimeTypes: []string{"text/ipf"},
- CaseInsensitive: true,
- },
- igorRules,
-))
-
-func igorRules() Rules {
- return Rules{
- "root": {
- {`//.*$`, CommentSingle, nil},
- {`"([^"\\]|\\.)*"`, LiteralString, nil},
- {Words(`\b`, `\b`, `if`, `else`, `elseif`, `endif`, `for`, `endfor`, `strswitch`, `switch`, `case`, `default`, `endswitch`, `do`, `while`, `try`, `catch`, `endtry`, `break`, `continue`, `return`, `AbortOnRTE`, `AbortOnValue`), Keyword, nil},
- {Words(`\b`, `\b`, `variable`, `string`, `constant`, `strconstant`, `NVAR`, `SVAR`, `WAVE`, `STRUCT`, `dfref`, `funcref`, `char`, `uchar`, `int16`, `uint16`, `int32`, `uint32`, `int64`, `uint64`, `float`, `double`), KeywordType, nil},
- {Words(`\b`, `\b`, `override`, `ThreadSafe`, `MultiThread`, `static`, `Proc`, `Picture`, `Prompt`, `DoPrompt`, `macro`, `window`, `function`, `end`, `Structure`, `EndStructure`, `EndMacro`, `Menu`, `SubMenu`), KeywordReserved, nil},
- {Words(`\b`, `\b`, `Abort`, `AddFIFOData`, `AddFIFOVectData`, `AddMovieAudio`, `AddMovieFrame`, `AddWavesToBoxPlot`, `AddWavesToViolinPlot`, `AdoptFiles`, `APMath`, `Append`, `AppendBoxPlot`, `AppendImage`, `AppendLayoutObject`, `AppendMatrixContour`, `AppendText`, `AppendToGizmo`, `AppendToGraph`, `AppendToLayout`, `AppendToTable`, `AppendViolinPlot`, `AppendXYZContour`, `AutoPositionWindow`, `AxonTelegraphFindServers`, `BackgroundInfo`, `Beep`, `BoundingBall`, `BoxSmooth`, `BrowseURL`, `BuildMenu`, `Button`, `cd`, `Chart`, `CheckBox`, `CheckDisplayed`, `ChooseColor`, `Close`, `CloseHelp`, `CloseMovie`, `CloseProc`, `ColorScale`, `ColorTab2Wave`, `Concatenate`, `ControlBar`, `ControlInfo`, `ControlUpdate`, `ConvertGlobalStringTextEncoding`, `ConvexHull`, `Convolve`, `CopyDimLabels`, `CopyFile`, `CopyFolder`, `CopyScales`, `Correlate`, `CreateAliasShortcut`, `CreateBrowser`, `Cross`, `CtrlBackground`, `CtrlFIFO`, `CtrlNamedBackground`, `Cursor`, `CurveFit`, `CustomControl`, `CWT`, `DAQmx_AI_SetupReader`, `DAQmx_AO_SetOutputs`, `DAQmx_CTR_CountEdges`, `DAQmx_CTR_OutputPulse`, `DAQmx_CTR_Period`, `DAQmx_CTR_PulseWidth`, `DAQmx_DIO_Config`, `DAQmx_DIO_WriteNewData`, `DAQmx_Scan`, `DAQmx_WaveformGen`, `Debugger`, `DebuggerOptions`, `DefaultFont`, `DefaultGuiControls`, `DefaultGuiFont`, `DefaultTextEncoding`, `DefineGuide`, `DelayUpdate`, `DeleteAnnotations`, `DeleteFile`, `DeleteFolder`, `DeletePoints`, `Differentiate`, `dir`, `Display`, `DisplayHelpTopic`, `DisplayProcedure`, `DoAlert`, `DoIgorMenu`, `DoUpdate`, `DoWindow`, `DoXOPIdle`, `DPSS`, `DrawAction`, `DrawArc`, `DrawBezier`, `DrawLine`, `DrawOval`, `DrawPICT`, `DrawPoly`, `DrawRect`, `DrawRRect`, `DrawText`, `DrawUserShape`, `DSPDetrend`, `DSPPeriodogram`, `Duplicate`, `DuplicateDataFolder`, `DWT`, `EdgeStats`, `Edit`, `ErrorBars`, `EstimatePeakSizes`, `Execute`, `ExecuteScriptText`, `ExperimentInfo`, `ExperimentModified`, `ExportGizmo`, `Extract`, `FastGaussTransform`, `FastOp`, `FBinRead`, `FBinWrite`, `FFT`, `FGetPos`, `FIFOStatus`, `FIFO2Wave`, `FilterFIR`, `FilterIIR`, `FindAPeak`, `FindContour`, `FindDuplicates`, `FindLevel`, `FindLevels`, `FindPeak`, `FindPointsInPoly`, `FindRoots`, `FindSequence`, `FindValue`, `FMaxFlat`, `FPClustering`, `fprintf`, `FReadLine`, `FSetPos`, `FStatus`, `FTPCreateDirectory`, `FTPDelete`, `FTPDownload`, `FTPUpload`, `FuncFit`, `FuncFitMD`, `GBLoadWave`, `GetAxis`, `GetCamera`, `GetFileFolderInfo`, `GetGizmo`, `GetLastUserMenuInfo`, `GetMarquee`, `GetMouse`, `GetSelection`, `GetWindow`, `GISCreateVectorLayer`, `GISGetRasterInfo`, `GISGetRegisteredFileInfo`, `GISGetVectorLayerInfo`, `GISLoadRasterData`, `GISLoadVectorData`, `GISRasterizeVectorData`, `GISRegisterFile`, `GISTransformCoords`, `GISUnRegisterFile`, `GISWriteFieldData`, `GISWriteGeometryData`, `GISWriteRaster`, `GPIBReadBinaryWave2`, `GPIBReadBinary2`, `GPIBReadWave2`, `GPIBRead2`, `GPIBWriteBinaryWave2`, `GPIBWriteBinary2`, `GPIBWriteWave2`, `GPIBWrite2`, `GPIB2`, `GraphNormal`, `GraphWaveDraw`, `GraphWaveEdit`, `Grep`, `GroupBox`, `Hanning`, `HDFInfo`, `HDFReadImage`, `HDFReadSDS`, `HDFReadVset`, `HDF5CloseFile`, `HDF5CloseGroup`, `HDF5ConvertColors`, `HDF5CreateFile`, `HDF5CreateGroup`, `HDF5CreateLink`, `HDF5Dump`, `HDF5DumpErrors`, `HDF5DumpState`, `HDF5FlushFile`, `HDF5ListAttributes`, `HDF5ListGroup`, `HDF5LoadData`, `HDF5LoadGroup`, `HDF5LoadImage`, `HDF5OpenFile`, `HDF5OpenGroup`, `HDF5SaveData`, `HDF5SaveGroup`, `HDF5SaveImage`, `HDF5TestOperation`, `HDF5UnlinkObject`, `HideIgorMenus`, `HideInfo`, `HideProcedures`, `HideTools`, `HilbertTransform`, `Histogram`, `ICA`, `IFFT`, `ImageAnalyzeParticles`, `ImageBlend`, `ImageBoundaryToMask`, `ImageComposite`, `ImageEdgeDetection`, `ImageFileInfo`, `ImageFilter`, `ImageFocus`, `ImageFromXYZ`, `ImageGenerateROIMask`, `ImageGLCM`, `ImageHistModification`, `ImageHistogram`, `ImageInterpolate`, `ImageLineProfile`, `ImageLoad`, `ImageMorphology`, `ImageRegistration`, `ImageRemoveBackground`, `ImageRestore`, `ImageRotate`, `ImageSave`, `ImageSeedFill`, `ImageSkeleton3d`, `ImageSnake`, `ImageStats`, `ImageThreshold`, `ImageTransform`, `ImageUnwrapPhase`, `ImageWindow`, `IndexSort`, `InsertPoints`, `Integrate`, `IntegrateODE`, `Integrate2D`, `Interpolate2`, `Interpolate3D`, `Interp3DPath`, `ITCCloseAll2`, `ITCCloseDevice2`, `ITCConfigAllChannels2`, `ITCConfigChannelReset2`, `ITCConfigChannelUpload2`, `ITCConfigChannel2`, `ITCFIFOAvailableAll2`, `ITCFIFOAvailable2`, `ITCGetAllChannelsConfig2`, `ITCGetChannelConfig2`, `ITCGetCurrentDevice2`, `ITCGetDeviceInfo2`, `ITCGetDevices2`, `ITCGetErrorString2`, `ITCGetSerialNumber2`, `ITCGetState2`, `ITCGetVersions2`, `ITCInitialize2`, `ITCOpenDevice2`, `ITCReadADC2`, `ITCReadDigital2`, `ITCReadTimer2`, `ITCSelectDevice2`, `ITCSetDAC2`, `ITCSetGlobals2`, `ITCSetModes2`, `ITCSetState2`, `ITCStartAcq2`, `ITCStopAcq2`, `ITCUpdateFIFOPositionAll2`, `ITCUpdateFIFOPosition2`, `ITCWriteDigital2`, `JCAMPLoadWave`, `JointHistogram`, `KillBackground`, `KillControl`, `KillDataFolder`, `KillFIFO`, `KillFreeAxis`, `KillPath`, `KillPICTs`, `KillStrings`, `KillVariables`, `KillWaves`, `KillWindow`, `KMeans`, `Label`, `Layout`, `LayoutPageAction`, `LayoutSlideShow`, `Legend`, `LinearFeedbackShiftRegister`, `ListBox`, `LoadData`, `LoadPackagePreferences`, `LoadPICT`, `LoadWave`, `Loess`, `LombPeriodogram`, `Make`, `MakeIndex`, `MarkPerfTestTime`, `MatrixConvolve`, `MatrixCorr`, `MatrixEigenV`, `MatrixFilter`, `MatrixGaussJ`, `MatrixGLM`, `MatrixInverse`, `MatrixLinearSolve`, `MatrixLinearSolveTD`, `MatrixLLS`, `MatrixLUBkSub`, `MatrixLUD`, `MatrixLUDTD`, `MatrixMultiply`, `MatrixOP`, `MatrixSchur`, `MatrixSolve`, `MatrixSVBkSub`, `MatrixSVD`, `MatrixTranspose`, `MCC_FindServers`, `MeasureStyledText`, `MFR_CheckForNewBricklets`, `MFR_CloseResultFile`, `MFR_CreateOverviewTable`, `MFR_GetBrickletCount`, `MFR_GetBrickletData`, `MFR_GetBrickletDeployData`, `MFR_GetBrickletMetaData`, `MFR_GetBrickletRawData`, `MFR_GetReportTemplate`, `MFR_GetResultFileMetaData`, `MFR_GetResultFileName`, `MFR_GetVernissageVersion`, `MFR_GetVersion`, `MFR_GetXOPErrorMessage`, `MFR_OpenResultFile`, `MLLoadWave`, `Modify`, `ModifyBoxPlot`, `ModifyBrowser`, `ModifyCamera`, `ModifyContour`, `ModifyControl`, `ModifyControlList`, `ModifyFreeAxis`, `ModifyGizmo`, `ModifyGraph`, `ModifyImage`, `ModifyLayout`, `ModifyPanel`, `ModifyTable`, `ModifyViolinPlot`, `ModifyWaterfall`, `MoveDataFolder`, `MoveFile`, `MoveFolder`, `MoveString`, `MoveSubwindow`, `MoveVariable`, `MoveWave`, `MoveWindow`, `MultiTaperPSD`, `MultiThreadingControl`, `NC_CloseFile`, `NC_DumpErrors`, `NC_Inquire`, `NC_ListAttributes`, `NC_ListObjects`, `NC_LoadData`, `NC_OpenFile`, `NeuralNetworkRun`, `NeuralNetworkTrain`, `NewCamera`, `NewDataFolder`, `NewFIFO`, `NewFIFOChan`, `NewFreeAxis`, `NewGizmo`, `NewImage`, `NewLayout`, `NewMovie`, `NewNotebook`, `NewPanel`, `NewPath`, `NewWaterfall`, `NILoadWave`, `NI4882`, `Note`, `Notebook`, `NotebookAction`, `Open`, `OpenHelp`, `OpenNotebook`, `Optimize`, `ParseOperationTemplate`, `PathInfo`, `PauseForUser`, `PauseUpdate`, `PCA`, `PlayMovie`, `PlayMovieAction`, `PlaySound`, `PopupContextualMenu`, `PopupMenu`, `Preferences`, `PrimeFactors`, `Print`, `printf`, `PrintGraphs`, `PrintLayout`, `PrintNotebook`, `PrintSettings`, `PrintTable`, `Project`, `PulseStats`, `PutScrapText`, `pwd`, `Quit`, `RatioFromNumber`, `Redimension`, `Remez`, `Remove`, `RemoveContour`, `RemoveFromGizmo`, `RemoveFromGraph`, `RemoveFromLayout`, `RemoveFromTable`, `RemoveImage`, `RemoveLayoutObjects`, `RemovePath`, `Rename`, `RenameDataFolder`, `RenamePath`, `RenamePICT`, `RenameWindow`, `ReorderImages`, `ReorderTraces`, `ReplaceText`, `ReplaceWave`, `Resample`, `ResumeUpdate`, `Reverse`, `Rotate`, `Save`, `SaveData`, `SaveExperiment`, `SaveGizmoCopy`, `SaveGraphCopy`, `SaveNotebook`, `SavePackagePreferences`, `SavePICT`, `SaveTableCopy`, `SetActiveSubwindow`, `SetAxis`, `SetBackground`, `SetDashPattern`, `SetDataFolder`, `SetDimLabel`, `SetDrawEnv`, `SetDrawLayer`, `SetFileFolderInfo`, `SetFormula`, `SetIdlePeriod`, `SetIgorHook`, `SetIgorMenuMode`, `SetIgorOption`, `SetMarquee`, `SetProcessSleep`, `SetRandomSeed`, `SetScale`, `SetVariable`, `SetWaveLock`, `SetWaveTextEncoding`, `SetWindow`, `ShowIgorMenus`, `ShowInfo`, `ShowTools`, `Silent`, `Sleep`, `Slider`, `Smooth`, `SmoothCustom`, `Sort`, `SortColumns`, `SoundInRecord`, `SoundInSet`, `SoundInStartChart`, `SoundInStatus`, `SoundInStopChart`, `SoundLoadWave`, `SoundSaveWave`, `SphericalInterpolate`, `SphericalTriangulate`, `SplitString`, `SplitWave`, `sprintf`, `SQLHighLevelOp`, `sscanf`, `Stack`, `StackWindows`, `StatsAngularDistanceTest`, `StatsANOVA1Test`, `StatsANOVA2NRTest`, `StatsANOVA2RMTest`, `StatsANOVA2Test`, `StatsChiTest`, `StatsCircularCorrelationTest`, `StatsCircularMeans`, `StatsCircularMoments`, `StatsCircularTwoSampleTest`, `StatsCochranTest`, `StatsContingencyTable`, `StatsDIPTest`, `StatsDunnettTest`, `StatsFriedmanTest`, `StatsFTest`, `StatsHodgesAjneTest`, `StatsJBTest`, `StatsKDE`, `StatsKendallTauTest`, `StatsKSTest`, `StatsKWTest`, `StatsLinearCorrelationTest`, `StatsLinearRegression`, `StatsMultiCorrelationTest`, `StatsNPMCTest`, `StatsNPNominalSRTest`, `StatsQuantiles`, `StatsRankCorrelationTest`, `StatsResample`, `StatsSample`, `StatsScheffeTest`, `StatsShapiroWilkTest`, `StatsSignTest`, `StatsSRTest`, `StatsTTest`, `StatsTukeyTest`, `StatsVariancesTest`, `StatsWatsonUSquaredTest`, `StatsWatsonWilliamsTest`, `StatsWheelerWatsonTest`, `StatsWilcoxonRankTest`, `StatsWRCorrelationTest`, `STFT`, `String`, `StructFill`, `StructGet`, `StructPut`, `SumDimension`, `SumSeries`, `TabControl`, `Tag`, `TDMLoadData`, `TDMSaveData`, `TextBox`, `ThreadGroupPutDF`, `ThreadStart`, `TickWavesFromAxis`, `Tile`, `TileWindows`, `TitleBox`, `ToCommandLine`, `ToolsGrid`, `Triangulate3d`, `Unwrap`, `URLRequest`, `ValDisplay`, `Variable`, `VDTClosePort2`, `VDTGetPortList2`, `VDTGetStatus2`, `VDTOpenPort2`, `VDTOperationsPort2`, `VDTReadBinaryWave2`, `VDTReadBinary2`, `VDTReadHexWave2`, `VDTReadHex2`, `VDTReadWave2`, `VDTRead2`, `VDTTerminalPort2`, `VDTWriteBinaryWave2`, `VDTWriteBinary2`, `VDTWriteHexWave2`, `VDTWriteHex2`, `VDTWriteWave2`, `VDTWrite2`, `VDT2`, `VISAControl`, `VISARead`, `VISAReadBinary`, `VISAReadBinaryWave`, `VISAReadWave`, `VISAWrite`, `VISAWriteBinary`, `VISAWriteBinaryWave`, `VISAWriteWave`, `WaveMeanStdv`, `WaveStats`, `WaveTransform`, `wfprintf`, `WignerTransform`, `WindowFunction`, `XLLoadWave`), NameClass, nil},
- {Words(`\b`, `\b`, `abs`, `acos`, `acosh`, `AddListItem`, `AiryA`, `AiryAD`, `AiryB`, `AiryBD`, `alog`, `AnnotationInfo`, `AnnotationList`, `area`, `areaXY`, `asin`, `asinh`, `atan`, `atanh`, `atan2`, `AxisInfo`, `AxisList`, `AxisValFromPixel`, `AxonTelegraphAGetDataNum`, `AxonTelegraphAGetDataString`, `AxonTelegraphAGetDataStruct`, `AxonTelegraphGetDataNum`, `AxonTelegraphGetDataString`, `AxonTelegraphGetDataStruct`, `AxonTelegraphGetTimeoutMs`, `AxonTelegraphSetTimeoutMs`, `Base64Decode`, `Base64Encode`, `Besseli`, `Besselj`, `Besselk`, `Bessely`, `beta`, `betai`, `BinarySearch`, `BinarySearchInterp`, `binomial`, `binomialln`, `binomialNoise`, `cabs`, `CaptureHistory`, `CaptureHistoryStart`, `ceil`, `cequal`, `char2num`, `chebyshev`, `chebyshevU`, `CheckName`, `ChildWindowList`, `CleanupName`, `cmplx`, `cmpstr`, `conj`, `ContourInfo`, `ContourNameList`, `ContourNameToWaveRef`, `ContourZ`, `ControlNameList`, `ConvertTextEncoding`, `cos`, `cosh`, `cosIntegral`, `cot`, `coth`, `CountObjects`, `CountObjectsDFR`, `cpowi`, `CreationDate`, `csc`, `csch`, `CsrInfo`, `CsrWave`, `CsrWaveRef`, `CsrXWave`, `CsrXWaveRef`, `CTabList`, `DataFolderDir`, `DataFolderExists`, `DataFolderRefsEqual`, `DataFolderRefStatus`, `date`, `datetime`, `DateToJulian`, `date2secs`, `Dawson`, `defined`, `deltax`, `digamma`, `dilogarithm`, `DimDelta`, `DimOffset`, `DimSize`, `ei`, `enoise`, `equalWaves`, `erf`, `erfc`, `erfcw`, `exists`, `exp`, `expInt`, `expIntegralE1`, `expNoise`, `factorial`, `Faddeeva`, `fakedata`, `faverage`, `faverageXY`, `fDAQmx_AI_GetReader`, `fDAQmx_AO_UpdateOutputs`, `fDAQmx_ConnectTerminals`, `fDAQmx_CTR_Finished`, `fDAQmx_CTR_IsFinished`, `fDAQmx_CTR_IsPulseFinished`, `fDAQmx_CTR_ReadCounter`, `fDAQmx_CTR_ReadWithOptions`, `fDAQmx_CTR_SetPulseFrequency`, `fDAQmx_CTR_Start`, `fDAQmx_DeviceNames`, `fDAQmx_DIO_Finished`, `fDAQmx_DIO_PortWidth`, `fDAQmx_DIO_Read`, `fDAQmx_DIO_Write`, `fDAQmx_DisconnectTerminals`, `fDAQmx_ErrorString`, `fDAQmx_ExternalCalDate`, `fDAQmx_NumAnalogInputs`, `fDAQmx_NumAnalogOutputs`, `fDAQmx_NumCounters`, `fDAQmx_NumDIOPorts`, `fDAQmx_ReadChan`, `fDAQmx_ReadNamedChan`, `fDAQmx_ResetDevice`, `fDAQmx_ScanGetAvailable`, `fDAQmx_ScanGetNextIndex`, `fDAQmx_ScanStart`, `fDAQmx_ScanStop`, `fDAQmx_ScanWait`, `fDAQmx_ScanWaitWithTimeout`, `fDAQmx_SelfCalDate`, `fDAQmx_SelfCalibration`, `fDAQmx_WaveformStart`, `fDAQmx_WaveformStop`, `fDAQmx_WF_IsFinished`, `fDAQmx_WF_WaitUntilFinished`, `fDAQmx_WriteChan`, `FetchURL`, `FindDimLabel`, `FindListItem`, `floor`, `FontList`, `FontSizeHeight`, `FontSizeStringWidth`, `FresnelCos`, `FresnelSin`, `FuncRefInfo`, `FunctionInfo`, `FunctionList`, `FunctionPath`, `gamma`, `gammaEuler`, `gammaInc`, `gammaNoise`, `gammln`, `gammp`, `gammq`, `Gauss`, `Gauss1D`, `Gauss2D`, `gcd`, `GetBrowserLine`, `GetBrowserSelection`, `GetDataFolder`, `GetDataFolderDFR`, `GetDefaultFont`, `GetDefaultFontSize`, `GetDefaultFontStyle`, `GetDimLabel`, `GetEnvironmentVariable`, `GetErrMessage`, `GetFormula`, `GetIndependentModuleName`, `GetIndexedObjName`, `GetIndexedObjNameDFR`, `GetKeyState`, `GetRTErrMessage`, `GetRTError`, `GetRTLocation`, `GetRTLocInfo`, `GetRTStackInfo`, `GetScrapText`, `GetUserData`, `GetWavesDataFolder`, `GetWavesDataFolderDFR`, `GISGetAllFileFormats`, `GISSRefsAreEqual`, `GizmoInfo`, `GizmoScale`, `gnoise`, `GrepList`, `GrepString`, `GuideInfo`, `GuideNameList`, `Hash`, `hcsr`, `HDF5AttributeInfo`, `HDF5DatasetInfo`, `HDF5LibraryInfo`, `HDF5TypeInfo`, `hermite`, `hermiteGauss`, `HyperGNoise`, `HyperGPFQ`, `HyperG0F1`, `HyperG1F1`, `HyperG2F1`, `IgorInfo`, `IgorVersion`, `imag`, `ImageInfo`, `ImageNameList`, `ImageNameToWaveRef`, `IndependentModuleList`, `IndexedDir`, `IndexedFile`, `IndexToScale`, `Inf`, `Integrate1D`, `interp`, `Interp2D`, `Interp3D`, `inverseERF`, `inverseERFC`, `ItemsInList`, `JacobiCn`, `JacobiSn`, `JulianToDate`, `Laguerre`, `LaguerreA`, `LaguerreGauss`, `LambertW`, `LayoutInfo`, `leftx`, `LegendreA`, `limit`, `ListMatch`, `ListToTextWave`, `ListToWaveRefWave`, `ln`, `log`, `logNormalNoise`, `lorentzianNoise`, `LowerStr`, `MacroList`, `magsqr`, `MandelbrotPoint`, `MarcumQ`, `MatrixCondition`, `MatrixDet`, `MatrixDot`, `MatrixRank`, `MatrixTrace`, `max`, `MCC_AutoBridgeBal`, `MCC_AutoFastComp`, `MCC_AutoPipetteOffset`, `MCC_AutoSlowComp`, `MCC_AutoWholeCellComp`, `MCC_GetBridgeBalEnable`, `MCC_GetBridgeBalResist`, `MCC_GetFastCompCap`, `MCC_GetFastCompTau`, `MCC_GetHolding`, `MCC_GetHoldingEnable`, `MCC_GetMode`, `MCC_GetNeutralizationCap`, `MCC_GetNeutralizationEnable`, `MCC_GetOscKillerEnable`, `MCC_GetPipetteOffset`, `MCC_GetPrimarySignalGain`, `MCC_GetPrimarySignalHPF`, `MCC_GetPrimarySignalLPF`, `MCC_GetRsCompBandwidth`, `MCC_GetRsCompCorrection`, `MCC_GetRsCompEnable`, `MCC_GetRsCompPrediction`, `MCC_GetSecondarySignalGain`, `MCC_GetSecondarySignalLPF`, `MCC_GetSlowCompCap`, `MCC_GetSlowCompTau`, `MCC_GetSlowCompTauX20Enable`, `MCC_GetSlowCurrentInjEnable`, `MCC_GetSlowCurrentInjLevel`, `MCC_GetSlowCurrentInjSetlTime`, `MCC_GetWholeCellCompCap`, `MCC_GetWholeCellCompEnable`, `MCC_GetWholeCellCompResist`, `MCC_SelectMultiClamp700B`, `MCC_SetBridgeBalEnable`, `MCC_SetBridgeBalResist`, `MCC_SetFastCompCap`, `MCC_SetFastCompTau`, `MCC_SetHolding`, `MCC_SetHoldingEnable`, `MCC_SetMode`, `MCC_SetNeutralizationCap`, `MCC_SetNeutralizationEnable`, `MCC_SetOscKillerEnable`, `MCC_SetPipetteOffset`, `MCC_SetPrimarySignalGain`, `MCC_SetPrimarySignalHPF`, `MCC_SetPrimarySignalLPF`, `MCC_SetRsCompBandwidth`, `MCC_SetRsCompCorrection`, `MCC_SetRsCompEnable`, `MCC_SetRsCompPrediction`, `MCC_SetSecondarySignalGain`, `MCC_SetSecondarySignalLPF`, `MCC_SetSlowCompCap`, `MCC_SetSlowCompTau`, `MCC_SetSlowCompTauX20Enable`, `MCC_SetSlowCurrentInjEnable`, `MCC_SetSlowCurrentInjLevel`, `MCC_SetSlowCurrentInjSetlTime`, `MCC_SetTimeoutMs`, `MCC_SetWholeCellCompCap`, `MCC_SetWholeCellCompEnable`, `MCC_SetWholeCellCompResist`, `mean`, `median`, `min`, `mod`, `ModDate`, `MPFXEMGPeak`, `MPFXExpConvExpPeak`, `MPFXGaussPeak`, `MPFXLorenzianPeak`, `MPFXVoigtPeak`, `NameOfWave`, `NaN`, `NewFreeDataFolder`, `NewFreeWave`, `norm`, `NormalizeUnicode`, `note`, `NumberByKey`, `numpnts`, `numtype`, `NumVarOrDefault`, `num2char`, `num2istr`, `num2str`, `NVAR_Exists`, `OperationList`, `PadString`, `PanelResolution`, `ParamIsDefault`, `ParseFilePath`, `PathList`, `pcsr`, `Pi`, `PICTInfo`, `PICTList`, `PixelFromAxisVal`, `pnt2x`, `poissonNoise`, `poly`, `PolygonArea`, `poly2D`, `PossiblyQuoteName`, `ProcedureText`, `p2rect`, `qcsr`, `real`, `RemoveByKey`, `RemoveEnding`, `RemoveFromList`, `RemoveListItem`, `ReplaceNumberByKey`, `ReplaceString`, `ReplaceStringByKey`, `rightx`, `round`, `r2polar`, `sawtooth`, `scaleToIndex`, `ScreenResolution`, `sec`, `sech`, `Secs2Date`, `Secs2Time`, `SelectNumber`, `SelectString`, `SetEnvironmentVariable`, `sign`, `sin`, `sinc`, `sinh`, `sinIntegral`, `SortList`, `SpecialCharacterInfo`, `SpecialCharacterList`, `SpecialDirPath`, `SphericalBessJ`, `SphericalBessJD`, `SphericalBessY`, `SphericalBessYD`, `SphericalHarmonics`, `SQLAllocHandle`, `SQLAllocStmt`, `SQLBinaryWavesToTextWave`, `SQLBindCol`, `SQLBindParameter`, `SQLBrowseConnect`, `SQLBulkOperations`, `SQLCancel`, `SQLCloseCursor`, `SQLColAttributeNum`, `SQLColAttributeStr`, `SQLColumnPrivileges`, `SQLColumns`, `SQLConnect`, `SQLDataSources`, `SQLDescribeCol`, `SQLDescribeParam`, `SQLDisconnect`, `SQLDriverConnect`, `SQLDrivers`, `SQLEndTran`, `SQLError`, `SQLExecDirect`, `SQLExecute`, `SQLFetch`, `SQLFetchScroll`, `SQLForeignKeys`, `SQLFreeConnect`, `SQLFreeEnv`, `SQLFreeHandle`, `SQLFreeStmt`, `SQLGetConnectAttrNum`, `SQLGetConnectAttrStr`, `SQLGetCursorName`, `SQLGetDataNum`, `SQLGetDataStr`, `SQLGetDescFieldNum`, `SQLGetDescFieldStr`, `SQLGetDescRec`, `SQLGetDiagFieldNum`, `SQLGetDiagFieldStr`, `SQLGetDiagRec`, `SQLGetEnvAttrNum`, `SQLGetEnvAttrStr`, `SQLGetFunctions`, `SQLGetInfoNum`, `SQLGetInfoStr`, `SQLGetStmtAttrNum`, `SQLGetStmtAttrStr`, `SQLGetTypeInfo`, `SQLMoreResults`, `SQLNativeSql`, `SQLNumParams`, `SQLNumResultCols`, `SQLNumResultRowsIfKnown`, `SQLNumRowsFetched`, `SQLParamData`, `SQLPrepare`, `SQLPrimaryKeys`, `SQLProcedureColumns`, `SQLProcedures`, `SQLPutData`, `SQLReinitialize`, `SQLRowCount`, `SQLSetConnectAttrNum`, `SQLSetConnectAttrStr`, `SQLSetCursorName`, `SQLSetDescFieldNum`, `SQLSetDescFieldStr`, `SQLSetDescRec`, `SQLSetEnvAttrNum`, `SQLSetEnvAttrStr`, `SQLSetPos`, `SQLSetStmtAttrNum`, `SQLSetStmtAttrStr`, `SQLSpecialColumns`, `SQLStatistics`, `SQLTablePrivileges`, `SQLTables`, `SQLTextWaveToBinaryWaves`, `SQLTextWaveTo2DBinaryWave`, `SQLUpdateBoundValues`, `SQLXOPCheckState`, `SQL2DBinaryWaveToTextWave`, `sqrt`, `StartMSTimer`, `StatsBetaCDF`, `StatsBetaPDF`, `StatsBinomialCDF`, `StatsBinomialPDF`, `StatsCauchyCDF`, `StatsCauchyPDF`, `StatsChiCDF`, `StatsChiPDF`, `StatsCMSSDCDF`, `StatsCorrelation`, `StatsDExpCDF`, `StatsDExpPDF`, `StatsErlangCDF`, `StatsErlangPDF`, `StatsErrorPDF`, `StatsEValueCDF`, `StatsEValuePDF`, `StatsExpCDF`, `StatsExpPDF`, `StatsFCDF`, `StatsFPDF`, `StatsFriedmanCDF`, `StatsGammaCDF`, `StatsGammaPDF`, `StatsGeometricCDF`, `StatsGeometricPDF`, `StatsGEVCDF`, `StatsGEVPDF`, `StatsHyperGCDF`, `StatsHyperGPDF`, `StatsInvBetaCDF`, `StatsInvBinomialCDF`, `StatsInvCauchyCDF`, `StatsInvChiCDF`, `StatsInvCMSSDCDF`, `StatsInvDExpCDF`, `StatsInvEValueCDF`, `StatsInvExpCDF`, `StatsInvFCDF`, `StatsInvFriedmanCDF`, `StatsInvGammaCDF`, `StatsInvGeometricCDF`, `StatsInvKuiperCDF`, `StatsInvLogisticCDF`, `StatsInvLogNormalCDF`, `StatsInvMaxwellCDF`, `StatsInvMooreCDF`, `StatsInvNBinomialCDF`, `StatsInvNCChiCDF`, `StatsInvNCFCDF`, `StatsInvNormalCDF`, `StatsInvParetoCDF`, `StatsInvPoissonCDF`, `StatsInvPowerCDF`, `StatsInvQCDF`, `StatsInvQpCDF`, `StatsInvRayleighCDF`, `StatsInvRectangularCDF`, `StatsInvSpearmanCDF`, `StatsInvStudentCDF`, `StatsInvTopDownCDF`, `StatsInvTriangularCDF`, `StatsInvUsquaredCDF`, `StatsInvVonMisesCDF`, `StatsInvWeibullCDF`, `StatsKuiperCDF`, `StatsLogisticCDF`, `StatsLogisticPDF`, `StatsLogNormalCDF`, `StatsLogNormalPDF`, `StatsMaxwellCDF`, `StatsMaxwellPDF`, `StatsMedian`, `StatsMooreCDF`, `StatsNBinomialCDF`, `StatsNBinomialPDF`, `StatsNCChiCDF`, `StatsNCChiPDF`, `StatsNCFCDF`, `StatsNCFPDF`, `StatsNCTCDF`, `StatsNCTPDF`, `StatsNormalCDF`, `StatsNormalPDF`, `StatsParetoCDF`, `StatsParetoPDF`, `StatsPermute`, `StatsPoissonCDF`, `StatsPoissonPDF`, `StatsPowerCDF`, `StatsPowerNoise`, `StatsPowerPDF`, `StatsQCDF`, `StatsQpCDF`, `StatsRayleighCDF`, `StatsRayleighPDF`, `StatsRectangularCDF`, `StatsRectangularPDF`, `StatsRunsCDF`, `StatsSpearmanRhoCDF`, `StatsStudentCDF`, `StatsStudentPDF`, `StatsTopDownCDF`, `StatsTriangularCDF`, `StatsTriangularPDF`, `StatsTrimmedMean`, `StatsUSquaredCDF`, `StatsVonMisesCDF`, `StatsVonMisesNoise`, `StatsVonMisesPDF`, `StatsWaldCDF`, `StatsWaldPDF`, `StatsWeibullCDF`, `StatsWeibullPDF`, `StopMSTimer`, `StringByKey`, `stringCRC`, `StringFromList`, `StringList`, `stringmatch`, `strlen`, `strsearch`, `StrVarOrDefault`, `str2num`, `StudentA`, `StudentT`, `sum`, `SVAR_Exists`, `TableInfo`, `TagVal`, `TagWaveRef`, `tan`, `tango_close_device`, `tango_command_inout`, `tango_compute_image_proj`, `tango_get_dev_attr_list`, `tango_get_dev_black_box`, `tango_get_dev_cmd_list`, `tango_get_dev_status`, `tango_get_dev_timeout`, `tango_get_error_stack`, `tango_open_device`, `tango_ping_device`, `tango_read_attribute`, `tango_read_attributes`, `tango_reload_dev_interface`, `tango_resume_attr_monitor`, `tango_set_attr_monitor_period`, `tango_set_dev_timeout`, `tango_start_attr_monitor`, `tango_stop_attr_monitor`, `tango_suspend_attr_monitor`, `tango_write_attribute`, `tango_write_attributes`, `tanh`, `TDMAddChannel`, `TDMAddGroup`, `TDMAppendDataValues`, `TDMAppendDataValuesTime`, `TDMChannelPropertyExists`, `TDMCloseChannel`, `TDMCloseFile`, `TDMCloseGroup`, `TDMCreateChannelProperty`, `TDMCreateFile`, `TDMCreateFileProperty`, `TDMCreateGroupProperty`, `TDMFilePropertyExists`, `TDMGetChannelPropertyNames`, `TDMGetChannelPropertyNum`, `TDMGetChannelPropertyStr`, `TDMGetChannelPropertyTime`, `TDMGetChannelPropertyType`, `TDMGetChannels`, `TDMGetChannelStringPropertyLen`, `TDMGetDataType`, `TDMGetDataValues`, `TDMGetDataValuesTime`, `TDMGetFilePropertyNames`, `TDMGetFilePropertyNum`, `TDMGetFilePropertyStr`, `TDMGetFilePropertyTime`, `TDMGetFilePropertyType`, `TDMGetFileStringPropertyLen`, `TDMGetGroupPropertyNames`, `TDMGetGroupPropertyNum`, `TDMGetGroupPropertyStr`, `TDMGetGroupPropertyTime`, `TDMGetGroupPropertyType`, `TDMGetGroups`, `TDMGetGroupStringPropertyLen`, `TDMGetLibraryErrorDescription`, `TDMGetNumChannelProperties`, `TDMGetNumChannels`, `TDMGetNumDataValues`, `TDMGetNumFileProperties`, `TDMGetNumGroupProperties`, `TDMGetNumGroups`, `TDMGroupPropertyExists`, `TDMOpenFile`, `TDMOpenFileEx`, `TDMRemoveChannel`, `TDMRemoveGroup`, `TDMReplaceDataValues`, `TDMReplaceDataValuesTime`, `TDMSaveFile`, `TDMSetChannelPropertyNum`, `TDMSetChannelPropertyStr`, `TDMSetChannelPropertyTime`, `TDMSetDataValues`, `TDMSetDataValuesTime`, `TDMSetFilePropertyNum`, `TDMSetFilePropertyStr`, `TDMSetFilePropertyTime`, `TDMSetGroupPropertyNum`, `TDMSetGroupPropertyStr`, `TDMSetGroupPropertyTime`, `TextEncodingCode`, `TextEncodingName`, `TextFile`, `ThreadGroupCreate`, `ThreadGroupGetDF`, `ThreadGroupGetDFR`, `ThreadGroupRelease`, `ThreadGroupWait`, `ThreadProcessorCount`, `ThreadReturnValue`, `ticks`, `time`, `TraceFromPixel`, `TraceInfo`, `TraceNameList`, `TraceNameToWaveRef`, `TrimString`, `trunc`, `UniqueName`, `UnPadString`, `UnsetEnvironmentVariable`, `UpperStr`, `URLDecode`, `URLEncode`, `VariableList`, `Variance`, `vcsr`, `viAssertIntrSignal`, `viAssertTrigger`, `viAssertUtilSignal`, `viClear`, `viClose`, `viDisableEvent`, `viDiscardEvents`, `viEnableEvent`, `viFindNext`, `viFindRsrc`, `viGetAttribute`, `viGetAttributeString`, `viGpibCommand`, `viGpibControlATN`, `viGpibControlREN`, `viGpibPassControl`, `viGpibSendIFC`, `viIn8`, `viIn16`, `viIn32`, `viLock`, `viMapAddress`, `viMapTrigger`, `viMemAlloc`, `viMemFree`, `viMoveIn8`, `viMoveIn16`, `viMoveIn32`, `viMoveOut8`, `viMoveOut16`, `viMoveOut32`, `viOpen`, `viOpenDefaultRM`, `viOut8`, `viOut16`, `viOut32`, `viPeek8`, `viPeek16`, `viPeek32`, `viPoke8`, `viPoke16`, `viPoke32`, `viRead`, `viReadSTB`, `viSetAttribute`, `viSetAttributeString`, `viStatusDesc`, `viTerminate`, `viUnlock`, `viUnmapAddress`, `viUnmapTrigger`, `viUsbControlIn`, `viUsbControlOut`, `viVxiCommandQuery`, `viWaitOnEvent`, `viWrite`, `VoigtFunc`, `VoigtPeak`, `WaveCRC`, `WaveDims`, `WaveExists`, `WaveHash`, `WaveInfo`, `WaveList`, `WaveMax`, `WaveMin`, `WaveName`, `WaveRefIndexed`, `WaveRefIndexedDFR`, `WaveRefsEqual`, `WaveRefWaveToList`, `WaveTextEncoding`, `WaveType`, `WaveUnits`, `WhichListItem`, `WinList`, `WinName`, `WinRecreation`, `WinType`, `wnoise`, `xcsr`, `XWaveName`, `XWaveRefFromTrace`, `x2pnt`, `zcsr`, `ZernikeR`, `zeromq_client_connect`, `zeromq_client_connect`, `zeromq_client_recv`, `zeromq_client_recv`, `zeromq_client_send`, `zeromq_client_send`, `zeromq_handler_start`, `zeromq_handler_start`, `zeromq_handler_stop`, `zeromq_handler_stop`, `zeromq_server_bind`, `zeromq_server_bind`, `zeromq_server_recv`, `zeromq_server_recv`, `zeromq_server_send`, `zeromq_server_send`, `zeromq_set`, `zeromq_set`, `zeromq_stop`, `zeromq_stop`, `zeromq_test_callfunction`, `zeromq_test_callfunction`, `zeromq_test_serializeWave`, `zeromq_test_serializeWave`, `zeta`), NameFunction, nil},
- {`^#(include|pragma|define|undef|ifdef|ifndef|if|elif|else|endif)`, NameDecorator, nil},
- {`[^a-z"/]+$`, Text, nil},
- {`.`, Text, nil},
- {`\n|\r`, Text, nil},
- },
- }
-}
diff --git a/lexers/i/ini.go b/lexers/i/ini.go
deleted file mode 100644
index 46b2ce2..0000000
--- a/lexers/i/ini.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package i
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Ini lexer.
-var Ini = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "INI",
- Aliases: []string{"ini", "cfg", "dosini"},
- Filenames: []string{"*.ini", "*.cfg", "*.inf", ".gitconfig", ".editorconfig"},
- MimeTypes: []string{"text/x-ini", "text/inf"},
- },
- iniRules,
-))
-
-func iniRules() Rules {
- return 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/lexers/i/io.go b/lexers/i/io.go
deleted file mode 100644
index 8b2e53a..0000000
--- a/lexers/i/io.go
+++ /dev/null
@@ -1,44 +0,0 @@
-package i
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Io lexer.
-var Io = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Io",
- Aliases: []string{"io"},
- Filenames: []string{"*.io"},
- MimeTypes: []string{"text/x-iosrc"},
- },
- ioRules,
-))
-
-func ioRules() Rules {
- return 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/lexers/j/j.go b/lexers/j/j.go
deleted file mode 100644
index 9a2a4e3..0000000
--- a/lexers/j/j.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package j
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// J lexer.
-var J = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "J",
- Aliases: []string{"j"},
- Filenames: []string{"*.ijs"},
- MimeTypes: []string{"text/x-j"},
- },
- jRules,
-))
-
-func jRules() Rules {
- return Rules{
- "root": {
- {`#!.*$`, CommentPreproc, nil},
- {`NB\..*`, CommentSingle, nil},
- {`\n+\s*Note`, CommentMultiline, Push("comment")},
- {`\s*Note.*`, CommentSingle, nil},
- {`\s+`, Text, nil},
- {`'`, LiteralString, Push("singlequote")},
- {`0\s+:\s*0|noun\s+define\s*$`, NameEntity, Push("nounDefinition")},
- {`(([1-4]|13)\s+:\s*0|(adverb|conjunction|dyad|monad|verb)\s+define)\b`, NameFunction, Push("explicitDefinition")},
- {Words(``, `\b[a-zA-Z]\w*\.`, `for_`, `goto_`, `label_`), NameLabel, nil},
- {Words(``, `\.`, `assert`, `break`, `case`, `catch`, `catchd`, `catcht`, `continue`, `do`, `else`, `elseif`, `end`, `fcase`, `for`, `if`, `return`, `select`, `throw`, `try`, `while`, `whilst`), NameLabel, nil},
- {`\b[a-zA-Z]\w*`, NameVariable, nil},
- {Words(``, ``, `ARGV`, `CR`, `CRLF`, `DEL`, `Debug`, `EAV`, `EMPTY`, `FF`, `JVERSION`, `LF`, `LF2`, `Note`, `TAB`, `alpha17`, `alpha27`, `apply`, `bind`, `boxopen`, `boxxopen`, `bx`, `clear`, `cutLF`, `cutopen`, `datatype`, `def`, `dfh`, `drop`, `each`, `echo`, `empty`, `erase`, `every`, `evtloop`, `exit`, `expand`, `fetch`, `file2url`, `fixdotdot`, `fliprgb`, `getargs`, `getenv`, `hfd`, `inv`, `inverse`, `iospath`, `isatty`, `isutf8`, `items`, `leaf`, `list`, `nameclass`, `namelist`, `names`, `nc`, `nl`, `on`, `pick`, `rows`, `script`, `scriptd`, `sign`, `sminfo`, `smoutput`, `sort`, `split`, `stderr`, `stdin`, `stdout`, `table`, `take`, `timespacex`, `timex`, `tmoutput`, `toCRLF`, `toHOST`, `toJ`, `tolower`, `toupper`, `type`, `ucp`, `ucpcount`, `usleep`, `utf8`, `uucp`), NameFunction, nil},
- {`=[.:]`, Operator, nil},
- {"[-=+*#$%@!~`^&\";:.,<>{}\\[\\]\\\\|/]", Operator, nil},
- {`[abCdDeEfHiIjLMoprtT]\.`, KeywordReserved, nil},
- {`[aDiLpqsStux]\:`, KeywordReserved, nil},
- {`(_[0-9])\:`, KeywordConstant, nil},
- {`\(`, Punctuation, Push("parentheses")},
- Include("numbers"),
- },
- "comment": {
- {`[^)]`, CommentMultiline, nil},
- {`^\)`, CommentMultiline, Pop(1)},
- {`[)]`, CommentMultiline, nil},
- },
- "explicitDefinition": {
- {`\b[nmuvxy]\b`, NameDecorator, nil},
- Include("root"),
- {`[^)]`, Name, nil},
- {`^\)`, NameLabel, Pop(1)},
- {`[)]`, Name, nil},
- },
- "numbers": {
- {`\b_{1,2}\b`, LiteralNumber, nil},
- {`_?\d+(\.\d+)?(\s*[ejr]\s*)_?\d+(\.?=\d+)?`, LiteralNumber, nil},
- {`_?\d+\.(?=\d+)`, LiteralNumberFloat, nil},
- {`_?\d+x`, LiteralNumberIntegerLong, nil},
- {`_?\d+`, LiteralNumberInteger, nil},
- },
- "nounDefinition": {
- {`[^)]`, LiteralString, nil},
- {`^\)`, NameLabel, Pop(1)},
- {`[)]`, LiteralString, nil},
- },
- "parentheses": {
- {`\)`, Punctuation, Pop(1)},
- Include("explicitDefinition"),
- Include("root"),
- },
- "singlequote": {
- {`[^']`, LiteralString, nil},
- {`''`, LiteralString, nil},
- {`'`, LiteralString, Pop(1)},
- },
- }
-}
diff --git a/lexers/j/java.go b/lexers/j/java.go
deleted file mode 100644
index 48a9d9f..0000000
--- a/lexers/j/java.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package j
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Java lexer.
-var Java = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Java",
- Aliases: []string{"java"},
- Filenames: []string{"*.java"},
- MimeTypes: []string{"text/x-java"},
- DotAll: true,
- EnsureNL: true,
- },
- javaRules,
-))
-
-func javaRules() Rules {
- return 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/lexers/j/javascript.go b/lexers/j/javascript.go
deleted file mode 100644
index 5c6b937..0000000
--- a/lexers/j/javascript.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package j
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Javascript lexer.
-var JavascriptRules = Rules{
- "commentsandwhitespace": {
- {`\s+`, Text, nil},
- {``, `<--`, `<-->`, `>`, `<`, `>=`, `≥`, `<=`, `≤`, `==`, `===`, `≡`, `!=`, `≠`, `!==`, `≢`, `∈`, `∉`, `∋`, `∌`, `⊆`, `⊈`, `⊂`, `⊄`, `⊊`, `∝`, `∊`, `∍`, `∥`, `∦`, `∷`, `∺`, `∻`, `∽`, `∾`, `≁`, `≃`, `≂`, `≄`, `≅`, `≆`, `≇`, `≈`, `≉`, `≊`, `≋`, `≌`, `≍`, `≎`, `≐`, `≑`, `≒`, `≓`, `≖`, `≗`, `≘`, `≙`, `≚`, `≛`, `≜`, `≝`, `≞`, `≟`, `≣`, `≦`, `≧`, `≨`, `≩`, `≪`, `≫`, `≬`, `≭`, `≮`, `≯`, `≰`, `≱`, `≲`, `≳`, `≴`, `≵`, `≶`, `≷`, `≸`, `≹`, `≺`, `≻`, `≼`, `≽`, `≾`, `≿`, `⊀`, `⊁`, `⊃`, `⊅`, `⊇`, `⊉`, `⊋`, `⊏`, `⊐`, `⊑`, `⊒`, `⊜`, `⊩`, `⊬`, `⊮`, `⊰`, `⊱`, `⊲`, `⊳`, `⊴`, `⊵`, `⊶`, `⊷`, `⋍`, `⋐`, `⋑`, `⋕`, `⋖`, `⋗`, `⋘`, `⋙`, `⋚`, `⋛`, `⋜`, `⋝`, `⋞`, `⋟`, `⋠`, `⋡`, `⋢`, `⋣`, `⋤`, `⋥`, `⋦`, `⋧`, `⋨`, `⋩`, `⋪`, `⋫`, `⋬`, `⋭`, `⋲`, `⋳`, `⋴`, `⋵`, `⋶`, `⋷`, `⋸`, `⋹`, `⋺`, `⋻`, `⋼`, `⋽`, `⋾`, `⋿`, `⟈`, `⟉`, `⟒`, `⦷`, `⧀`, `⧁`, `⧡`, `⧣`, `⧤`, `⧥`, `⩦`, `⩧`, `⩪`, `⩫`, `⩬`, `⩭`, `⩮`, `⩯`, `⩰`, `⩱`, `⩲`, `⩳`, `⩵`, `⩶`, `⩷`, `⩸`, `⩹`, `⩺`, `⩻`, `⩼`, `⩽`, `⩾`, `⩿`, `⪀`, `⪁`, `⪂`, `⪃`, `⪄`, `⪅`, `⪆`, `⪇`, `⪈`, `⪉`, `⪊`, `⪋`, `⪌`, `⪍`, `⪎`, `⪏`, `⪐`, `⪑`, `⪒`, `⪓`, `⪔`, `⪕`, `⪖`, `⪗`, `⪘`, `⪙`, `⪚`, `⪛`, `⪜`, `⪝`, `⪞`, `⪟`, `⪠`, `⪡`, `⪢`, `⪣`, `⪤`, `⪥`, `⪦`, `⪧`, `⪨`, `⪩`, `⪪`, `⪫`, `⪬`, `⪭`, `⪮`, `⪯`, `⪰`, `⪱`, `⪲`, `⪳`, `⪴`, `⪵`, `⪶`, `⪷`, `⪸`, `⪹`, `⪺`, `⪻`, `⪼`, `⪽`, `⪾`, `⪿`, `⫀`, `⫁`, `⫂`, `⫃`, `⫄`, `⫅`, `⫆`, `⫇`, `⫈`, `⫉`, `⫊`, `⫋`, `⫌`, `⫍`, `⫎`, `⫏`, `⫐`, `⫑`, `⫒`, `⫓`, `⫔`, `⫕`, `⫖`, `⫗`, `⫘`, `⫙`, `⫷`, `⫸`, `⫹`, `⫺`, `⊢`, `⊣`, `⟂`, `<:`, `>:`, `<|`, `|>`, `…`, `⁝`, `⋮`, `⋱`, `⋰`, `⋯`, `+`, `-`, `¦`, `|`, `⊕`, `⊖`, `⊞`, `⊟`, `++`, `∪`, `∨`, `⊔`, `±`, `∓`, `∔`, `∸`, `≏`, `⊎`, `⊻`, `⊽`, `⋎`, `⋓`, `⧺`, `⧻`, `⨈`, `⨢`, `⨣`, `⨤`, `⨥`, `⨦`, `⨧`, `⨨`, `⨩`, `⨪`, `⨫`, `⨬`, `⨭`, `⨮`, `⨹`, `⨺`, `⩁`, `⩂`, `⩅`, `⩊`, `⩌`, `⩏`, `⩐`, `⩒`, `⩔`, `⩖`, `⩗`, `⩛`, `⩝`, `⩡`, `⩢`, `⩣`, `*`, `/`, `⌿`, `÷`, `%`, `&`, `⋅`, `∘`, `×`, `\`, `∩`, `∧`, `⊗`, `⊘`, `⊙`, `⊚`, `⊛`, `⊠`, `⊡`, `⊓`, `∗`, `∙`, `∤`, `⅋`, `≀`, `⊼`, `⋄`, `⋆`, `⋇`, `⋉`, `⋊`, `⋋`, `⋌`, `⋏`, `⋒`, `⟑`, `⦸`, `⦼`, `⦾`, `⦿`, `⧶`, `⧷`, `⨇`, `⨰`, `⨱`, `⨲`, `⨳`, `⨴`, `⨵`, `⨶`, `⨷`, `⨸`, `⨻`, `⨼`, `⨽`, `⩀`, `⩃`, `⩄`, `⩋`, `⩍`, `⩎`, `⩑`, `⩓`, `⩕`, `⩘`, `⩚`, `⩜`, `⩞`, `⩟`, `⩠`, `⫛`, `⊍`, `▷`, `⨝`, `⟕`, `⟖`, `⟗`, `⨟`, `//`, `>>`, `<<`, `>>>`, `^`, `↑`, `↓`, `⇵`, `⟰`, `⟱`, `⤈`, `⤉`, `⤊`, `⤋`, `⤒`, `⤓`, `⥉`, `⥌`, `⥍`, `⥏`, `⥑`, `⥔`, `⥕`, `⥘`, `⥙`, `⥜`, `⥝`, `⥠`, `⥡`, `⥣`, `⥥`, `⥮`, `⥯`, `↑`, `↓`, `!`, `¬`, `√`, `∛`, `∜`), Operator, nil},
- {Words(``, `[²³¹ʰʲʳʷʸˡˢˣᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁᵂᵃᵇᵈᵉᵍᵏᵐᵒᵖᵗᵘᵛᵝᵞᵟᵠᵡᵢᵣᵤᵥᵦᵧᵨᵩᵪᶜᶠᶥᶦᶫᶰᶸᶻᶿ′″‴‵‶‷⁗⁰ⁱ⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓₕₖₗₘₙₚₛₜⱼⱽ]*`, `.=`, `.+=`, `.-=`, `.*=`, `./=`, `.//=`, `.\=`, `.^=`, `.÷=`, `.%=`, `.<<=`, `.>>=`, `.>>>=`, `.|=`, `.&=`, `.⊻=`, `.≔`, `.⩴`, `.≕'`, `.~`, `.=>`, `.→`, `.↔`, `.↚`, `.↛`, `.↞`, `.↠`, `.↢`, `.↣`, `.↦`, `.↤`, `.↮`, `.⇎`, `.⇍`, `.⇏`, `.⇐`, `.⇒`, `.⇔`, `.⇴`, `.⇶`, `.⇷`, `.⇸`, `.⇹`, `.⇺`, `.⇻`, `.⇼`, `.⇽`, `.⇾`, `.⇿`, `.⟵`, `.⟶`, `.⟷`, `.⟹`, `.⟺`, `.⟻`, `.⟼`, `.⟽`, `.⟾`, `.⟿`, `.⤀`, `.⤁`, `.⤂`, `.⤃`, `.⤄`, `.⤅`, `.⤆`, `.⤇`, `.⤌`, `.⤍`, `.⤎`, `.⤏`, `.⤐`, `.⤑`, `.⤔`, `.⤕`, `.⤖`, `.⤗`, `.⤘`, `.⤝`, `.⤞`, `.⤟`, `.⤠`, `.⥄`, `.⥅`, `.⥆`, `.⥇`, `.⥈`, `.⥊`, `.⥋`, `.⥎`, `.⥐`, `.⥒`, `.⥓`, `.⥖`, `.⥗`, `.⥚`, `.⥛`, `.⥞`, `.⥟`, `.⥢`, `.⥤`, `.⥦`, `.⥧`, `.⥨`, `.⥩`, `.⥪`, `.⥫`, `.⥬`, `.⥭`, `.⥰`, `.⧴`, `.⬱`, `.⬰`, `.⬲`, `.⬳`, `.⬴`, `.⬵`, `.⬶`, `.⬷`, `.⬸`, `.⬹`, `.⬺`, `.⬻`, `.⬼`, `.⬽`, `.⬾`, `.⬿`, `.⭀`, `.⭁`, `.⭂`, `.⭃`, `.⭄`, `.⭇`, `.⭈`, `.⭉`, `.⭊`, `.⭋`, `.⭌`, `.←`, `.→`, `.⇜`, `.⇝`, `.↜`, `.↝`, `.↩`, `.↪`, `.↫`, `.↬`, `.↼`, `.↽`, `.⇀`, `.⇁`, `.⇄`, `.⇆`, `.⇇`, `.⇉`, `.⇋`, `.⇌`, `.⇚`, `.⇛`, `.⇠`, `.⇢`, `.↷`, `.↶`, `.↺`, `.↻`, `.-->`, `.<--`, `.<-->`, `.>`, `.<`, `.>=`, `.≥`, `.<=`, `.≤`, `.==`, `.===`, `.≡`, `.!=`, `.≠`, `.!==`, `.≢`, `.∈`, `.∉`, `.∋`, `.∌`, `.⊆`, `.⊈`, `.⊂`, `.⊄`, `.⊊`, `.∝`, `.∊`, `.∍`, `.∥`, `.∦`, `.∷`, `.∺`, `.∻`, `.∽`, `.∾`, `.≁`, `.≃`, `.≂`, `.≄`, `.≅`, `.≆`, `.≇`, `.≈`, `.≉`, `.≊`, `.≋`, `.≌`, `.≍`, `.≎`, `.≐`, `.≑`, `.≒`, `.≓`, `.≖`, `.≗`, `.≘`, `.≙`, `.≚`, `.≛`, `.≜`, `.≝`, `.≞`, `.≟`, `.≣`, `.≦`, `.≧`, `.≨`, `.≩`, `.≪`, `.≫`, `.≬`, `.≭`, `.≮`, `.≯`, `.≰`, `.≱`, `.≲`, `.≳`, `.≴`, `.≵`, `.≶`, `.≷`, `.≸`, `.≹`, `.≺`, `.≻`, `.≼`, `.≽`, `.≾`, `.≿`, `.⊀`, `.⊁`, `.⊃`, `.⊅`, `.⊇`, `.⊉`, `.⊋`, `.⊏`, `.⊐`, `.⊑`, `.⊒`, `.⊜`, `.⊩`, `.⊬`, `.⊮`, `.⊰`, `.⊱`, `.⊲`, `.⊳`, `.⊴`, `.⊵`, `.⊶`, `.⊷`, `.⋍`, `.⋐`, `.⋑`, `.⋕`, `.⋖`, `.⋗`, `.⋘`, `.⋙`, `.⋚`, `.⋛`, `.⋜`, `.⋝`, `.⋞`, `.⋟`, `.⋠`, `.⋡`, `.⋢`, `.⋣`, `.⋤`, `.⋥`, `.⋦`, `.⋧`, `.⋨`, `.⋩`, `.⋪`, `.⋫`, `.⋬`, `.⋭`, `.⋲`, `.⋳`, `.⋴`, `.⋵`, `.⋶`, `.⋷`, `.⋸`, `.⋹`, `.⋺`, `.⋻`, `.⋼`, `.⋽`, `.⋾`, `.⋿`, `.⟈`, `.⟉`, `.⟒`, `.⦷`, `.⧀`, `.⧁`, `.⧡`, `.⧣`, `.⧤`, `.⧥`, `.⩦`, `.⩧`, `.⩪`, `.⩫`, `.⩬`, `.⩭`, `.⩮`, `.⩯`, `.⩰`, `.⩱`, `.⩲`, `.⩳`, `.⩵`, `.⩶`, `.⩷`, `.⩸`, `.⩹`, `.⩺`, `.⩻`, `.⩼`, `.⩽`, `.⩾`, `.⩿`, `.⪀`, `.⪁`, `.⪂`, `.⪃`, `.⪄`, `.⪅`, `.⪆`, `.⪇`, `.⪈`, `.⪉`, `.⪊`, `.⪋`, `.⪌`, `.⪍`, `.⪎`, `.⪏`, `.⪐`, `.⪑`, `.⪒`, `.⪓`, `.⪔`, `.⪕`, `.⪖`, `.⪗`, `.⪘`, `.⪙`, `.⪚`, `.⪛`, `.⪜`, `.⪝`, `.⪞`, `.⪟`, `.⪠`, `.⪡`, `.⪢`, `.⪣`, `.⪤`, `.⪥`, `.⪦`, `.⪧`, `.⪨`, `.⪩`, `.⪪`, `.⪫`, `.⪬`, `.⪭`, `.⪮`, `.⪯`, `.⪰`, `.⪱`, `.⪲`, `.⪳`, `.⪴`, `.⪵`, `.⪶`, `.⪷`, `.⪸`, `.⪹`, `.⪺`, `.⪻`, `.⪼`, `.⪽`, `.⪾`, `.⪿`, `.⫀`, `.⫁`, `.⫂`, `.⫃`, `.⫄`, `.⫅`, `.⫆`, `.⫇`, `.⫈`, `.⫉`, `.⫊`, `.⫋`, `.⫌`, `.⫍`, `.⫎`, `.⫏`, `.⫐`, `.⫑`, `.⫒`, `.⫓`, `.⫔`, `.⫕`, `.⫖`, `.⫗`, `.⫘`, `.⫙`, `.⫷`, `.⫸`, `.⫹`, `.⫺`, `.⊢`, `.⊣`, `.⟂`, `.<:`, `.>:`, `.<|`, `.|>`, `.…`, `.⁝`, `.⋮`, `.⋱`, `.⋰`, `.⋯`, `.+`, `.-`, `.¦`, `.|`, `.⊕`, `.⊖`, `.⊞`, `.⊟`, `.++`, `.∪`, `.∨`, `.⊔`, `.±`, `.∓`, `.∔`, `.∸`, `.≏`, `.⊎`, `.⊻`, `.⊽`, `.⋎`, `.⋓`, `.⧺`, `.⧻`, `.⨈`, `.⨢`, `.⨣`, `.⨤`, `.⨥`, `.⨦`, `.⨧`, `.⨨`, `.⨩`, `.⨪`, `.⨫`, `.⨬`, `.⨭`, `.⨮`, `.⨹`, `.⨺`, `.⩁`, `.⩂`, `.⩅`, `.⩊`, `.⩌`, `.⩏`, `.⩐`, `.⩒`, `.⩔`, `.⩖`, `.⩗`, `.⩛`, `.⩝`, `.⩡`, `.⩢`, `.⩣`, `.*`, `./`, `.⌿`, `.÷`, `.%`, `.&`, `.⋅`, `.∘`, `.×`, `.\`, `.∩`, `.∧`, `.⊗`, `.⊘`, `.⊙`, `.⊚`, `.⊛`, `.⊠`, `.⊡`, `.⊓`, `.∗`, `.∙`, `.∤`, `.⅋`, `.≀`, `.⊼`, `.⋄`, `.⋆`, `.⋇`, `.⋉`, `.⋊`, `.⋋`, `.⋌`, `.⋏`, `.⋒`, `.⟑`, `.⦸`, `.⦼`, `.⦾`, `.⦿`, `.⧶`, `.⧷`, `.⨇`, `.⨰`, `.⨱`, `.⨲`, `.⨳`, `.⨴`, `.⨵`, `.⨶`, `.⨷`, `.⨸`, `.⨻`, `.⨼`, `.⨽`, `.⩀`, `.⩃`, `.⩄`, `.⩋`, `.⩍`, `.⩎`, `.⩑`, `.⩓`, `.⩕`, `.⩘`, `.⩚`, `.⩜`, `.⩞`, `.⩟`, `.⩠`, `.⫛`, `.⊍`, `.▷`, `.⨝`, `.⟕`, `.⟖`, `.⟗`, `.⨟`, `.//`, `.>>`, `.<<`, `.>>>`, `.^`, `.↑`, `.↓`, `.⇵`, `.⟰`, `.⟱`, `.⤈`, `.⤉`, `.⤊`, `.⤋`, `.⤒`, `.⤓`, `.⥉`, `.⥌`, `.⥍`, `.⥏`, `.⥑`, `.⥔`, `.⥕`, `.⥘`, `.⥙`, `.⥜`, `.⥝`, `.⥠`, `.⥡`, `.⥣`, `.⥥`, `.⥮`, `.⥯`, `.↑`, `.↓`, `.!`, `.¬`, `.√`, `.∛`, `.∜`), Operator, nil},
- {Words(``, ``, `...`, `..`), 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},
- {`(raw)(""")`, ByGroups(LiteralStringAffix, LiteralString), Push("tqrawstring")},
- {`(raw)(")`, ByGroups(LiteralStringAffix, LiteralString), Push("rawstring")},
- {`(r)(""")`, ByGroups(LiteralStringAffix, LiteralStringRegex), Push("tqregex")},
- {`(r)(")`, ByGroups(LiteralStringAffix, LiteralStringRegex), Push("regex")},
- {`((?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*))?(""")`, ByGroups(LiteralStringAffix, LiteralString), Push("tqstring")},
- {`((?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*))?(")`, ByGroups(LiteralStringAffix, LiteralString), Push("string")},
- {"((?:[a-zA-Z_\u00a1-\U0010ffff][a-zA-Z_0-9!\u00a1-\U0010ffff]*))?(```)", ByGroups(LiteralStringAffix, LiteralStringBacktick), Push("tqcommand")},
- {"((?:[a-zA-Z_\u00a1-\U0010ffff][a-zA-Z_0-9!\u00a1-\U0010ffff]*))?(`)", ByGroups(LiteralStringAffix, LiteralStringBacktick), Push("command")},
- {`((?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*))(\{)`, ByGroups(KeywordType, Punctuation), Push("curly")},
- {`(where)(\s+)((?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*))`, ByGroups(Keyword, Text, KeywordType), nil},
- {`(\{)`, Punctuation, Push("curly")},
- {`(abstract[ \t]+type|primitive[ \t]+type|mutable[ \t]+struct|struct)([\s()]+)((?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*))`, ByGroups(Keyword, Text, KeywordType), nil},
- {`@(?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*)`, NameDecorator, nil},
- {Words(`@`, `[²³¹ʰʲʳʷʸˡˢˣᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁᵂᵃᵇᵈᵉᵍᵏᵐᵒᵖᵗᵘᵛᵝᵞᵟᵠᵡᵢᵣᵤᵥᵦᵧᵨᵩᵪᶜᶠᶥᶦᶫᶰᶸᶻᶿ′″‴‵‶‷⁗⁰ⁱ⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾ⁿ₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎ₐₑₒₓₕₖₗₘₙₚₛₜⱼⱽ]*`, `->`, `:=`, `$=`, `?`, `||`, `&&`, `:`, `$`, `::`, `..`, `.`, `=`, `+=`, `-=`, `*=`, `/=`, `//=`, `\=`, `^=`, `÷=`, `%=`, `<<=`, `>>=`, `>>>=`, `|=`, `&=`, `⊻=`, `≔`, `⩴`, `≕'`, `~`, `=>`, `→`, `↔`, `↚`, `↛`, `↞`, `↠`, `↢`, `↣`, `↦`, `↤`, `↮`, `⇎`, `⇍`, `⇏`, `⇐`, `⇒`, `⇔`, `⇴`, `⇶`, `⇷`, `⇸`, `⇹`, `⇺`, `⇻`, `⇼`, `⇽`, `⇾`, `⇿`, `⟵`, `⟶`, `⟷`, `⟹`, `⟺`, `⟻`, `⟼`, `⟽`, `⟾`, `⟿`, `⤀`, `⤁`, `⤂`, `⤃`, `⤄`, `⤅`, `⤆`, `⤇`, `⤌`, `⤍`, `⤎`, `⤏`, `⤐`, `⤑`, `⤔`, `⤕`, `⤖`, `⤗`, `⤘`, `⤝`, `⤞`, `⤟`, `⤠`, `⥄`, `⥅`, `⥆`, `⥇`, `⥈`, `⥊`, `⥋`, `⥎`, `⥐`, `⥒`, `⥓`, `⥖`, `⥗`, `⥚`, `⥛`, `⥞`, `⥟`, `⥢`, `⥤`, `⥦`, `⥧`, `⥨`, `⥩`, `⥪`, `⥫`, `⥬`, `⥭`, `⥰`, `⧴`, `⬱`, `⬰`, `⬲`, `⬳`, `⬴`, `⬵`, `⬶`, `⬷`, `⬸`, `⬹`, `⬺`, `⬻`, `⬼`, `⬽`, `⬾`, `⬿`, `⭀`, `⭁`, `⭂`, `⭃`, `⭄`, `⭇`, `⭈`, `⭉`, `⭊`, `⭋`, `⭌`, `←`, `→`, `⇜`, `⇝`, `↜`, `↝`, `↩`, `↪`, `↫`, `↬`, `↼`, `↽`, `⇀`, `⇁`, `⇄`, `⇆`, `⇇`, `⇉`, `⇋`, `⇌`, `⇚`, `⇛`, `⇠`, `⇢`, `↷`, `↶`, `↺`, `↻`, `-->`, `<--`, `<-->`, `>`, `<`, `>=`, `≥`, `<=`, `≤`, `==`, `===`, `≡`, `!=`, `≠`, `!==`, `≢`, `∈`, `∉`, `∋`, `∌`, `⊆`, `⊈`, `⊂`, `⊄`, `⊊`, `∝`, `∊`, `∍`, `∥`, `∦`, `∷`, `∺`, `∻`, `∽`, `∾`, `≁`, `≃`, `≂`, `≄`, `≅`, `≆`, `≇`, `≈`, `≉`, `≊`, `≋`, `≌`, `≍`, `≎`, `≐`, `≑`, `≒`, `≓`, `≖`, `≗`, `≘`, `≙`, `≚`, `≛`, `≜`, `≝`, `≞`, `≟`, `≣`, `≦`, `≧`, `≨`, `≩`, `≪`, `≫`, `≬`, `≭`, `≮`, `≯`, `≰`, `≱`, `≲`, `≳`, `≴`, `≵`, `≶`, `≷`, `≸`, `≹`, `≺`, `≻`, `≼`, `≽`, `≾`, `≿`, `⊀`, `⊁`, `⊃`, `⊅`, `⊇`, `⊉`, `⊋`, `⊏`, `⊐`, `⊑`, `⊒`, `⊜`, `⊩`, `⊬`, `⊮`, `⊰`, `⊱`, `⊲`, `⊳`, `⊴`, `⊵`, `⊶`, `⊷`, `⋍`, `⋐`, `⋑`, `⋕`, `⋖`, `⋗`, `⋘`, `⋙`, `⋚`, `⋛`, `⋜`, `⋝`, `⋞`, `⋟`, `⋠`, `⋡`, `⋢`, `⋣`, `⋤`, `⋥`, `⋦`, `⋧`, `⋨`, `⋩`, `⋪`, `⋫`, `⋬`, `⋭`, `⋲`, `⋳`, `⋴`, `⋵`, `⋶`, `⋷`, `⋸`, `⋹`, `⋺`, `⋻`, `⋼`, `⋽`, `⋾`, `⋿`, `⟈`, `⟉`, `⟒`, `⦷`, `⧀`, `⧁`, `⧡`, `⧣`, `⧤`, `⧥`, `⩦`, `⩧`, `⩪`, `⩫`, `⩬`, `⩭`, `⩮`, `⩯`, `⩰`, `⩱`, `⩲`, `⩳`, `⩵`, `⩶`, `⩷`, `⩸`, `⩹`, `⩺`, `⩻`, `⩼`, `⩽`, `⩾`, `⩿`, `⪀`, `⪁`, `⪂`, `⪃`, `⪄`, `⪅`, `⪆`, `⪇`, `⪈`, `⪉`, `⪊`, `⪋`, `⪌`, `⪍`, `⪎`, `⪏`, `⪐`, `⪑`, `⪒`, `⪓`, `⪔`, `⪕`, `⪖`, `⪗`, `⪘`, `⪙`, `⪚`, `⪛`, `⪜`, `⪝`, `⪞`, `⪟`, `⪠`, `⪡`, `⪢`, `⪣`, `⪤`, `⪥`, `⪦`, `⪧`, `⪨`, `⪩`, `⪪`, `⪫`, `⪬`, `⪭`, `⪮`, `⪯`, `⪰`, `⪱`, `⪲`, `⪳`, `⪴`, `⪵`, `⪶`, `⪷`, `⪸`, `⪹`, `⪺`, `⪻`, `⪼`, `⪽`, `⪾`, `⪿`, `⫀`, `⫁`, `⫂`, `⫃`, `⫄`, `⫅`, `⫆`, `⫇`, `⫈`, `⫉`, `⫊`, `⫋`, `⫌`, `⫍`, `⫎`, `⫏`, `⫐`, `⫑`, `⫒`, `⫓`, `⫔`, `⫕`, `⫖`, `⫗`, `⫘`, `⫙`, `⫷`, `⫸`, `⫹`, `⫺`, `⊢`, `⊣`, `⟂`, `<:`, `>:`, `<|`, `|>`, `…`, `⁝`, `⋮`, `⋱`, `⋰`, `⋯`, `+`, `-`, `¦`, `|`, `⊕`, `⊖`, `⊞`, `⊟`, `++`, `∪`, `∨`, `⊔`, `±`, `∓`, `∔`, `∸`, `≏`, `⊎`, `⊻`, `⊽`, `⋎`, `⋓`, `⧺`, `⧻`, `⨈`, `⨢`, `⨣`, `⨤`, `⨥`, `⨦`, `⨧`, `⨨`, `⨩`, `⨪`, `⨫`, `⨬`, `⨭`, `⨮`, `⨹`, `⨺`, `⩁`, `⩂`, `⩅`, `⩊`, `⩌`, `⩏`, `⩐`, `⩒`, `⩔`, `⩖`, `⩗`, `⩛`, `⩝`, `⩡`, `⩢`, `⩣`, `*`, `/`, `⌿`, `÷`, `%`, `&`, `⋅`, `∘`, `×`, `\`, `∩`, `∧`, `⊗`, `⊘`, `⊙`, `⊚`, `⊛`, `⊠`, `⊡`, `⊓`, `∗`, `∙`, `∤`, `⅋`, `≀`, `⊼`, `⋄`, `⋆`, `⋇`, `⋉`, `⋊`, `⋋`, `⋌`, `⋏`, `⋒`, `⟑`, `⦸`, `⦼`, `⦾`, `⦿`, `⧶`, `⧷`, `⨇`, `⨰`, `⨱`, `⨲`, `⨳`, `⨴`, `⨵`, `⨶`, `⨷`, `⨸`, `⨻`, `⨼`, `⨽`, `⩀`, `⩃`, `⩄`, `⩋`, `⩍`, `⩎`, `⩑`, `⩓`, `⩕`, `⩘`, `⩚`, `⩜`, `⩞`, `⩟`, `⩠`, `⫛`, `⊍`, `▷`, `⨝`, `⟕`, `⟖`, `⟗`, `⨟`, `//`, `>>`, `<<`, `>>>`, `^`, `↑`, `↓`, `⇵`, `⟰`, `⟱`, `⤈`, `⤉`, `⤊`, `⤋`, `⤒`, `⤓`, `⥉`, `⥌`, `⥍`, `⥏`, `⥑`, `⥔`, `⥕`, `⥘`, `⥙`, `⥜`, `⥝`, `⥠`, `⥡`, `⥣`, `⥥`, `⥮`, `⥯`, `↑`, `↓`, `!`, `¬`, `√`, `∛`, `∜`), NameDecorator, nil},
- {Words(``, `\b`, `baremodule`, `begin`, `break`, `catch`, `ccall`, `const`, `continue`, `do`, `else`, `elseif`, `end`, `export`, `finally`, `for`, `function`, `global`, `if`, `import`, `in`, `isa`, `let`, `local`, `macro`, `module`, `quote`, `return`, `try`, `using`, `where`, `while`), Keyword, nil},
- {Words(``, `\b`, `AbstractArray`, `AbstractChannel`, `AbstractChar`, `AbstractDict`, `AbstractDisplay`, `AbstractFloat`, `AbstractIrrational`, `AbstractMatch`, `AbstractMatrix`, `AbstractPattern`, `AbstractRange`, `AbstractSet`, `AbstractString`, `AbstractUnitRange`, `AbstractVecOrMat`, `AbstractVector`, `Any`, `ArgumentError`, `Array`, `AssertionError`, `BigFloat`, `BigInt`, `BitArray`, `BitMatrix`, `BitSet`, `BitVector`, `Bool`, `BoundsError`, `CapturedException`, `CartesianIndex`, `CartesianIndices`, `Cchar`, `Cdouble`, `Cfloat`, `Channel`, `Char`, `Cint`, `Cintmax_t`, `Clong`, `Clonglong`, `Cmd`, `Colon`, `Complex`, `ComplexF16`, `ComplexF32`, `ComplexF64`, `ComposedFunction`, `CompositeException`, `Condition`, `Cptrdiff_t`, `Cshort`, `Csize_t`, `Cssize_t`, `Cstring`, `Cuchar`, `Cuint`, `Cuintmax_t`, `Culong`, `Culonglong`, `Cushort`, `Cvoid`, `Cwchar_t`, `Cwstring`, `DataType`, `DenseArray`, `DenseMatrix`, `DenseVecOrMat`, `DenseVector`, `Dict`, `DimensionMismatch`, `Dims`, `DivideError`, `DomainError`, `EOFError`, `Enum`, `ErrorException`, `Exception`, `ExponentialBackOff`, `Expr`, `Float16`, `Float32`, `Float64`, `Function`, `GlobalRef`, `HTML`, `IO`, `IOBuffer`, `IOContext`, `IOStream`, `IdDict`, `IndexCartesian`, `IndexLinear`, `IndexStyle`, `InexactError`, `InitError`, `Int`, `Int128`, `Int16`, `Int32`, `Int64`, `Int8`, `Integer`, `InterruptException`, `InvalidStateException`, `Irrational`, `KeyError`, `LinRange`, `LineNumberNode`, `LinearIndices`, `LoadError`, `MIME`, `Matrix`, `Method`, `MethodError`, `Missing`, `MissingException`, `Module`, `NTuple`, `NamedTuple`, `Nothing`, `Number`, `OrdinalRange`, `OutOfMemoryError`, `OverflowError`, `Pair`, `PartialQuickSort`, `PermutedDimsArray`, `Pipe`, `ProcessFailedException`, `Ptr`, `QuoteNode`, `Rational`, `RawFD`, `ReadOnlyMemoryError`, `Real`, `ReentrantLock`, `Ref`, `Regex`, `RegexMatch`, `RoundingMode`, `SegmentationFault`, `Set`, `Signed`, `Some`, `StackOverflowError`, `StepRange`, `StepRangeLen`, `StridedArray`, `StridedMatrix`, `StridedVecOrMat`, `StridedVector`, `String`, `StringIndexError`, `SubArray`, `SubString`, `SubstitutionString`, `Symbol`, `SystemError`, `Task`, `TaskFailedException`, `Text`, `TextDisplay`, `Timer`, `Tuple`, `Type`, `TypeError`, `TypeVar`, `UInt`, `UInt128`, `UInt16`, `UInt32`, `UInt64`, `UInt8`, `UndefInitializer`, `UndefKeywordError`, `UndefRefError`, `UndefVarError`, `Union`, `UnionAll`, `UnitRange`, `Unsigned`, `Val`, `Vararg`, `VecElement`, `VecOrMat`, `Vector`, `VersionNumber`, `WeakKeyDict`, `WeakRef`), KeywordType, nil},
- {Words(``, `\b`, `ARGS`, `C_NULL`, `DEPOT_PATH`, `ENDIAN_BOM`, `ENV`, `Inf`, `Inf16`, `Inf32`, `Inf64`, `InsertionSort`, `LOAD_PATH`, `MergeSort`, `NaN`, `NaN16`, `NaN32`, `NaN64`, `PROGRAM_FILE`, `QuickSort`, `RoundDown`, `RoundFromZero`, `RoundNearest`, `RoundNearestTiesAway`, `RoundNearestTiesUp`, `RoundToZero`, `RoundUp`, `VERSION`, `devnull`, `false`, `im`, `missing`, `nothing`, `pi`, `stderr`, `stdin`, `stdout`, `true`, `undef`, `π`, `ℯ`), NameBuiltin, nil},
- {`(?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*)`, Name, nil},
- {`(\d+((_\d+)+)?\.(?!\.)(\d+((_\d+)+)?)?|\.\d+((_\d+)+)?)([eEf][+-]?[0-9]+)?`, LiteralNumberFloat, nil},
- {`\d+((_\d+)+)?[eEf][+-]?[0-9]+`, LiteralNumberFloat, nil},
- {`0x[a-fA-F0-9]+((_[a-fA-F0-9]+)+)?(\.([a-fA-F0-9]+((_[a-fA-F0-9]+)+)?)?)?p[+-]?\d+`, LiteralNumberFloat, nil},
- {`0b[01]+((_[01]+)+)?`, LiteralNumberBin, nil},
- {`0o[0-7]+((_[0-7]+)+)?`, LiteralNumberOct, nil},
- {`0x[a-fA-F0-9]+((_[a-fA-F0-9]+)+)?`, LiteralNumberHex, nil},
- {`\d+((_\d+)+)?`, LiteralNumberInteger, nil},
- {Words(``, ``, `.`), Operator, nil},
- },
- "blockcomment": {
- {`[^=#]`, CommentMultiline, nil},
- {`#=`, CommentMultiline, Push()},
- {`=#`, CommentMultiline, Pop(1)},
- {`[=#]`, CommentMultiline, nil},
- },
- "curly": {
- {`\{`, Punctuation, Push()},
- {`\}`, Punctuation, Pop(1)},
- {`(?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*)`, KeywordType, nil},
- Include("root"),
- },
- "tqrawstring": {
- {`"""`, LiteralString, Pop(1)},
- {`([^"]|"[^"][^"])+`, LiteralString, nil},
- },
- "rawstring": {
- {`"`, LiteralString, Pop(1)},
- {`\\"`, LiteralStringEscape, nil},
- {`([^"\\]|\\[^"])+`, LiteralString, nil},
- },
- "interp": {
- {`\$(?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*)`, LiteralStringInterpol, nil},
- {`(\$)(\()`, ByGroups(LiteralStringInterpol, Punctuation), Push("in-intp")},
- },
- "in-intp": {
- {`\(`, Punctuation, Push()},
- {`\)`, Punctuation, Pop(1)},
- Include("root"),
- },
- "string": {
- {`(")((?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*)|\d+)?`, ByGroups(LiteralString, LiteralStringAffix), Pop(1)},
- {`\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)`, LiteralStringEscape, nil},
- Include("interp"),
- {`%[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil},
- {`[^"$%\\]+`, LiteralString, nil},
- {`.`, LiteralString, nil},
- },
- "tqstring": {
- {`(""")((?:[a-zA-Z_¡-][a-zA-Z_0-9!¡-]*)|\d+)?`, ByGroups(LiteralString, LiteralStringAffix), Pop(1)},
- {`\\([\\"\'$nrbtfav]|(x|u|U)[a-fA-F0-9]+|\d+)`, LiteralStringEscape, nil},
- Include("interp"),
- {`[^"$%\\]+`, LiteralString, nil},
- {`.`, LiteralString, nil},
- },
- "regex": {
- {`(")([imsxa]*)?`, ByGroups(LiteralStringRegex, LiteralStringAffix), Pop(1)},
- {`\\"`, LiteralStringRegex, nil},
- {`[^\\"]+`, LiteralStringRegex, nil},
- },
- "tqregex": {
- {`(""")([imsxa]*)?`, ByGroups(LiteralStringRegex, LiteralStringAffix), Pop(1)},
- {`[^"]+`, LiteralStringRegex, nil},
- },
- "command": {
- {"(`)((?:[a-zA-Z_\u00a1-\U0010ffff][a-zA-Z_0-9!\u00a1-\U0010ffff]*)|\\d+)?", ByGroups(LiteralStringBacktick, LiteralStringAffix), Pop(1)},
- {"\\\\[`$]", LiteralStringEscape, nil},
- Include("interp"),
- {"[^\\\\`$]+", LiteralStringBacktick, nil},
- {`.`, LiteralStringBacktick, nil},
- },
- "tqcommand": {
- {"(```)((?:[a-zA-Z_\u00a1-\U0010ffff][a-zA-Z_0-9!\u00a1-\U0010ffff]*)|\\d+)?", ByGroups(LiteralStringBacktick, LiteralStringAffix), Pop(1)},
- {`\\\$`, LiteralStringEscape, nil},
- Include("interp"),
- {"[^\\\\`$]+", LiteralStringBacktick, nil},
- {`.`, LiteralStringBacktick, nil},
- },
- }
-}
diff --git a/lexers/j/jungle.go b/lexers/j/jungle.go
deleted file mode 100644
index 5dbda9f..0000000
--- a/lexers/j/jungle.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package j
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-var Jungle = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Jungle",
- Aliases: []string{"jungle"},
- Filenames: []string{"*.jungle"},
- MimeTypes: []string{"text/x-jungle"},
- },
- jungleRules,
-))
-
-func jungleRules() Rules {
- return Rules{
- "root": {
- {`[^\S\n]+`, Text, nil},
- {`\n`, Text, nil},
- {`#(\n|[\w\W]*?[^#]\n)`, CommentSingle, nil},
- {`^(?=\S)`, None, Push("instruction")},
- {`[\.;\[\]\(\)\$]`, Punctuation, nil},
- {`[a-zA-Z_]\w*`, Name, nil},
- },
- "instruction": {
- {`[^\S\n]+`, Text, nil},
- {`=`, Operator, Push("value")},
- {`(?=\S)`, None, Push("var")},
- Default(Pop(1)),
- },
- "value": {
- {`[^\S\n]+`, Text, nil},
- {`\$\(`, Punctuation, Push("var")},
- {`[;\[\]\(\)\$]`, Punctuation, nil},
- {`#(\n|[\w\W]*?[^#]\n)`, CommentSingle, nil},
- {`[\w_\-\.\/\\]+`, Text, nil},
- Default(Pop(1)),
- },
- "var": {
- {`[^\S\n]+`, Text, nil},
- {`\b(((re)?source|barrel)Path|excludeAnnotations|annotations|lang)\b`, NameBuiltin, nil},
- {`\bbase\b`, NameConstant, nil},
- {`\b(ind|zsm|hrv|ces|dan|dut|eng|fin|fre|deu|gre|hun|ita|nob|po[lr]|rus|sl[ov]|spa|swe|ara|heb|zh[st]|jpn|kor|tha|vie|bul|tur)`, NameConstant, nil},
- {`\b((semi)?round|rectangle)(-\d+x\d+)?\b`, NameConstant, nil},
- {`[\.;\[\]\(\$]`, Punctuation, nil},
- {`\)`, Punctuation, Pop(1)},
- {`[a-zA-Z_]\w*`, Name, nil},
- Default(Pop(1)),
- },
- }
-}
diff --git a/lexers/k/kotlin.go b/lexers/k/kotlin.go
deleted file mode 100644
index deb182e..0000000
--- a/lexers/k/kotlin.go
+++ /dev/null
@@ -1,98 +0,0 @@
-package k
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Kotlin lexer.
-var Kotlin = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Kotlin",
- Aliases: []string{"kotlin"},
- Filenames: []string{"*.kt"},
- MimeTypes: []string{"text/x-kotlin"},
- DotAll: true,
- },
- kotlinRules,
-))
-
-func kotlinRules() Rules {
- const kotlinIdentifier = "(?:[_\\p{L}][\\p{L}\\p{N}]*|`@?[_\\p{L}][\\p{L}\\p{N}]+`)"
-
- return Rules{
- "root": {
- {`^\s*\[.*?\]`, NameAttribute, nil},
- {`[^\S\n]+`, Text, nil},
- {`\\\n`, Text, nil},
- {`//[^\n]*\n?`, CommentSingle, nil},
- {`/[*].*?[*]/`, CommentMultiline, nil},
- {`\n`, Text, nil},
- {`!==|!in|!is|===`, Operator, nil},
- {`%=|&&|\*=|\+\+|\+=|--|-=|->|\.\.|\/=|::|<=|==|>=|!!|!=|\|\||\?[:.]`, Operator, nil},
- {`[~!%^&*()+=|\[\]:;,.<>\/?-]`, Punctuation, nil},
- {`[{}]`, Punctuation, nil},
- {`"""`, LiteralString, Push("rawstring")},
- {`"`, LiteralStringDouble, Push("string")},
- {`(')(\\u[0-9a-fA-F]{4})(')`, ByGroups(LiteralStringChar, LiteralStringEscape, LiteralStringChar), nil},
- {`'\\.'|'[^\\]'`, LiteralStringChar, nil},
- {`0[xX][0-9a-fA-F]+[Uu]?[Ll]?|[0-9]+(\.[0-9]*)?([eE][+-][0-9]+)?[fF]?[Uu]?[Ll]?`, LiteralNumber, nil},
- {`(companion)(\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|actual|annotation|as|as\?|break|by|catch|class|companion|const|constructor|continue|crossinline|data|delegate|do|dynamic|else|enum|expect|external|false|field|file|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|it|lateinit|noinline|null|object|open|operator|out|override|package|param|private|property|protected|public|receiver|reified|return|sealed|set|setparam|super|suspend|tailrec|this|throw|true|try|typealias|typeof|val|var|vararg|when|where|while)\b`, Keyword, nil},
- {`@` + kotlinIdentifier, NameDecorator, nil},
- {kotlinIdentifier, Name, nil},
- },
- "package": {
- {`\S+`, NameNamespace, Pop(1)},
- },
- "class": {
- // \x60 is the back tick character (`)
- {`\x60[^\x60]+?\x60`, NameClass, Pop(1)},
- {kotlinIdentifier, NameClass, Pop(1)},
- },
- "property": {
- {`\x60[^\x60]+?\x60`, NameProperty, Pop(1)},
- {kotlinIdentifier, NameProperty, Pop(1)},
- },
- "generics-specification": {
- {`<`, Punctuation, Push("generics-specification")}, // required for generics inside generics e.g. >
- {`>`, Punctuation, Pop(1)},
- {`[,:*?]`, Punctuation, nil},
- {`(in|out|reified)`, Keyword, nil},
- {`\x60[^\x60]+?\x60`, NameClass, nil},
- {kotlinIdentifier, NameClass, nil},
- {`\s+`, Text, nil},
- },
- "function": {
- {`<`, Punctuation, Push("generics-specification")},
- {`\x60[^\x60]+?\x60`, NameFunction, Pop(1)},
- {kotlinIdentifier, NameFunction, Pop(1)},
- {`\s+`, Text, nil},
- },
- "rawstring": {
- // raw strings don't allow character escaping
- {`"""`, LiteralString, Pop(1)},
- {`(?:[^$"]+|\"{1,2}[^"])+`, LiteralString, nil},
- Include("string-interpol"),
- // remaining dollar signs are just a string
- {`\$`, LiteralString, nil},
- },
- "string": {
- {`\\[tbnr'"\\\$]`, LiteralStringEscape, nil},
- {`\\u[0-9a-fA-F]{4}`, LiteralStringEscape, nil},
- {`"`, LiteralStringDouble, Pop(1)},
- Include("string-interpol"),
- {`[^\n\\"$]+`, LiteralStringDouble, nil},
- // remaining dollar signs are just a string
- {`\$`, LiteralStringDouble, nil},
- },
- "string-interpol": {
- {`\$` + kotlinIdentifier, LiteralStringInterpol, nil},
- {`\${[^}\n]*}`, LiteralStringInterpol, nil},
- },
- }
-}
diff --git a/lexers/l/lighttpd.go b/lexers/l/lighttpd.go
deleted file mode 100644
index 6d83298..0000000
--- a/lexers/l/lighttpd.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package l
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Lighttpd Configuration File lexer.
-var Lighttpd = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Lighttpd configuration file",
- Aliases: []string{"lighty", "lighttpd"},
- Filenames: []string{},
- MimeTypes: []string{"text/x-lighttpd-conf"},
- },
- lighttpdRules,
-))
-
-func lighttpdRules() Rules {
- return 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/lexers/l/llvm.go b/lexers/l/llvm.go
deleted file mode 100644
index e9ea319..0000000
--- a/lexers/l/llvm.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package l
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Llvm lexer.
-var Llvm = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "LLVM",
- Aliases: []string{"llvm"},
- Filenames: []string{"*.ll"},
- MimeTypes: []string{"text/x-llvm"},
- },
- llvmRules,
-))
-
-func llvmRules() Rules {
- return 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/lexers/l/lua.go b/lexers/l/lua.go
deleted file mode 100644
index db574a1..0000000
--- a/lexers/l/lua.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package l
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Lua lexer.
-var Lua = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Lua",
- Aliases: []string{"lua"},
- Filenames: []string{"*.lua", "*.wlua"},
- MimeTypes: []string{"text/x-lua", "application/x-lua"},
- },
- luaRules,
-))
-
-func luaRules() Rules {
- return 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/lexers/lexer_benchmark_test.go b/lexers/lexer_benchmark_test.go
index 30eaa68..c97512c 100644
--- a/lexers/lexer_benchmark_test.go
+++ b/lexers/lexer_benchmark_test.go
@@ -5,8 +5,8 @@ import (
"github.com/stretchr/testify/assert"
- "github.com/alecthomas/chroma"
- "github.com/alecthomas/chroma/lexers/j"
+ "github.com/alecthomas/chroma/v2"
+ "github.com/alecthomas/chroma/v2/lexers"
)
const lexerBenchSource = `/*
@@ -210,7 +210,7 @@ public class CheckpointFile {
func Benchmark(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
- it, err := j.Java.Tokenise(nil, lexerBenchSource)
+ it, err := lexers.GlobalLexerRegistry.Get("Java").Tokenise(nil, lexerBenchSource)
assert.NoError(b, err)
for t := it(); t != chroma.EOF; t = it() {
}
diff --git a/lexers/lexers.go b/lexers/lexers.go
index 2b42921..161caef 100644
--- a/lexers/lexers.go
+++ b/lexers/lexers.go
@@ -1,60 +1,73 @@
-// Package lexers contains the registry of all lexers.
-//
-// Sub-packages contain lexer implementations.
package lexers
-// nolint
import (
- "github.com/alecthomas/chroma"
- _ "github.com/alecthomas/chroma/lexers/a"
- _ "github.com/alecthomas/chroma/lexers/b"
- _ "github.com/alecthomas/chroma/lexers/c"
- _ "github.com/alecthomas/chroma/lexers/circular"
- _ "github.com/alecthomas/chroma/lexers/d"
- _ "github.com/alecthomas/chroma/lexers/e"
- _ "github.com/alecthomas/chroma/lexers/f"
- _ "github.com/alecthomas/chroma/lexers/g"
- _ "github.com/alecthomas/chroma/lexers/h"
- _ "github.com/alecthomas/chroma/lexers/i"
- "github.com/alecthomas/chroma/lexers/internal"
- _ "github.com/alecthomas/chroma/lexers/j"
- _ "github.com/alecthomas/chroma/lexers/k"
- _ "github.com/alecthomas/chroma/lexers/l"
- _ "github.com/alecthomas/chroma/lexers/m"
- _ "github.com/alecthomas/chroma/lexers/n"
- _ "github.com/alecthomas/chroma/lexers/o"
- _ "github.com/alecthomas/chroma/lexers/p"
- _ "github.com/alecthomas/chroma/lexers/q"
- _ "github.com/alecthomas/chroma/lexers/r"
- _ "github.com/alecthomas/chroma/lexers/s"
- _ "github.com/alecthomas/chroma/lexers/t"
- _ "github.com/alecthomas/chroma/lexers/v"
- _ "github.com/alecthomas/chroma/lexers/w"
- _ "github.com/alecthomas/chroma/lexers/x"
- _ "github.com/alecthomas/chroma/lexers/y"
- _ "github.com/alecthomas/chroma/lexers/z"
+ "embed"
+ "io/fs"
+
+ "github.com/alecthomas/chroma/v2"
)
-// Registry of Lexers.
-var Registry = internal.Registry
+//go:embed embedded
+var embedded embed.FS
+
+// GlobalLexerRegistry is the global LexerRegistry of Lexers.
+var GlobalLexerRegistry = func() *chroma.LexerRegistry {
+ reg := chroma.NewLexerRegistry()
+ // index(reg)
+ paths, err := fs.Glob(embedded, "embedded/*.xml")
+ if err != nil {
+ panic(err)
+ }
+ for _, path := range paths {
+ reg.Register(chroma.MustNewXMLLexer(embedded, path))
+ }
+ return reg
+}()
// Names of all lexers, optionally including aliases.
-func Names(withAliases bool) []string { return internal.Names(withAliases) }
+func Names(withAliases bool) []string {
+ return GlobalLexerRegistry.Names(withAliases)
+}
// Get a Lexer by name, alias or file extension.
-func Get(name string) chroma.Lexer { return internal.Get(name) }
+func Get(name string) chroma.Lexer {
+ return GlobalLexerRegistry.Get(name)
+}
// MatchMimeType attempts to find a lexer for the given MIME type.
-func MatchMimeType(mimeType string) chroma.Lexer { return internal.MatchMimeType(mimeType) }
+func MatchMimeType(mimeType string) chroma.Lexer {
+ return GlobalLexerRegistry.MatchMimeType(mimeType)
+}
// Match returns the first lexer matching filename.
-func Match(filename string) chroma.Lexer { return internal.Match(filename) }
-
-// Analyse text content and return the "best" lexer..
-func Analyse(text string) chroma.Lexer { return internal.Analyse(text) }
+func Match(filename string) chroma.Lexer {
+ return GlobalLexerRegistry.Match(filename)
+}
// Register a Lexer with the global registry.
-func Register(lexer chroma.Lexer) chroma.Lexer { return internal.Register(lexer) }
+func Register(lexer chroma.Lexer) chroma.Lexer {
+ return GlobalLexerRegistry.Register(lexer)
+}
+
+// Analyse text content and return the "best" lexer..
+func Analyse(text string) chroma.Lexer {
+ return GlobalLexerRegistry.Analyse(text)
+}
+
+// PlaintextRules is used for the fallback lexer as well as the explicit
+// plaintext lexer.
+func PlaintextRules() chroma.Rules {
+ return chroma.Rules{
+ "root": []chroma.Rule{
+ {`.+`, chroma.Text, nil},
+ {`\n`, chroma.Text, nil},
+ },
+ }
+}
// Fallback lexer if no other is found.
-var Fallback = internal.Fallback
+var Fallback chroma.Lexer = chroma.MustNewLexer(&chroma.Config{
+ Name: "fallback",
+ Filenames: []string{"*"},
+ Priority: -1,
+}, PlaintextRules)
diff --git a/lexers/lexers_test.go b/lexers/lexers_test.go
index 3f147e4..e77dd5e 100644
--- a/lexers/lexers_test.go
+++ b/lexers/lexers_test.go
@@ -9,19 +9,18 @@ import (
"strings"
"testing"
+ "github.com/alecthomas/repr"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
- "github.com/alecthomas/chroma"
- "github.com/alecthomas/chroma/formatters"
- "github.com/alecthomas/chroma/lexers"
- "github.com/alecthomas/chroma/lexers/a"
- "github.com/alecthomas/chroma/lexers/x"
- "github.com/alecthomas/chroma/styles"
+ "github.com/alecthomas/chroma/v2"
+ "github.com/alecthomas/chroma/v2/formatters"
+ "github.com/alecthomas/chroma/v2/lexers"
+ "github.com/alecthomas/chroma/v2/styles"
)
func TestCompileAllRegexes(t *testing.T) {
- for _, lexer := range lexers.Registry.Lexers {
+ for _, lexer := range lexers.GlobalLexerRegistry.Lexers {
it, err := lexer.Tokenise(nil, "")
assert.NoError(t, err, "%s failed", lexer.Config().Name)
err = formatters.NoOp.Format(ioutil.Discard, styles.SwapOff, it)
@@ -31,19 +30,23 @@ func TestCompileAllRegexes(t *testing.T) {
func TestGet(t *testing.T) {
t.Run("ByName", func(t *testing.T) {
- assert.Equal(t, lexers.Get("xml"), x.XML)
+ assert.Equal(t, lexers.Get("xml"), lexers.GlobalLexerRegistry.Get("XML"))
})
t.Run("ByAlias", func(t *testing.T) {
- assert.Equal(t, lexers.Get("as"), a.Actionscript)
+ assert.Equal(t, lexers.Get("as"), lexers.GlobalLexerRegistry.Get("Actionscript"))
})
t.Run("ViaFilename", func(t *testing.T) {
- assert.Equal(t, lexers.Get("svg"), x.XML)
+ expected := lexers.Get("XML")
+ actual := lexers.GlobalLexerRegistry.Get("test.svg")
+ assert.Equal(t,
+ repr.String(expected.Config(), repr.Indent(" ")),
+ repr.String(actual.Config(), repr.Indent(" ")))
})
}
func TestGlobs(t *testing.T) {
filename := "main.go"
- for _, lexer := range lexers.Registry.Lexers {
+ for _, lexer := range lexers.GlobalLexerRegistry.Lexers {
config := lexer.Config()
for _, glob := range config.Filenames {
_, err := filepath.Match(glob, filename)
@@ -86,7 +89,9 @@ func FileTest(t *testing.T, lexer chroma.Lexer, actualFilename, expectedFilename
assert.NoError(t, err)
// Equal?
- assert.Equal(t, expected, actual)
+ assert.Equal(t,
+ repr.String(expected, repr.Indent(" ")),
+ repr.String(actual, repr.Indent(" ")))
}
})
}
@@ -130,7 +135,7 @@ func TestLexers(t *testing.T) {
base := strings.Split(strings.TrimSuffix(file.Name(), filepath.Ext(file.Name())), ".")[0]
lexer := lexers.Get(base)
- assert.NotNil(t, lexer)
+ assert.NotNil(t, lexer, base)
filename := filepath.Join("testdata", file.Name())
expectedFilename := strings.TrimSuffix(filename, filepath.Ext(filename)) + ".expected"
diff --git a/lexers/m/mathematica.go b/lexers/m/mathematica.go
deleted file mode 100644
index ed1ea24..0000000
--- a/lexers/m/mathematica.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package m
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Mathematica lexer.
-var Mathematica = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Mathematica",
- Aliases: []string{"mathematica", "mma", "nb"},
- Filenames: []string{"*.nb", "*.cdf", "*.nbp", "*.ma"},
- MimeTypes: []string{"application/mathematica", "application/vnd.wolfram.mathematica", "application/vnd.wolfram.mathematica.package", "application/vnd.wolfram.cdf"},
- },
- mathematicaRules,
-))
-
-func mathematicaRules() Rules {
- return Rules{
- "root": {
- {`(?s)\(\*.*?\*\)`, Comment, nil},
- {"([a-zA-Z]+[A-Za-z0-9]*`)", NameNamespace, nil},
- {`([A-Za-z0-9]*_+[A-Za-z0-9]*)`, NameVariable, nil},
- {`#\d*`, NameVariable, nil},
- {`([a-zA-Z]+[a-zA-Z0-9]*)`, Name, nil},
- {`-?\d+\.\d*`, LiteralNumberFloat, nil},
- {`-?\d*\.\d+`, LiteralNumberFloat, nil},
- {`-?\d+`, LiteralNumberInteger, nil},
- {Words(``, ``, `;;`, `=`, `=.`, `!===`, `:=`, `->`, `:>`, `/.`, `+`, `-`, `*`, `/`, `^`, `&&`, `||`, `!`, `<>`, `|`, `/;`, `?`, `@`, `//`, `/@`, `@@`, `@@@`, `~~`, `===`, `&`, `<`, `>`, `<=`, `>=`), Operator, nil},
- {Words(``, ``, `,`, `;`, `(`, `)`, `[`, `]`, `{`, `}`), Punctuation, nil},
- {`".*?"`, LiteralString, nil},
- {`\s+`, TextWhitespace, nil},
- },
- }
-}
diff --git a/lexers/m/matlab.go b/lexers/m/matlab.go
deleted file mode 100644
index 4e98d69..0000000
--- a/lexers/m/matlab.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package m
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Matlab lexer.
-var Matlab = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Matlab",
- Aliases: []string{"matlab"},
- Filenames: []string{"*.m"},
- MimeTypes: []string{"text/matlab"},
- },
- matlabRules,
-))
-
-func matlabRules() Rules {
- return Rules{
- "root": {
- {`\n`, Text, nil},
- {`^!.*`, LiteralStringOther, nil},
- {`%\{\s*\n`, CommentMultiline, Push("blockcomment")},
- {`%.*$`, Comment, nil},
- {`^\s*function`, Keyword, Push("deffunc")},
- {Words(``, `\b`, `break`, `case`, `catch`, `classdef`, `continue`, `else`, `elseif`, `end`, `enumerated`, `events`, `for`, `function`, `global`, `if`, `methods`, `otherwise`, `parfor`, `persistent`, `properties`, `return`, `spmd`, `switch`, `try`, `while`), Keyword, nil},
- {`(sin|sind|sinh|asin|asind|asinh|cos|cosd|cosh|acos|acosd|acosh|tan|tand|tanh|atan|atand|atan2|atanh|sec|secd|sech|asec|asecd|asech|csc|cscd|csch|acsc|acscd|acsch|cot|cotd|coth|acot|acotd|acoth|hypot|exp|expm1|log|log1p|log10|log2|pow2|realpow|reallog|realsqrt|sqrt|nthroot|nextpow2|abs|angle|complex|conj|imag|real|unwrap|isreal|cplxpair|fix|floor|ceil|round|mod|rem|sign|airy|besselj|bessely|besselh|besseli|besselk|beta|betainc|betaln|ellipj|ellipke|erf|erfc|erfcx|erfinv|expint|gamma|gammainc|gammaln|psi|legendre|cross|dot|factor|isprime|primes|gcd|lcm|rat|rats|perms|nchoosek|factorial|cart2sph|cart2pol|pol2cart|sph2cart|hsv2rgb|rgb2hsv|zeros|ones|eye|repmat|rand|randn|linspace|logspace|freqspace|meshgrid|accumarray|size|length|ndims|numel|disp|isempty|isequal|isequalwithequalnans|cat|reshape|diag|blkdiag|tril|triu|fliplr|flipud|flipdim|rot90|find|end|sub2ind|ind2sub|bsxfun|ndgrid|permute|ipermute|shiftdim|circshift|squeeze|isscalar|isvector|ans|eps|realmax|realmin|pi|i|inf|nan|isnan|isinf|isfinite|j|why|compan|gallery|hadamard|hankel|hilb|invhilb|magic|pascal|rosser|toeplitz|vander|wilkinson)\b`, NameBuiltin, nil},
- {`\.\.\..*$`, Comment, nil},
- {`-|==|~=|<|>|<=|>=|&&|&|~|\|\|?`, Operator, nil},
- {`\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\`, Operator, nil},
- {`\[|\]|\(|\)|\{|\}|:|@|\.|,`, Punctuation, nil},
- {`=|:|;`, Punctuation, nil},
- {`(?<=[\w)\].])\'+`, Operator, nil},
- {`(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?`, LiteralNumberFloat, nil},
- {`\d+[eEf][+-]?[0-9]+`, LiteralNumberFloat, nil},
- {`\d+`, LiteralNumberInteger, nil},
- {`(?=]|<=|>=)`, Punctuation, nil},
- Include("simplevalue"),
- {`\s+`, TextWhitespace, nil},
- },
- }
- },
-))
diff --git a/lexers/m/meson.go b/lexers/m/meson.go
deleted file mode 100644
index 2a6a22f..0000000
--- a/lexers/m/meson.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package m
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Meson lexer.
-var Meson = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Meson",
- Aliases: []string{"meson", "meson.build"},
- Filenames: []string{"meson.build", "meson_options.txt"},
- MimeTypes: []string{"text/x-meson"},
- },
- func() Rules {
- return Rules{
- "root": {
- {`#.*?$`, Comment, nil},
- {`'''.*'''`, LiteralStringSingle, nil},
- {`[1-9][0-9]*`, LiteralNumberInteger, nil},
- {`0o[0-7]+`, LiteralNumberOct, nil},
- {`0x[a-fA-F0-9]+`, LiteralNumberHex, nil},
- Include("string"),
- Include("keywords"),
- Include("expr"),
- {`[a-zA-Z_][a-zA-Z_0-9]*`, Name, nil},
- {`\s+`, TextWhitespace, nil},
- },
- "string": {
- {`[']{3}([']{0,2}([^\\']|\\(.|\n)))*[']{3}`, LiteralString, nil},
- {`'.*?(?/-]`, Operator, nil},
- {`[()\[\],.]`, Punctuation, nil},
- {Words(``, `\b`, `break`, `case`, `const`, `continue`, `do`, `else`, `enum`, `extern`, `for`, `if`, `return`, `sizeof`, `static`, `struct`, `switch`, `typedef`, `union`, `while`), Keyword, nil},
- {`(bool|float|half|long|ptrdiff_t|size_t|unsigned|u?char|u?int((8|16|32|64)_t)?|u?short)\b`, KeywordType, nil},
- {`(bool|float|half|u?(char|int|long|short))(2|3|4)\b`, KeywordType, nil},
- {`packed_(float|half|long|u?(char|int|short))(2|3|4)\b`, KeywordType, nil},
- {`(float|half)(2|3|4)x(2|3|4)\b`, KeywordType, nil},
- {`atomic_u?int\b`, KeywordType, nil},
- {`(rg?(8|16)(u|s)norm|rgba(8|16)(u|s)norm|srgba8unorm|rgb10a2|rg11b10f|rgb9e5)\b`, KeywordType, nil},
- {`(array|depth(2d|cube)(_array)?|depth2d_ms(_array)?|sampler|texture_buffer|texture(1|2)d(_array)?|texture2d_ms(_array)?|texture3d|texturecube(_array)?|uniform|visible_function_table)\b`, KeywordType, nil},
- {`(true|false|NULL)\b`, NameBuiltin, nil},
- {Words(``, `\b`, `device`, `constant`, `ray_data`, `thread`, `threadgroup`, `threadgroup_imageblock`), Keyword, nil},
- {`([a-zA-Z_]\w*)(\s*)(:)(?!:)`, ByGroups(NameLabel, Text, Punctuation), nil},
- {`[a-zA-Z_]\w*`, Name, nil},
- },
- "root": {
- Include("whitespace"),
- {`(fragment|kernel|vertex)?((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;{]*)(\{)`, ByGroups(Keyword, UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), Push("function")},
- {`(fragment|kernel|vertex)?((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;]*)(;)`, ByGroups(Keyword, UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), nil},
- Default(Push("statement")),
- },
- "classname": {
- {`(\[\[.+\]\])(\s*)`, ByGroups(NameAttribute, Text), nil},
- {`[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, Push("root")},
- {`[;}]`, Punctuation, Pop(1)},
- },
- "function": {
- Include("whitespace"),
- Include("statements"),
- {`;`, Punctuation, nil},
- {`\{`, Punctuation, Push()},
- {`\}`, Punctuation, Pop(1)},
- },
- "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.*?(?|->|<-|\\/|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/lexers/m/mlir.go b/lexers/m/mlir.go
deleted file mode 100644
index 112a1c3..0000000
--- a/lexers/m/mlir.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package m
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// MLIR lexer.
-var Mlir = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "MLIR",
- Aliases: []string{"mlir"},
- Filenames: []string{"*.mlir"},
- MimeTypes: []string{"text/x-mlir"},
- },
- mlirRules,
-))
-
-func mlirRules() Rules {
- return Rules{
- "root": {
- Include("whitespace"),
- {`c?"[^"]*?"`, LiteralString, nil},
- {`\^([-a-zA-Z$._][\w\-$.0-9]*)\s*`, NameLabel, nil},
- {`([\w\d_$.]+)\s*=`, NameLabel, nil},
- Include("keyword"),
- {`->`, Punctuation, nil},
- {`@([\w_][\w\d_$.]*)`, NameFunction, nil},
- {`[%#][\w\d_$.]+`, NameVariable, nil},
- {`([1-9?][\d?]*\s*x)+`, LiteralNumber, nil},
- {`0[xX][a-fA-F0-9]+`, LiteralNumber, nil},
- {`-?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?`, LiteralNumber, nil},
- {`[=<>{}\[\]()*.,!:]|x\b`, Punctuation, nil},
- {`[\w\d]+`, Text, nil},
- },
- "whitespace": {
- {`(\n|\s)+`, Text, nil},
- {`//.*?\n`, Comment, nil},
- },
- "keyword": {
- {Words(``, ``, `constant`, `return`), KeywordType, nil},
- {Words(``, ``, `func`, `loc`, `memref`, `tensor`, `vector`), KeywordType, nil},
- {`bf16|f16|f32|f64|index`, Keyword, nil},
- {`i[1-9]\d*`, Keyword, nil},
- },
- }
-}
diff --git a/lexers/m/modula2.go b/lexers/m/modula2.go
deleted file mode 100644
index 6ab05c9..0000000
--- a/lexers/m/modula2.go
+++ /dev/null
@@ -1,119 +0,0 @@
-package m
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Modula-2 lexer.
-var Modula2 = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Modula-2",
- Aliases: []string{"modula2", "m2"},
- Filenames: []string{"*.def", "*.mod"},
- MimeTypes: []string{"text/x-modula2"},
- DotAll: true,
- },
- modula2Rules,
-))
-
-func modula2Rules() Rules {
- return 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/lexers/m/monkeyc.go b/lexers/m/monkeyc.go
deleted file mode 100644
index 8ad81cc..0000000
--- a/lexers/m/monkeyc.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package m
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-var MonkeyC = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "MonkeyC",
- Aliases: []string{"monkeyc"},
- Filenames: []string{"*.mc"},
- MimeTypes: []string{"text/x-monkeyc"},
- },
- monkeyCRules,
-))
-
-func monkeyCRules() Rules {
- return Rules{
- "root": {
- {`[^\S\n]+`, Text, nil},
- {`\n`, Text, nil},
- {`//(\n|[\w\W]*?[^\\]\n)`, CommentSingle, nil},
- {`/(\\\n)?[*][\w\W]*?[*](\\\n)?/`, CommentMultiline, nil},
- {`/(\\\n)?[*][\w\W]*`, CommentMultiline, nil},
- {`:[a-zA-Z_][\w_\.]*`, StringSymbol, nil},
- {`[{}\[\]\(\),;:\.]`, Punctuation, nil},
- {`[&~\|\^!+\-*\/%=?]`, Operator, nil},
- {`=>|[+-]=|&&|\|\||>>|<<|[<>]=?|[!=]=`, Operator, nil},
- {`\b(and|or|instanceof|has|extends|new)`, OperatorWord, nil},
- {Words(``, `\b`, `NaN`, `null`, `true`, `false`), KeywordConstant, nil},
- {`(using)((?:\s|\\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("import")},
- {`(class)((?:\s|\\\\s)+)`, ByGroups(KeywordDeclaration, Text), Push("class")},
- {`(function)((?:\s|\\\\s)+)`, ByGroups(KeywordDeclaration, Text), Push("function")},
- {`(module)((?:\s|\\\\s)+)`, ByGroups(KeywordDeclaration, Text), Push("module")},
- {`\b(if|else|for|switch|case|while|break|continue|default|do|try|catch|finally|return|throw|extends|function)\b`, Keyword, nil},
- {`\b(const|enum|hidden|public|protected|private|static)\b`, KeywordType, nil},
- {`\bvar\b`, KeywordDeclaration, nil},
- {`\b(Activity(Monitor|Recording)?|Ant(Plus)?|Application|Attention|Background|Communications|Cryptography|FitContributor|Graphics|Gregorian|Lang|Math|Media|Persisted(Content|Locations)|Position|Properties|Sensor(History|Logging)?|Storage|StringUtil|System|Test|Time(r)?|Toybox|UserProfile|WatchUi|Rez|Drawables|Strings|Fonts|method)\b`, NameBuiltin, nil},
- {`\b(me|self|\$)\b`, NameBuiltinPseudo, nil},
- {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil},
- {`'(\\\\|\\'|[^''])*'`, LiteralStringSingle, nil},
- {`-?(0x[0-9a-fA-F]+l?)`, NumberHex, nil},
- {`-?([0-9]+(\.[0-9]+[df]?|[df]))\b`, NumberFloat, nil},
- {`-?([0-9]+l?)`, NumberInteger, nil},
- {`[a-zA-Z_]\w*`, Name, nil},
- },
- "import": {
- {`([a-zA-Z_][\w_\.]*)(?:(\s+)(as)(\s+)([a-zA-Z_][\w_]*))?`, ByGroups(NameNamespace, Text, KeywordNamespace, Text, NameNamespace), nil},
- Default(Pop(1)),
- },
- "class": {
- {`([a-zA-Z_][\w_\.]*)(?:(\s+)(extends)(\s+)([a-zA-Z_][\w_\.]*))?`, ByGroups(NameClass, Text, KeywordDeclaration, Text, NameClass), nil},
- Default(Pop(1)),
- },
- "function": {
- {`initialize`, NameFunctionMagic, nil},
- {`[a-zA-Z_][\w_\.]*`, NameFunction, nil},
- Default(Pop(1)),
- },
- "module": {
- {`[a-zA-Z_][\w_\.]*`, NameNamespace, nil},
- Default(Pop(1)),
- },
- }
-}
diff --git a/lexers/m/mwscript.go b/lexers/m/mwscript.go
deleted file mode 100644
index 0ba0ba9..0000000
--- a/lexers/m/mwscript.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package m
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// MorrowindScript lexer.
-var MorrowindScript = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "MorrowindScript",
- Aliases: []string{"morrowind", "mwscript"},
- Filenames: []string{},
- MimeTypes: []string{},
- },
- morrowindScriptRules,
-))
-
-func morrowindScriptRules() Rules {
- return 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/lexers/m/mysql.go b/lexers/m/mysql.go
deleted file mode 100644
index 3acda6d..0000000
--- a/lexers/m/mysql.go
+++ /dev/null
@@ -1,83 +0,0 @@
-package m
-
-import (
- "regexp"
-
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-var (
- mysqlAnalyserNameBetweenBacktickRe = regexp.MustCompile("`[a-zA-Z_]\\w*`")
- mysqlAnalyserNameBetweenBracketRe = regexp.MustCompile(`\[[a-zA-Z_]\w*\]`)
-)
-
-// MySQL lexer.
-var MySQL = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "MySQL",
- Aliases: []string{"mysql", "mariadb"},
- Filenames: []string{"*.sql"},
- MimeTypes: []string{"text/x-mysql", "text/x-mariadb"},
- NotMultiline: true,
- CaseInsensitive: true,
- },
- mySQLRules,
-).SetAnalyser(func(text string) float32 {
- nameBetweenBacktickCount := len(mysqlAnalyserNameBetweenBacktickRe.FindAllString(text, -1))
- nameBetweenBracketCount := len(mysqlAnalyserNameBetweenBracketRe.FindAllString(text, -1))
-
- var result float32
-
- // Same logic as above in the TSQL analysis.
- dialectNameCount := nameBetweenBacktickCount + nameBetweenBracketCount
- if dialectNameCount >= 1 && nameBetweenBacktickCount >= (2*nameBetweenBracketCount) {
- // Found at least twice as many `name` as [name].
- result += 0.5
- } else if nameBetweenBacktickCount > nameBetweenBracketCount {
- result += 0.2
- } else if nameBetweenBacktickCount > 0 {
- result += 0.1
- }
-
- return result
-}))
-
-func mySQLRules() Rules {
- return Rules{
- "root": {
- {`\s+`, TextWhitespace, nil},
- {`(#|--\s+).*\n?`, CommentSingle, nil},
- {`/\*`, CommentMultiline, Push("multiline-comments")},
- {`[0-9]+`, LiteralNumberInteger, nil},
- {`[0-9]*\.[0-9]+(e[+-][0-9]+)`, LiteralNumberFloat, nil},
- {`((?:_[a-z0-9]+)?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("string")},
- {`((?:_[a-z0-9]+)?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("double-string")},
- {"[+*/<>=~!@#%^&|`?-]", 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, TextWhitespace, 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|identified|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|privileges|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|user|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, TextWhitespace, 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},
- },
- "string": {
- {`[^']+`, LiteralStringSingle, nil},
- {`''`, LiteralStringSingle, nil},
- {`'`, LiteralStringSingle, Pop(1)},
- },
- "double-string": {
- {`[^"]+`, LiteralStringDouble, nil},
- {`""`, LiteralStringDouble, nil},
- {`"`, LiteralStringDouble, Pop(1)},
- },
- }
-}
diff --git a/lexers/m/make.go b/lexers/make.go
similarity index 81%
rename from lexers/m/make.go
rename to lexers/make.go
index 905491a..48bdc13 100644
--- a/lexers/m/make.go
+++ b/lexers/make.go
@@ -1,13 +1,11 @@
-package m
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- . "github.com/alecthomas/chroma/lexers/b" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// Makefile lexer.
-var Makefile = internal.Register(MustNewLazyLexer(
+var Makefile = Register(MustNewLexer(
&Config{
Name: "Base Makefile",
Aliases: []string{"make", "makefile", "mf", "bsdmake"},
@@ -21,13 +19,13 @@ var Makefile = internal.Register(MustNewLazyLexer(
func makefileRules() Rules {
return Rules{
"root": {
- {`^(?:[\t ]+.*\n|\n)+`, Using(Bash), nil},
+ {`^(?:[\t ]+.*\n|\n)+`, Using("Bash"), 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},
+ {`([\w${}().-]+)(\s*)([!?:+]?=)([ \t]*)((?:.*\\\n)+|.*\n)`, ByGroups(NameVariable, Text, Operator, Text, Using("Bash")), nil},
{`(?s)"(\\\\|\\.|[^"\\])*"`, LiteralStringDouble, nil},
{`(?s)'(\\\\|\\.|[^'\\])*'`, LiteralStringSingle, nil},
{`([^\n:]+)(:+)([ \t]*)`, ByGroups(NameFunction, Operator, Text), Push("block-header")},
diff --git a/lexers/m/mako.go b/lexers/mako.go
similarity index 81%
rename from lexers/m/mako.go
rename to lexers/mako.go
index 6f777dd..0de18fe 100644
--- a/lexers/m/mako.go
+++ b/lexers/mako.go
@@ -1,13 +1,11 @@
-package m
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
- . "github.com/alecthomas/chroma/lexers/p" // nolint
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// Mako lexer.
-var Mako = internal.Register(MustNewLazyLexer(
+var Mako = Register(MustNewLexer(
&Config{
Name: "Mako",
Aliases: []string{"mako"},
@@ -21,14 +19,14 @@ func makoRules() Rules {
return Rules{
"root": {
{`(\s*)(%)(\s*end(?:\w+))(\n|\Z)`, ByGroups(Text, CommentPreproc, Keyword, Other), nil},
- {`(\s*)(%)([^\n]*)(\n|\Z)`, ByGroups(Text, CommentPreproc, Using(Python), Other), nil},
+ {`(\s*)(%)([^\n]*)(\n|\Z)`, ByGroups(Text, CommentPreproc, Using("Python"), Other), nil},
{`(\s*)(##[^\n]*)(\n|\Z)`, ByGroups(Text, CommentPreproc, Other), nil},
{`(?s)<%doc>.*?%doc>`, CommentPreproc, nil},
{`(<%)([\w.:]+)`, ByGroups(CommentPreproc, NameBuiltin), Push("tag")},
{`(%)([\w.:]+)(>)`, ByGroups(CommentPreproc, NameBuiltin, CommentPreproc), nil},
{`<%(?=([\w.:]+))`, CommentPreproc, Push("ondeftags")},
- {`(<%(?:!?))(.*?)(%>)(?s)`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
- {`(\$\{)(.*?)(\})`, ByGroups(CommentPreproc, Using(Python), CommentPreproc), nil},
+ {`(<%(?:!?))(.*?)(%>)(?s)`, ByGroups(CommentPreproc, Using("Python"), CommentPreproc), nil},
+ {`(\$\{)(.*?)(\})`, ByGroups(CommentPreproc, Using("Python"), CommentPreproc), nil},
{`(?sx)
(.+?) # anything, followed by:
(?:
diff --git a/lexers/m/markdown.go b/lexers/markdown.go
similarity index 82%
rename from lexers/m/markdown.go
rename to lexers/markdown.go
index e50e470..1fb9f5b 100644
--- a/lexers/m/markdown.go
+++ b/lexers/markdown.go
@@ -1,13 +1,11 @@
-package m
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/h"
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// Markdown lexer.
-var Markdown = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer(
+var Markdown = Register(DelegatingLexer(HTML, MustNewLexer(
&Config{
Name: "markdown",
Aliases: []string{"md", "mkd"},
@@ -29,11 +27,7 @@ func markdownRules() Rules {
{"^(```\\n)([\\w\\W]*?)(^```$)", ByGroups(String, Text, String), nil},
{
"^(```)(\\w+)(\\n)([\\w\\W]*?)(^```$)",
- UsingByGroup(
- internal.Get,
- 2, 4,
- String, String, String, Text, String,
- ),
+ UsingByGroup(2, 4, String, String, String, Text, String),
nil,
},
Include("inline"),
diff --git a/lexers/m/mason.go b/lexers/mason.go
similarity index 68%
rename from lexers/m/mason.go
rename to lexers/mason.go
index bc48f5c..57e6120 100644
--- a/lexers/m/mason.go
+++ b/lexers/mason.go
@@ -1,14 +1,11 @@
-package m
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- . "github.com/alecthomas/chroma/lexers/h" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
- . "github.com/alecthomas/chroma/lexers/p" // nolint
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// Mason lexer.
-var Mason = internal.Register(MustNewLazyLexer(
+var Mason = Register(MustNewLexer(
&Config{
Name: "Mason",
Aliases: []string{"mason"},
@@ -25,13 +22,13 @@ func masonRules() Rules {
{`\s+`, Text, nil},
{`(<%doc>)(.*?)(%doc>)(?s)`, ByGroups(NameTag, CommentMultiline, NameTag), nil},
{`(<%(?:def|method))(\s*)(.*?)(>)(.*?)(%\2\s*>)(?s)`, ByGroups(NameTag, Text, NameFunction, NameTag, UsingSelf("root"), NameTag), nil},
- {`(<%\w+)(.*?)(>)(.*?)(%\2\s*>)(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using(Perl), NameTag), nil},
- {`(<&[^|])(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using(Perl), NameTag), nil},
- {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using(Perl), NameTag), nil},
+ {`(<%\w+)(.*?)(>)(.*?)(%\2\s*>)(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using("Perl"), NameTag), nil},
+ {`(<&[^|])(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using("Perl"), NameTag), nil},
+ {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using("Perl"), NameTag), nil},
{`&>`, NameTag, nil},
- {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using(Perl), NameTag), nil},
+ {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using("Perl"), NameTag), nil},
{`(?<=^)#[^\n]*(\n|\Z)`, Comment, nil},
- {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using(Perl), Other), nil},
+ {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using("Perl"), Other), nil},
{`(?sx)
(.+?) # anything, followed by:
(?:
@@ -41,7 +38,7 @@ func masonRules() Rules {
# - don't consume
(\\\n) | # an escaped newline
\Z # end of string
- )`, ByGroups(Using(HTML), Operator), nil},
+ )`, ByGroups(Using("HTML"), Operator), nil},
},
}
}
diff --git a/lexers/m/myghty.go b/lexers/myghty.go
similarity index 71%
rename from lexers/m/myghty.go
rename to lexers/myghty.go
index eac082c..42ff0e6 100644
--- a/lexers/m/myghty.go
+++ b/lexers/myghty.go
@@ -1,13 +1,11 @@
-package m
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
- . "github.com/alecthomas/chroma/lexers/p" // nolint
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// Myghty lexer.
-var Myghty = internal.Register(MustNewLazyLexer(
+var Myghty = Register(MustNewLexer(
&Config{
Name: "Myghty",
Aliases: []string{"myghty"},
@@ -22,13 +20,13 @@ func myghtyRules() Rules {
"root": {
{`\s+`, Text, nil},
{`(<%(?:def|method))(\s*)(.*?)(>)(.*?)(%\2\s*>)(?s)`, ByGroups(NameTag, Text, NameFunction, NameTag, UsingSelf("root"), NameTag), nil},
- {`(<%\w+)(.*?)(>)(.*?)(%\2\s*>)(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using(Python2), NameTag), nil},
- {`(<&[^|])(.*?)(,.*?)?(&>)`, ByGroups(NameTag, NameFunction, Using(Python2), NameTag), nil},
- {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using(Python2), NameTag), nil},
+ {`(<%\w+)(.*?)(>)(.*?)(%\2\s*>)(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using("Python2"), NameTag), nil},
+ {`(<&[^|])(.*?)(,.*?)?(&>)`, ByGroups(NameTag, NameFunction, Using("Python2"), NameTag), nil},
+ {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using("Python2"), NameTag), nil},
{`&>`, NameTag, nil},
- {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using(Python2), NameTag), nil},
+ {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using("Python2"), NameTag), nil},
{`(?<=^)#[^\n]*(\n|\Z)`, Comment, nil},
- {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using(Python2), Other), nil},
+ {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using("Python2"), Other), nil},
{`(?sx)
(.+?) # anything, followed by:
(?:
diff --git a/lexers/mysql.go b/lexers/mysql.go
new file mode 100644
index 0000000..32e94c2
--- /dev/null
+++ b/lexers/mysql.go
@@ -0,0 +1,33 @@
+package lexers
+
+import (
+ "regexp"
+)
+
+var (
+ mysqlAnalyserNameBetweenBacktickRe = regexp.MustCompile("`[a-zA-Z_]\\w*`")
+ mysqlAnalyserNameBetweenBracketRe = regexp.MustCompile(`\[[a-zA-Z_]\w*\]`)
+)
+
+func init() { // nolint: gochecknoinits
+ Get("mysql").
+ SetAnalyser(func(text string) float32 {
+ nameBetweenBacktickCount := len(mysqlAnalyserNameBetweenBacktickRe.FindAllString(text, -1))
+ nameBetweenBracketCount := len(mysqlAnalyserNameBetweenBracketRe.FindAllString(text, -1))
+
+ var result float32
+
+ // Same logic as above in the TSQL analysis.
+ dialectNameCount := nameBetweenBacktickCount + nameBetweenBracketCount
+ if dialectNameCount >= 1 && nameBetweenBacktickCount >= (2*nameBetweenBracketCount) {
+ // Found at least twice as many `name` as [name].
+ result += 0.5
+ } else if nameBetweenBacktickCount > nameBetweenBracketCount {
+ result += 0.2
+ } else if nameBetweenBacktickCount > 0 {
+ result += 0.1
+ }
+
+ return result
+ })
+}
diff --git a/lexers/n/nasm.go b/lexers/n/nasm.go
deleted file mode 100644
index de6734e..0000000
--- a/lexers/n/nasm.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package n
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Nasm lexer.
-var Nasm = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "NASM",
- Aliases: []string{"nasm"},
- Filenames: []string{"*.asm", "*.ASM"},
- MimeTypes: []string{"text/x-nasm"},
- CaseInsensitive: true,
- },
- nasmRules,
-))
-
-func nasmRules() Rules {
- return 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/lexers/n/newspeak.go b/lexers/n/newspeak.go
deleted file mode 100644
index c9d3ae0..0000000
--- a/lexers/n/newspeak.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package n
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Newspeak lexer.
-var Newspeak = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Newspeak",
- Aliases: []string{"newspeak"},
- Filenames: []string{"*.ns2"},
- MimeTypes: []string{"text/x-newspeak"},
- },
- newspeakRules,
-))
-
-func newspeakRules() Rules {
- return 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/lexers/n/nginx.go b/lexers/n/nginx.go
deleted file mode 100644
index 6d80523..0000000
--- a/lexers/n/nginx.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package n
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Nginx Configuration File lexer.
-var Nginx = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Nginx configuration file",
- Aliases: []string{"nginx"},
- Filenames: []string{"nginx.conf"},
- MimeTypes: []string{"text/x-nginx-conf"},
- },
- nginxRules,
-))
-
-func nginxRules() Rules {
- return 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/lexers/n/nim.go b/lexers/n/nim.go
deleted file mode 100644
index 3f98086..0000000
--- a/lexers/n/nim.go
+++ /dev/null
@@ -1,97 +0,0 @@
-package n
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Nim lexer.
-var Nim = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Nim",
- Aliases: []string{"nim", "nimrod"},
- Filenames: []string{"*.nim", "*.nimrod"},
- MimeTypes: []string{"text/x-nim"},
- CaseInsensitive: true,
- },
- nimRules,
-))
-
-func nimRules() Rules {
- return Rules{
- "root": {
- {`#\[[\s\S]*?\]#`, CommentMultiline, nil},
- {`##.*$`, 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_\b`, Name, nil}, // Standalone _ used as discardable variable identifier
- {`\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/lexers/o/objectivec.go b/lexers/o/objectivec.go
deleted file mode 100644
index 0ae3029..0000000
--- a/lexers/o/objectivec.go
+++ /dev/null
@@ -1,169 +0,0 @@
-package o
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Objective-C lexer.
-var ObjectiveC = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Objective-C",
- Aliases: []string{"objective-c", "objectivec", "obj-c", "objc"},
- Filenames: []string{"*.m", "*.h"},
- MimeTypes: []string{"text/x-objective-c"},
- },
- objectiveCRules,
-))
-
-func objectiveCRules() Rules {
- return Rules{
- "statements": {
- {`@"`, LiteralString, Push("string")},
- {`@(YES|NO)`, LiteralNumber, nil},
- {`@'(\\.|\\[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},
- {`@0x[0-9a-fA-F]+[Ll]?`, LiteralNumberHex, nil},
- {`@0[0-7]+[Ll]?`, LiteralNumberOct, nil},
- {`@\d+[Ll]?`, LiteralNumberInteger, nil},
- {`@\(`, Literal, Push("literal_number")},
- {`@\[`, Literal, Push("literal_array")},
- {`@\{`, Literal, Push("literal_dictionary")},
- {Words(``, `\b`, `@selector`, `@private`, `@protected`, `@public`, `@encode`, `@synchronized`, `@try`, `@throw`, `@catch`, `@finally`, `@end`, `@property`, `@synthesize`, `__bridge`, `__bridge_transfer`, `__autoreleasing`, `__block`, `__weak`, `__strong`, `weak`, `strong`, `copy`, `retain`, `assign`, `unsafe_unretained`, `atomic`, `nonatomic`, `readonly`, `readwrite`, `setter`, `getter`, `typeof`, `in`, `out`, `inout`, `release`, `class`, `@dynamic`, `@optional`, `@required`, `@autoreleasepool`), Keyword, nil},
- {Words(``, `\b`, `id`, `instancetype`, `Class`, `IMP`, `SEL`, `BOOL`, `IBOutlet`, `IBAction`, `unichar`), KeywordType, nil},
- {`@(true|false|YES|NO)\n`, NameBuiltin, nil},
- {`(YES|NO|nil|self|super)\b`, NameBuiltin, nil},
- {`(Boolean|UInt8|SInt8|UInt16|SInt16|UInt32|SInt32)\b`, KeywordType, nil},
- {`(TRUE|FALSE)\b`, NameBuiltin, nil},
- {`(@interface|@implementation)(\s+)`, ByGroups(Keyword, Text), Push("#pop", "oc_classname")},
- {`(@class|@protocol)(\s+)`, ByGroups(Keyword, Text), Push("#pop", "oc_forward_classname")},
- {`@`, Punctuation, nil},
- {`(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},
- },
- "oc_classname": {
- {`([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?(\s*)(\{)`, ByGroups(NameClass, Text, NameClass, Text, Punctuation), Push("#pop", "oc_ivars")},
- {`([a-zA-Z$_][\w$]*)(\s*:\s*)([a-zA-Z$_][\w$]*)?`, ByGroups(NameClass, Text, NameClass), Pop(1)},
- {`([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))(\s*)(\{)`, ByGroups(NameClass, Text, NameLabel, Text, Punctuation), Push("#pop", "oc_ivars")},
- {`([a-zA-Z$_][\w$]*)(\s*)(\([a-zA-Z$_][\w$]*\))`, ByGroups(NameClass, Text, NameLabel), Pop(1)},
- {`([a-zA-Z$_][\w$]*)(\s*)(\{)`, ByGroups(NameClass, Text, Punctuation), Push("#pop", "oc_ivars")},
- {`([a-zA-Z$_][\w$]*)`, NameClass, Pop(1)},
- },
- "oc_forward_classname": {
- {`([a-zA-Z$_][\w$]*)(\s*,\s*)`, ByGroups(NameClass, Text), Push("oc_forward_classname")},
- {`([a-zA-Z$_][\w$]*)(\s*;?)`, ByGroups(NameClass, Text), Pop(1)},
- },
- "oc_ivars": {
- Include("whitespace"),
- Include("statements"),
- {`;`, Punctuation, nil},
- {`\{`, Punctuation, Push()},
- {`\}`, Punctuation, Pop(1)},
- },
- "root": {
- {`^([-+])(\s*)(\(.*?\))?(\s*)([a-zA-Z$_][\w$]*:?)`, ByGroups(Punctuation, Text, UsingSelf("root"), Text, NameFunction), Push("method")},
- 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")),
- },
- "method": {
- Include("whitespace"),
- {`,`, Punctuation, nil},
- {`\.\.\.`, Punctuation, nil},
- {`(\(.*?\))(\s*)([a-zA-Z$_][\w$]*)`, ByGroups(UsingSelf("root"), Text, NameVariable), nil},
- {`[a-zA-Z$_][\w$]*:`, NameFunction, nil},
- {`;`, Punctuation, Pop(1)},
- {`\{`, Punctuation, Push("function")},
- Default(Pop(1)),
- },
- "literal_number": {
- {`\(`, Punctuation, Push("literal_number_inner")},
- {`\)`, Literal, Pop(1)},
- Include("statement"),
- },
- "literal_number_inner": {
- {`\(`, Punctuation, Push()},
- {`\)`, Punctuation, Pop(1)},
- Include("statement"),
- },
- "literal_array": {
- {`\[`, Punctuation, Push("literal_array_inner")},
- {`\]`, Literal, Pop(1)},
- Include("statement"),
- },
- "literal_array_inner": {
- {`\[`, Punctuation, Push()},
- {`\]`, Punctuation, Pop(1)},
- Include("statement"),
- },
- "literal_dictionary": {
- {`\}`, Literal, Pop(1)},
- Include("statement"),
- },
- "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.*?(?|\\[<|\\[|\\?\\?|\\?|>\\}|>]|>|=|<-|<|;;|;|:>|:=|::|:|\\.\\.|\\.|->|-\\.|-|,|\\+|\\*|\\)|\\(|&&|&|#|!=)", 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/lexers/o/octave.go b/lexers/o/octave.go
deleted file mode 100644
index 99fe298..0000000
--- a/lexers/o/octave.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package o
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Octave lexer.
-var Octave = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Octave",
- Aliases: []string{"octave"},
- Filenames: []string{"*.m"},
- MimeTypes: []string{"text/octave"},
- },
- octaveRules,
-))
-
-func octaveRules() Rules {
- return 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},
- {`(?=|<=|<>|\+|-|=|>|<|\*|/|%)`, Operator, nil},
- {`(;|,|\)|\(|\.)`, Punctuation, nil},
- {Words(``, `\b`, `истина`, `true`, `ложь`, `false`, `и`, `and`, `или`, `or`, `не`, `not`), Operator, nil},
- {Words(``, `\b`, `если`, `if`, `тогда`, `then`, `иначе`, `else`, `иначеесли`, `elsif`, `конецесли`, `endif`), Operator, nil},
- {Words(``, `\b`, `для`, `for`, `каждого`, `each`, `из`, `in`, `цикл`, `do`, `пока`, `while`, `конеццикла`, `enddo`, `по`, `to`), Operator, nil},
- {Words(``, `\b`, `прервать`, `break`, `продолжить`, `continue`, `возврат`, `return`, `перейти`, `goto`), Operator, nil},
- {Words(``, `\b`, `процедура`, `procedure`, `конецпроцедуры`, `endprocedure`, `функция`, `function`, `конецфункции`, `endfunction`), Keyword, nil},
- {Words(``, `\b`, `новый`, `new`, `знач`, `val`, `экспорт`, `export`, `перем`, `var`), Keyword, nil},
- {Words(``, `\b`, `попытка`, `try`, `исключение`, `except`, `вызватьисключение`, `raise`, `конецпопытки`, `endtry`), Keyword, nil},
- {Words(``, `\b`, `выполнить`, `execute`, `вычислить`, `eval`), Keyword, nil},
- {`"`, LiteralString, Push("string")},
- {`[_а-яА-Я0-9][а-яА-Я0-9]*`, Name, nil},
- {`[_\w][\w]*`, Name, nil},
- },
- "string": {
- {`""`, LiteralString, nil},
- {`"C?`, LiteralString, Pop(1)},
- {`[^"]+`, LiteralString, nil},
- },
- }
-}
diff --git a/lexers/o/openscad.go b/lexers/o/openscad.go
deleted file mode 100644
index d18b9ca..0000000
--- a/lexers/o/openscad.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package o
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-var OpenSCAD = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "OpenSCAD",
- Aliases: []string{"openscad"},
- Filenames: []string{"*.scad"},
- MimeTypes: []string{"text/x-scad"},
- },
- openSCADRules,
-))
-
-func openSCADRules() Rules {
- return Rules{
- "root": {
- {`[^\S\n]+`, Text, nil},
- {`\n`, Text, nil},
- {`//(\n|[\w\W]*?[^\\]\n)`, CommentSingle, nil},
- {`/(\\\n)?[*][\w\W]*?[*](\\\n)?/`, CommentMultiline, nil},
- {`/(\\\n)?[*][\w\W]*`, CommentMultiline, nil},
- {`[{}\[\]\(\),;:]`, Punctuation, nil},
- {`[*!#%\-+=?/]`, Operator, nil},
- {`<|<=|==|!=|>=|>|&&|\|\|`, Operator, nil},
- {`\$(f[asn]|t|vp[rtd]|children)`, NameVariableMagic, nil},
- {Words(``, `\b`, `PI`, `undef`), KeywordConstant, nil},
- {`(use|include)((?:\s|\\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("includes")},
- {`(module)(\s*)([^\s\(]+)`, ByGroups(KeywordNamespace, Text, NameNamespace), nil},
- {`(function)(\s*)([^\s\(]+)`, ByGroups(KeywordDeclaration, Text, NameFunction), nil},
- {`\b(true|false)\b`, Literal, nil},
- {`\b(function|module|include|use|for|intersection_for|if|else|return)\b`, Keyword, nil},
- {`\b(circle|square|polygon|text|sphere|cube|cylinder|polyhedron|translate|rotate|scale|resize|mirror|multmatrix|color|offset|hull|minkowski|union|difference|intersection|abs|sign|sin|cos|tan|acos|asin|atan|atan2|floor|round|ceil|ln|log|pow|sqrt|exp|rands|min|max|concat|lookup|str|chr|search|version|version_num|norm|cross|parent_module|echo|import|import_dxf|dxf_linear_extrude|linear_extrude|rotate_extrude|surface|projection|render|dxf_cross|dxf_dim|let|assign|len)\b`, NameBuiltin, nil},
- {`\bchildren\b`, NameBuiltinPseudo, nil},
- {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil},
- {`-?\d+(\.\d+)?(e[+-]?\d+)?`, Number, nil},
- {`[a-zA-Z_]\w*`, Name, nil},
- },
- "includes": {
- {"(<)([^>]*)(>)", ByGroups(Punctuation, CommentPreprocFile, Punctuation), nil},
- Default(Pop(1)),
- },
- }
-}
diff --git a/lexers/o/openedgeabl.go b/lexers/openedgeabl.go
similarity index 99%
rename from lexers/o/openedgeabl.go
rename to lexers/openedgeabl.go
index 5561971..ea19631 100644
--- a/lexers/o/openedgeabl.go
+++ b/lexers/openedgeabl.go
@@ -1,12 +1,11 @@
-package o
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// OpenedgeAbl lexer.
-var OpenEdgeABL = internal.Register(MustNewLazyLexer(
+var OpenEdgeABL = Register(MustNewLexer(
&Config{
Name: "OpenEdge ABL",
Aliases: []string{"openedge", "abl", "progress", "openedgeabl"},
@@ -23,7 +22,7 @@ var OpenEdgeABL = internal.Register(MustNewLazyLexer(
{`0[xX][0-9a-fA-F]+[LlUu]*`, LiteralNumberHex, nil},
{`(?i)(DEFINE|DEF|DEFI|DEFIN)\b`, KeywordDeclaration, nil},
{`(?i)(^|(?<=[^\w\-]))(CHARACTER|CHAR|CHARA|CHARAC|CHARACT|CHARACTE|COM-HANDLE|DATE|DATETIME|DATETIME-TZ|DECIMAL|DEC|DECI|DECIM|DECIMA|HANDLE|INT64|INTEGER|INT|INTE|INTEG|INTEGE|LOGICAL|LONGCHAR|MEMPTR|RAW|RECID|ROWID)\s*($|(?=[^\w\-]))`, KeywordType, nil},
- {Words(`(?i)(^|(?<=[^\w\-]))`, `\s*($|(?=[^\w\-]))`, `ABS`, `ABSO`, `ABSOL`, `ABSOLU`, `ABSOLUT`, `ABSOLUTE`, `ABSTRACT`, `ACCELERATOR`, `ACCUM`, `ACCUMU`, `ACCUMUL`, `ACCUMULA`, `ACCUMULAT`, `ACCUMULATE`, `ACTIVE-FORM`, `ACTIVE-WINDOW`, `ADD`, `ADD-BUFFER`, `ADD-CALC-COLUMN`, `ADD-COLUMNS-FROM`, `ADD-EVENTS-PROCEDURE`, `ADD-FIELDS-FROM`, `ADD-FIRST`, `ADD-INDEX-FIELD`, `ADD-LAST`, `ADD-LIKE-COLUMN`, `ADD-LIKE-FIELD`, `ADD-LIKE-INDEX`, `ADD-NEW-FIELD`, `ADD-NEW-INDEX`, `ADD-SCHEMA-LOCATION`, `ADD-SUPER-PROCEDURE`, `ADM-DATA`, `ADVISE`, `ALERT-BOX`, `ALIAS`, `ALL`, `ALLOW-COLUMN-SEARCHING`, `ALLOW-REPLICATION`, `ALTER`, `ALWAYS-ON-TOP`, `AMBIG`, `AMBIGU`, `AMBIGUO`, `AMBIGUOU`, `AMBIGUOUS`, `ANALYZ`, `ANALYZE`, `AND`, `ANSI-ONLY`, `ANY`, `ANYWHERE`, `APPEND`, `APPL-ALERT`, `APPL-ALERT-`, `APPL-ALERT-B`, `APPL-ALERT-BO`, `APPL-ALERT-BOX`, `APPL-ALERT-BOXE`, `APPL-ALERT-BOXES`, `APPL-CONTEXT-ID`, `APPLICATION`, `APPLY`, `APPSERVER-INFO`, `APPSERVER-PASSWORD`, `APPSERVER-USERID`, `ARRAY-MESSAGE`, `AS`, `ASC`, `ASCE`, `ASCEN`, `ASCEND`, `ASCENDI`, `ASCENDIN`, `ASCENDING`, `ASK-OVERWRITE`, `ASSEMBLY`, `ASSIGN`, `ASYNC-REQUEST-COUNT`, `ASYNC-REQUEST-HANDLE`, `ASYNCHRONOUS`, `AT`, `ATTACHED-PAIRLIST`, `ATTR`, `ATTR-SPACE`, `ATTRI`, `ATTRIB`, `ATTRIBU`, `ATTRIBUT`, `AUDIT-CONTROL`, `AUDIT-ENABLED`, `AUDIT-EVENT-CONTEXT`, `AUDIT-POLICY`, `AUTHENTICATION-FAILED`, `AUTHORIZATION`, `AUTO-COMP`, `AUTO-COMPL`, `AUTO-COMPLE`, `AUTO-COMPLET`, `AUTO-COMPLETI`, `AUTO-COMPLETIO`, `AUTO-COMPLETION`, `AUTO-END-KEY`, `AUTO-ENDKEY`, `AUTO-GO`, `AUTO-IND`, `AUTO-INDE`, `AUTO-INDEN`, `AUTO-INDENT`, `AUTO-RESIZE`, `AUTO-RET`, `AUTO-RETU`, `AUTO-RETUR`, `AUTO-RETURN`, `AUTO-SYNCHRONIZE`, `AUTO-Z`, `AUTO-ZA`, `AUTO-ZAP`, `AUTOMATIC`, `AVAIL`, `AVAILA`, `AVAILAB`, `AVAILABL`, `AVAILABLE`, `AVAILABLE-FORMATS`, `AVE`, `AVER`, `AVERA`, `AVERAG`, `AVERAGE`, `AVG`, `BACK`, `BACKG`, `BACKGR`, `BACKGRO`, `BACKGROU`, `BACKGROUN`, `BACKGROUND`, `BACKWARD`, `BACKWARDS`, `BASE64-DECODE`, `BASE64-ENCODE`, `BASE-ADE`, `BASE-KEY`, `BATCH`, `BATCH-`, `BATCH-M`, `BATCH-MO`, `BATCH-MOD`, `BATCH-MODE`, `BATCH-SIZE`, `BEFORE-H`, `BEFORE-HI`, `BEFORE-HID`, `BEFORE-HIDE`, `BEGIN-EVENT-GROUP`, `BEGINS`, `BELL`, `BETWEEN`, `BGC`, `BGCO`, `BGCOL`, `BGCOLO`, `BGCOLOR`, `BIG-ENDIAN`, `BINARY`, `BIND`, `BIND-WHERE`, `BLANK`, `BLOCK-ITERATION-DISPLAY`, `BLOCK-LEVEL`, `BORDER-B`, `BORDER-BO`, `BORDER-BOT`, `BORDER-BOTT`, `BORDER-BOTTO`, `BORDER-BOTTOM-CHARS`, `BORDER-BOTTOM-P`, `BORDER-BOTTOM-PI`, `BORDER-BOTTOM-PIX`, `BORDER-BOTTOM-PIXE`, `BORDER-BOTTOM-PIXEL`, `BORDER-BOTTOM-PIXELS`, `BORDER-L`, `BORDER-LE`, `BORDER-LEF`, `BORDER-LEFT`, `BORDER-LEFT-`, `BORDER-LEFT-C`, `BORDER-LEFT-CH`, `BORDER-LEFT-CHA`, `BORDER-LEFT-CHAR`, `BORDER-LEFT-CHARS`, `BORDER-LEFT-P`, `BORDER-LEFT-PI`, `BORDER-LEFT-PIX`, `BORDER-LEFT-PIXE`, `BORDER-LEFT-PIXEL`, `BORDER-LEFT-PIXELS`, `BORDER-R`, `BORDER-RI`, `BORDER-RIG`, `BORDER-RIGH`, `BORDER-RIGHT`, `BORDER-RIGHT-`, `BORDER-RIGHT-C`, `BORDER-RIGHT-CH`, `BORDER-RIGHT-CHA`, `BORDER-RIGHT-CHAR`, `BORDER-RIGHT-CHARS`, `BORDER-RIGHT-P`, `BORDER-RIGHT-PI`, `BORDER-RIGHT-PIX`, `BORDER-RIGHT-PIXE`, `BORDER-RIGHT-PIXEL`, `BORDER-RIGHT-PIXELS`, `BORDER-T`, `BORDER-TO`, `BORDER-TOP`, `BORDER-TOP-`, `BORDER-TOP-C`, `BORDER-TOP-CH`, `BORDER-TOP-CHA`, `BORDER-TOP-CHAR`, `BORDER-TOP-CHARS`, `BORDER-TOP-P`, `BORDER-TOP-PI`, `BORDER-TOP-PIX`, `BORDER-TOP-PIXE`, `BORDER-TOP-PIXEL`, `BORDER-TOP-PIXELS`, `BOX`, `BOX-SELECT`, `BOX-SELECTA`, `BOX-SELECTAB`, `BOX-SELECTABL`, `BOX-SELECTABLE`, `BREAK`, `BROWSE`, `BUFFER`, `BUFFER-CHARS`, `BUFFER-COMPARE`, `BUFFER-COPY`, `BUFFER-CREATE`, `BUFFER-DELETE`, `BUFFER-FIELD`, `BUFFER-HANDLE`, `BUFFER-LINES`, `BUFFER-NAME`, `BUFFER-PARTITION-ID`, `BUFFER-RELEASE`, `BUFFER-VALUE`, `BUTTON`, `BUTTONS`, `BY`, `BY-POINTER`, `BY-VARIANT-POINTER`, `CACHE`, `CACHE-SIZE`, `CALL`, `CALL-NAME`, `CALL-TYPE`, `CAN-CREATE`, `CAN-DELETE`, `CAN-DO`, `CAN-DO-DOMAIN-SUPPORT`, `CAN-FIND`, `CAN-QUERY`, `CAN-READ`, `CAN-SET`, `CAN-WRITE`, `CANCEL-BREAK`, `CANCEL-BUTTON`, `CAPS`, `CAREFUL-PAINT`, `CASE`, `CASE-SEN`, `CASE-SENS`, `CASE-SENSI`, `CASE-SENSIT`, `CASE-SENSITI`, `CASE-SENSITIV`, `CASE-SENSITIVE`, `CAST`, `CATCH`, `CDECL`, `CENTER`, `CENTERE`, `CENTERED`, `CHAINED`, `CHARACTER`, `CHARACTER_LENGTH`, `CHARSET`, `CHECK`, `CHECKED`, `CHOOSE`, `CHR`, `CLASS`, `CLASS-TYPE`, `CLEAR`, `CLEAR-APPL-CONTEXT`, `CLEAR-LOG`, `CLEAR-SELECT`, `CLEAR-SELECTI`, `CLEAR-SELECTIO`, `CLEAR-SELECTION`, `CLEAR-SORT-ARROW`, `CLEAR-SORT-ARROWS`, `CLIENT-CONNECTION-ID`, `CLIENT-PRINCIPAL`, `CLIENT-TTY`, `CLIENT-TYPE`, `CLIENT-WORKSTATION`, `CLIPBOARD`, `CLOSE`, `CLOSE-LOG`, `CODE`, `CODEBASE-LOCATOR`, `CODEPAGE`, `CODEPAGE-CONVERT`, `COL`, `COL-OF`, `COLLATE`, `COLON`, `COLON-ALIGN`, `COLON-ALIGNE`, `COLON-ALIGNED`, `COLOR`, `COLOR-TABLE`, `COLU`, `COLUM`, `COLUMN`, `COLUMN-BGCOLOR`, `COLUMN-DCOLOR`, `COLUMN-FGCOLOR`, `COLUMN-FONT`, `COLUMN-LAB`, `COLUMN-LABE`, `COLUMN-LABEL`, `COLUMN-MOVABLE`, `COLUMN-OF`, `COLUMN-PFCOLOR`, `COLUMN-READ-ONLY`, `COLUMN-RESIZABLE`, `COLUMN-SCROLLING`, `COLUMNS`, `COM-HANDLE`, `COM-SELF`, `COMBO-BOX`, `COMMAND`, `COMPARES`, `COMPILE`, `COMPILER`, `COMPLETE`, `CONFIG-NAME`, `CONNECT`, `CONNECTED`, `CONSTRUCTOR`, `CONTAINS`, `CONTENTS`, `CONTEXT`, `CONTEXT-HELP`, `CONTEXT-HELP-FILE`, `CONTEXT-HELP-ID`, `CONTEXT-POPUP`, `CONTROL`, `CONTROL-BOX`, `CONTROL-FRAME`, `CONVERT`, `CONVERT-3D-COLORS`, `CONVERT-TO-OFFS`, `CONVERT-TO-OFFSE`, `CONVERT-TO-OFFSET`, `COPY-DATASET`, `COPY-LOB`, `COPY-SAX-ATTRIBUTES`, `COPY-TEMP-TABLE`, `COUNT`, `COUNT-OF`, `CPCASE`, `CPCOLL`, `CPINTERNAL`, `CPLOG`, `CPPRINT`, `CPRCODEIN`, `CPRCODEOUT`, `CPSTREAM`, `CPTERM`, `CRC-VALUE`, `CREATE`, `CREATE-LIKE`, `CREATE-LIKE-SEQUENTIAL`, `CREATE-NODE-NAMESPACE`, `CREATE-RESULT-LIST-ENTRY`, `CREATE-TEST-FILE`, `CURRENT`, `CURRENT-CHANGED`, `CURRENT-COLUMN`, `CURRENT-ENV`, `CURRENT-ENVI`, `CURRENT-ENVIR`, `CURRENT-ENVIRO`, `CURRENT-ENVIRON`, `CURRENT-ENVIRONM`, `CURRENT-ENVIRONME`, `CURRENT-ENVIRONMEN`, `CURRENT-ENVIRONMENT`, `CURRENT-ITERATION`, `CURRENT-LANG`, `CURRENT-LANGU`, `CURRENT-LANGUA`, `CURRENT-LANGUAG`, `CURRENT-LANGUAGE`, `CURRENT-QUERY`, `CURRENT-REQUEST-INFO`, `CURRENT-RESPONSE-INFO`, `CURRENT-RESULT-ROW`, `CURRENT-ROW-MODIFIED`, `CURRENT-VALUE`, `CURRENT-WINDOW`, `CURRENT_DATE`, `CURS`, `CURSO`, `CURSOR`, `CURSOR-CHAR`, `CURSOR-LINE`, `CURSOR-OFFSET`, `DATA-BIND`, `DATA-ENTRY-RET`, `DATA-ENTRY-RETU`, `DATA-ENTRY-RETUR`, `DATA-ENTRY-RETURN`, `DATA-REL`, `DATA-RELA`, `DATA-RELAT`, `DATA-RELATI`, `DATA-RELATIO`, `DATA-RELATION`, `DATA-SOURCE`, `DATA-SOURCE-COMPLETE-MAP`, `DATA-SOURCE-MODIFIED`, `DATA-SOURCE-ROWID`, `DATA-T`, `DATA-TY`, `DATA-TYP`, `DATA-TYPE`, `DATABASE`, `DATASERVERS`, `DATASET`, `DATASET-HANDLE`, `DATE`, `DATE-F`, `DATE-FO`, `DATE-FOR`, `DATE-FORM`, `DATE-FORMA`, `DATE-FORMAT`, `DAY`, `DB-CONTEXT`, `DB-REFERENCES`, `DBCODEPAGE`, `DBCOLLATION`, `DBNAME`, `DBPARAM`, `DBREST`, `DBRESTR`, `DBRESTRI`, `DBRESTRIC`, `DBRESTRICT`, `DBRESTRICTI`, `DBRESTRICTIO`, `DBRESTRICTION`, `DBRESTRICTIONS`, `DBTASKID`, `DBTYPE`, `DBVERS`, `DBVERSI`, `DBVERSIO`, `DBVERSION`, `DCOLOR`, `DDE`, `DDE-ERROR`, `DDE-I`, `DDE-ID`, `DDE-ITEM`, `DDE-NAME`, `DDE-TOPIC`, `DEBLANK`, `DEBU`, `DEBUG`, `DEBUG-ALERT`, `DEBUG-LIST`, `DEBUGGER`, `DECIMAL`, `DECIMALS`, `DECLARE`, `DECLARE-NAMESPACE`, `DECRYPT`, `DEFAULT`, `DEFAULT-B`, `DEFAULT-BU`, `DEFAULT-BUFFER-HANDLE`, `DEFAULT-BUT`, `DEFAULT-BUTT`, `DEFAULT-BUTTO`, `DEFAULT-BUTTON`, `DEFAULT-COMMIT`, `DEFAULT-EX`, `DEFAULT-EXT`, `DEFAULT-EXTE`, `DEFAULT-EXTEN`, `DEFAULT-EXTENS`, `DEFAULT-EXTENSI`, `DEFAULT-EXTENSIO`, `DEFAULT-EXTENSION`, `DEFAULT-NOXL`, `DEFAULT-NOXLA`, `DEFAULT-NOXLAT`, `DEFAULT-NOXLATE`, `DEFAULT-VALUE`, `DEFAULT-WINDOW`, `DEFINE`, `DEFINE-USER-EVENT-MANAGER`, `DEFINED`, `DEL`, `DELE`, `DELEGATE`, `DELET`, `DELETE PROCEDURE`, `DELETE`, `DELETE-CHAR`, `DELETE-CHARA`, `DELETE-CHARAC`, `DELETE-CHARACT`, `DELETE-CHARACTE`, `DELETE-CHARACTER`, `DELETE-CURRENT-ROW`, `DELETE-LINE`, `DELETE-RESULT-LIST-ENTRY`, `DELETE-SELECTED-ROW`, `DELETE-SELECTED-ROWS`, `DELIMITER`, `DESC`, `DESCE`, `DESCEN`, `DESCEND`, `DESCENDI`, `DESCENDIN`, `DESCENDING`, `DESELECT-FOCUSED-ROW`, `DESELECT-ROWS`, `DESELECT-SELECTED-ROW`, `DESELECTION`, `DESTRUCTOR`, `DIALOG-BOX`, `DICT`, `DICTI`, `DICTIO`, `DICTION`, `DICTIONA`, `DICTIONAR`, `DICTIONARY`, `DIR`, `DISABLE`, `DISABLE-AUTO-ZAP`, `DISABLE-DUMP-TRIGGERS`, `DISABLE-LOAD-TRIGGERS`, `DISABLED`, `DISCON`, `DISCONN`, `DISCONNE`, `DISCONNEC`, `DISCONNECT`, `DISP`, `DISPL`, `DISPLA`, `DISPLAY`, `DISPLAY-MESSAGE`, `DISPLAY-T`, `DISPLAY-TY`, `DISPLAY-TYP`, `DISPLAY-TYPE`, `DISTINCT`, `DO`, `DOMAIN-DESCRIPTION`, `DOMAIN-NAME`, `DOMAIN-TYPE`, `DOS`, `DOUBLE`, `DOWN`, `DRAG-ENABLED`, `DROP`, `DROP-DOWN`, `DROP-DOWN-LIST`, `DROP-FILE-NOTIFY`, `DROP-TARGET`, `DS-CLOSE-CURSOR`, `DSLOG-MANAGER`, `DUMP`, `DYNAMIC`, `DYNAMIC-ENUM`, `DYNAMIC-FUNCTION`, `DYNAMIC-INVOKE`, `EACH`, `ECHO`, `EDGE`, `EDGE-`, `EDGE-C`, `EDGE-CH`, `EDGE-CHA`, `EDGE-CHAR`, `EDGE-CHARS`, `EDGE-P`, `EDGE-PI`, `EDGE-PIX`, `EDGE-PIXE`, `EDGE-PIXEL`, `EDGE-PIXELS`, `EDIT-CAN-PASTE`, `EDIT-CAN-UNDO`, `EDIT-CLEAR`, `EDIT-COPY`, `EDIT-CUT`, `EDIT-PASTE`, `EDIT-UNDO`, `EDITING`, `EDITOR`, `ELSE`, `EMPTY`, `EMPTY-TEMP-TABLE`, `ENABLE`, `ENABLED-FIELDS`, `ENCODE`, `ENCRYPT`, `ENCRYPT-AUDIT-MAC-KEY`, `ENCRYPTION-SALT`, `END`, `END-DOCUMENT`, `END-ELEMENT`, `END-EVENT-GROUP`, `END-FILE-DROP`, `END-KEY`, `END-MOVE`, `END-RESIZE`, `END-ROW-RESIZE`, `END-USER-PROMPT`, `ENDKEY`, `ENTERED`, `ENTITY-EXPANSION-LIMIT`, `ENTRY`, `ENUM`, `EQ`, `ERROR`, `ERROR-COL`, `ERROR-COLU`, `ERROR-COLUM`, `ERROR-COLUMN`, `ERROR-ROW`, `ERROR-STACK-TRACE`, `ERROR-STAT`, `ERROR-STATU`, `ERROR-STATUS`, `ESCAPE`, `ETIME`, `EVENT`, `EVENT-GROUP-ID`, `EVENT-PROCEDURE`, `EVENT-PROCEDURE-CONTEXT`, `EVENT-T`, `EVENT-TY`, `EVENT-TYP`, `EVENT-TYPE`, `EVENTS`, `EXCEPT`, `EXCLUSIVE`, `EXCLUSIVE-`, `EXCLUSIVE-ID`, `EXCLUSIVE-L`, `EXCLUSIVE-LO`, `EXCLUSIVE-LOC`, `EXCLUSIVE-LOCK`, `EXCLUSIVE-WEB-USER`, `EXECUTE`, `EXISTS`, `EXP`, `EXPAND`, `EXPANDABLE`, `EXPLICIT`, `EXPORT`, `EXPORT-PRINCIPAL`, `EXTENDED`, `EXTENT`, `EXTERNAL`, `FALSE`, `FETCH`, `FETCH-SELECTED-ROW`, `FGC`, `FGCO`, `FGCOL`, `FGCOLO`, `FGCOLOR`, `FIELD`, `FIELDS`, `FILE`, `FILE-CREATE-DATE`, `FILE-CREATE-TIME`, `FILE-INFO`, `FILE-INFOR`, `FILE-INFORM`, `FILE-INFORMA`, `FILE-INFORMAT`, `FILE-INFORMATI`, `FILE-INFORMATIO`, `FILE-INFORMATION`, `FILE-MOD-DATE`, `FILE-MOD-TIME`, `FILE-NAME`, `FILE-OFF`, `FILE-OFFS`, `FILE-OFFSE`, `FILE-OFFSET`, `FILE-SIZE`, `FILE-TYPE`, `FILENAME`, `FILL`, `FILL-IN`, `FILLED`, `FILTERS`, `FINAL`, `FINALLY`, `FIND`, `FIND-BY-ROWID`, `FIND-CASE-SENSITIVE`, `FIND-CURRENT`, `FIND-FIRST`, `FIND-GLOBAL`, `FIND-LAST`, `FIND-NEXT-OCCURRENCE`, `FIND-PREV-OCCURRENCE`, `FIND-SELECT`, `FIND-UNIQUE`, `FIND-WRAP-AROUND`, `FINDER`, `FIRST`, `FIRST-ASYNCH-REQUEST`, `FIRST-CHILD`, `FIRST-COLUMN`, `FIRST-FORM`, `FIRST-OBJECT`, `FIRST-OF`, `FIRST-PROC`, `FIRST-PROCE`, `FIRST-PROCED`, `FIRST-PROCEDU`, `FIRST-PROCEDUR`, `FIRST-PROCEDURE`, `FIRST-SERVER`, `FIRST-TAB-I`, `FIRST-TAB-IT`, `FIRST-TAB-ITE`, `FIRST-TAB-ITEM`, `FIT-LAST-COLUMN`, `FIXED-ONLY`, `FLAT-BUTTON`, `FLOAT`, `FOCUS`, `FOCUSED-ROW`, `FOCUSED-ROW-SELECTED`, `FONT`, `FONT-TABLE`, `FOR`, `FORCE-FILE`, `FORE`, `FOREG`, `FOREGR`, `FOREGRO`, `FOREGROU`, `FOREGROUN`, `FOREGROUND`, `FORM INPUT`, `FORM`, `FORM-LONG-INPUT`, `FORMA`, `FORMAT`, `FORMATTE`, `FORMATTED`, `FORWARD`, `FORWARDS`, `FRAGMEN`, `FRAGMENT`, `FRAM`, `FRAME`, `FRAME-COL`, `FRAME-DB`, `FRAME-DOWN`, `FRAME-FIELD`, `FRAME-FILE`, `FRAME-INDE`, `FRAME-INDEX`, `FRAME-LINE`, `FRAME-NAME`, `FRAME-ROW`, `FRAME-SPA`, `FRAME-SPAC`, `FRAME-SPACI`, `FRAME-SPACIN`, `FRAME-SPACING`, `FRAME-VAL`, `FRAME-VALU`, `FRAME-VALUE`, `FRAME-X`, `FRAME-Y`, `FREQUENCY`, `FROM`, `FROM-C`, `FROM-CH`, `FROM-CHA`, `FROM-CHAR`, `FROM-CHARS`, `FROM-CUR`, `FROM-CURR`, `FROM-CURRE`, `FROM-CURREN`, `FROM-CURRENT`, `FROM-P`, `FROM-PI`, `FROM-PIX`, `FROM-PIXE`, `FROM-PIXEL`, `FROM-PIXELS`, `FULL-HEIGHT`, `FULL-HEIGHT-`, `FULL-HEIGHT-C`, `FULL-HEIGHT-CH`, `FULL-HEIGHT-CHA`, `FULL-HEIGHT-CHAR`, `FULL-HEIGHT-CHARS`, `FULL-HEIGHT-P`, `FULL-HEIGHT-PI`, `FULL-HEIGHT-PIX`, `FULL-HEIGHT-PIXE`, `FULL-HEIGHT-PIXEL`, `FULL-HEIGHT-PIXELS`, `FULL-PATHN`, `FULL-PATHNA`, `FULL-PATHNAM`, `FULL-PATHNAME`, `FULL-WIDTH`, `FULL-WIDTH-`, `FULL-WIDTH-C`, `FULL-WIDTH-CH`, `FULL-WIDTH-CHA`, `FULL-WIDTH-CHAR`, `FULL-WIDTH-CHARS`, `FULL-WIDTH-P`, `FULL-WIDTH-PI`, `FULL-WIDTH-PIX`, `FULL-WIDTH-PIXE`, `FULL-WIDTH-PIXEL`, `FULL-WIDTH-PIXELS`, `FUNCTION`, `FUNCTION-CALL-TYPE`, `GATEWAY`, `GATEWAYS`, `GE`, `GENERATE-MD5`, `GENERATE-PBE-KEY`, `GENERATE-PBE-SALT`, `GENERATE-RANDOM-KEY`, `GENERATE-UUID`, `GET`, `GET-ATTR-CALL-TYPE`, `GET-ATTRIBUTE-NODE`, `GET-BINARY-DATA`, `GET-BLUE`, `GET-BLUE-`, `GET-BLUE-V`, `GET-BLUE-VA`, `GET-BLUE-VAL`, `GET-BLUE-VALU`, `GET-BLUE-VALUE`, `GET-BROWSE-COLUMN`, `GET-BUFFER-HANDLE`, `GET-BYTE`, `GET-CALLBACK-PROC-CONTEXT`, `GET-CALLBACK-PROC-NAME`, `GET-CGI-LIST`, `GET-CGI-LONG-VALUE`, `GET-CGI-VALUE`, `GET-CLASS`, `GET-CODEPAGES`, `GET-COLLATIONS`, `GET-CONFIG-VALUE`, `GET-CURRENT`, `GET-DOUBLE`, `GET-DROPPED-FILE`, `GET-DYNAMIC`, `GET-ERROR-COLUMN`, `GET-ERROR-ROW`, `GET-FILE`, `GET-FILE-NAME`, `GET-FILE-OFFSE`, `GET-FILE-OFFSET`, `GET-FIRST`, `GET-FLOAT`, `GET-GREEN`, `GET-GREEN-`, `GET-GREEN-V`, `GET-GREEN-VA`, `GET-GREEN-VAL`, `GET-GREEN-VALU`, `GET-GREEN-VALUE`, `GET-INDEX-BY-NAMESPACE-NAME`, `GET-INDEX-BY-QNAME`, `GET-INT64`, `GET-ITERATION`, `GET-KEY-VAL`, `GET-KEY-VALU`, `GET-KEY-VALUE`, `GET-LAST`, `GET-LOCALNAME-BY-INDEX`, `GET-LONG`, `GET-MESSAGE`, `GET-NEXT`, `GET-NUMBER`, `GET-POINTER-VALUE`, `GET-PREV`, `GET-PRINTERS`, `GET-PROPERTY`, `GET-QNAME-BY-INDEX`, `GET-RED`, `GET-RED-`, `GET-RED-V`, `GET-RED-VA`, `GET-RED-VAL`, `GET-RED-VALU`, `GET-RED-VALUE`, `GET-REPOSITIONED-ROW`, `GET-RGB-VALUE`, `GET-SELECTED`, `GET-SELECTED-`, `GET-SELECTED-W`, `GET-SELECTED-WI`, `GET-SELECTED-WID`, `GET-SELECTED-WIDG`, `GET-SELECTED-WIDGE`, `GET-SELECTED-WIDGET`, `GET-SHORT`, `GET-SIGNATURE`, `GET-SIZE`, `GET-STRING`, `GET-TAB-ITEM`, `GET-TEXT-HEIGHT`, `GET-TEXT-HEIGHT-`, `GET-TEXT-HEIGHT-C`, `GET-TEXT-HEIGHT-CH`, `GET-TEXT-HEIGHT-CHA`, `GET-TEXT-HEIGHT-CHAR`, `GET-TEXT-HEIGHT-CHARS`, `GET-TEXT-HEIGHT-P`, `GET-TEXT-HEIGHT-PI`, `GET-TEXT-HEIGHT-PIX`, `GET-TEXT-HEIGHT-PIXE`, `GET-TEXT-HEIGHT-PIXEL`, `GET-TEXT-HEIGHT-PIXELS`, `GET-TEXT-WIDTH`, `GET-TEXT-WIDTH-`, `GET-TEXT-WIDTH-C`, `GET-TEXT-WIDTH-CH`, `GET-TEXT-WIDTH-CHA`, `GET-TEXT-WIDTH-CHAR`, `GET-TEXT-WIDTH-CHARS`, `GET-TEXT-WIDTH-P`, `GET-TEXT-WIDTH-PI`, `GET-TEXT-WIDTH-PIX`, `GET-TEXT-WIDTH-PIXE`, `GET-TEXT-WIDTH-PIXEL`, `GET-TEXT-WIDTH-PIXELS`, `GET-TYPE-BY-INDEX`, `GET-TYPE-BY-NAMESPACE-NAME`, `GET-TYPE-BY-QNAME`, `GET-UNSIGNED-LONG`, `GET-UNSIGNED-SHORT`, `GET-URI-BY-INDEX`, `GET-VALUE-BY-INDEX`, `GET-VALUE-BY-NAMESPACE-NAME`, `GET-VALUE-BY-QNAME`, `GET-WAIT-STATE`, `GETBYTE`, `GLOBAL`, `GO-ON`, `GO-PEND`, `GO-PENDI`, `GO-PENDIN`, `GO-PENDING`, `GRANT`, `GRAPHIC-E`, `GRAPHIC-ED`, `GRAPHIC-EDG`, `GRAPHIC-EDGE`, `GRID-FACTOR-H`, `GRID-FACTOR-HO`, `GRID-FACTOR-HOR`, `GRID-FACTOR-HORI`, `GRID-FACTOR-HORIZ`, `GRID-FACTOR-HORIZO`, `GRID-FACTOR-HORIZON`, `GRID-FACTOR-HORIZONT`, `GRID-FACTOR-HORIZONTA`, `GRID-FACTOR-HORIZONTAL`, `GRID-FACTOR-V`, `GRID-FACTOR-VE`, `GRID-FACTOR-VER`, `GRID-FACTOR-VERT`, `GRID-FACTOR-VERTI`, `GRID-FACTOR-VERTIC`, `GRID-FACTOR-VERTICA`, `GRID-FACTOR-VERTICAL`, `GRID-SNAP`, `GRID-UNIT-HEIGHT`, `GRID-UNIT-HEIGHT-`, `GRID-UNIT-HEIGHT-C`, `GRID-UNIT-HEIGHT-CH`, `GRID-UNIT-HEIGHT-CHA`, `GRID-UNIT-HEIGHT-CHARS`, `GRID-UNIT-HEIGHT-P`, `GRID-UNIT-HEIGHT-PI`, `GRID-UNIT-HEIGHT-PIX`, `GRID-UNIT-HEIGHT-PIXE`, `GRID-UNIT-HEIGHT-PIXEL`, `GRID-UNIT-HEIGHT-PIXELS`, `GRID-UNIT-WIDTH`, `GRID-UNIT-WIDTH-`, `GRID-UNIT-WIDTH-C`, `GRID-UNIT-WIDTH-CH`, `GRID-UNIT-WIDTH-CHA`, `GRID-UNIT-WIDTH-CHAR`, `GRID-UNIT-WIDTH-CHARS`, `GRID-UNIT-WIDTH-P`, `GRID-UNIT-WIDTH-PI`, `GRID-UNIT-WIDTH-PIX`, `GRID-UNIT-WIDTH-PIXE`, `GRID-UNIT-WIDTH-PIXEL`, `GRID-UNIT-WIDTH-PIXELS`, `GRID-VISIBLE`, `GROUP`, `GT`, `GUID`, `HANDLE`, `HANDLER`, `HAS-RECORDS`, `HAVING`, `HEADER`, `HEIGHT`, `HEIGHT-`, `HEIGHT-C`, `HEIGHT-CH`, `HEIGHT-CHA`, `HEIGHT-CHAR`, `HEIGHT-CHARS`, `HEIGHT-P`, `HEIGHT-PI`, `HEIGHT-PIX`, `HEIGHT-PIXE`, `HEIGHT-PIXEL`, `HEIGHT-PIXELS`, `HELP`, `HEX-DECODE`, `HEX-ENCODE`, `HIDDEN`, `HIDE`, `HORI`, `HORIZ`, `HORIZO`, `HORIZON`, `HORIZONT`, `HORIZONTA`, `HORIZONTAL`, `HOST-BYTE-ORDER`, `HTML-CHARSET`, `HTML-END-OF-LINE`, `HTML-END-OF-PAGE`, `HTML-FRAME-BEGIN`, `HTML-FRAME-END`, `HTML-HEADER-BEGIN`, `HTML-HEADER-END`, `HTML-TITLE-BEGIN`, `HTML-TITLE-END`, `HWND`, `ICON`, `IF`, `IMAGE`, `IMAGE-DOWN`, `IMAGE-INSENSITIVE`, `IMAGE-SIZE`, `IMAGE-SIZE-C`, `IMAGE-SIZE-CH`, `IMAGE-SIZE-CHA`, `IMAGE-SIZE-CHAR`, `IMAGE-SIZE-CHARS`, `IMAGE-SIZE-P`, `IMAGE-SIZE-PI`, `IMAGE-SIZE-PIX`, `IMAGE-SIZE-PIXE`, `IMAGE-SIZE-PIXEL`, `IMAGE-SIZE-PIXELS`, `IMAGE-UP`, `IMMEDIATE-DISPLAY`, `IMPLEMENTS`, `IMPORT`, `IMPORT-PRINCIPAL`, `IN`, `IN-HANDLE`, `INCREMENT-EXCLUSIVE-ID`, `INDEX`, `INDEX-HINT`, `INDEX-INFORMATION`, `INDEXED-REPOSITION`, `INDICATOR`, `INFO`, `INFOR`, `INFORM`, `INFORMA`, `INFORMAT`, `INFORMATI`, `INFORMATIO`, `INFORMATION`, `INHERIT-BGC`, `INHERIT-BGCO`, `INHERIT-BGCOL`, `INHERIT-BGCOLO`, `INHERIT-BGCOLOR`, `INHERIT-FGC`, `INHERIT-FGCO`, `INHERIT-FGCOL`, `INHERIT-FGCOLO`, `INHERIT-FGCOLOR`, `INHERITS`, `INIT`, `INITI`, `INITIA`, `INITIAL`, `INITIAL-DIR`, `INITIAL-FILTER`, `INITIALIZE-DOCUMENT-TYPE`, `INITIATE`, `INNER-CHARS`, `INNER-LINES`, `INPUT`, `INPUT-O`, `INPUT-OU`, `INPUT-OUT`, `INPUT-OUTP`, `INPUT-OUTPU`, `INPUT-OUTPUT`, `INPUT-VALUE`, `INSERT`, `INSERT-ATTRIBUTE`, `INSERT-B`, `INSERT-BA`, `INSERT-BAC`, `INSERT-BACK`, `INSERT-BACKT`, `INSERT-BACKTA`, `INSERT-BACKTAB`, `INSERT-FILE`, `INSERT-ROW`, `INSERT-STRING`, `INSERT-T`, `INSERT-TA`, `INSERT-TAB`, `INT64`, `INT`, `INTEGER`, `INTERFACE`, `INTERNAL-ENTRIES`, `INTO`, `INVOKE`, `IS`, `IS-ATTR`, `IS-ATTR-`, `IS-ATTR-S`, `IS-ATTR-SP`, `IS-ATTR-SPA`, `IS-ATTR-SPAC`, `IS-ATTR-SPACE`, `IS-CLASS`, `IS-JSON`, `IS-LEAD-BYTE`, `IS-OPEN`, `IS-PARAMETER-SET`, `IS-PARTITIONED`, `IS-ROW-SELECTED`, `IS-SELECTED`, `IS-XML`, `ITEM`, `ITEMS-PER-ROW`, `JOIN`, `JOIN-BY-SQLDB`, `KBLABEL`, `KEEP-CONNECTION-OPEN`, `KEEP-FRAME-Z`, `KEEP-FRAME-Z-`, `KEEP-FRAME-Z-O`, `KEEP-FRAME-Z-OR`, `KEEP-FRAME-Z-ORD`, `KEEP-FRAME-Z-ORDE`, `KEEP-FRAME-Z-ORDER`, `KEEP-MESSAGES`, `KEEP-SECURITY-CACHE`, `KEEP-TAB-ORDER`, `KEY`, `KEY-CODE`, `KEY-FUNC`, `KEY-FUNCT`, `KEY-FUNCTI`, `KEY-FUNCTIO`, `KEY-FUNCTION`, `KEY-LABEL`, `KEYCODE`, `KEYFUNC`, `KEYFUNCT`, `KEYFUNCTI`, `KEYFUNCTIO`, `KEYFUNCTION`, `KEYLABEL`, `KEYS`, `KEYWORD`, `KEYWORD-ALL`, `LABEL`, `LABEL-BGC`, `LABEL-BGCO`, `LABEL-BGCOL`, `LABEL-BGCOLO`, `LABEL-BGCOLOR`, `LABEL-DC`, `LABEL-DCO`, `LABEL-DCOL`, `LABEL-DCOLO`, `LABEL-DCOLOR`, `LABEL-FGC`, `LABEL-FGCO`, `LABEL-FGCOL`, `LABEL-FGCOLO`, `LABEL-FGCOLOR`, `LABEL-FONT`, `LABEL-PFC`, `LABEL-PFCO`, `LABEL-PFCOL`, `LABEL-PFCOLO`, `LABEL-PFCOLOR`, `LABELS`, `LABELS-HAVE-COLONS`, `LANDSCAPE`, `LANGUAGE`, `LANGUAGES`, `LARGE`, `LARGE-TO-SMALL`, `LAST`, `LAST-ASYNCH-REQUEST`, `LAST-BATCH`, `LAST-CHILD`, `LAST-EVEN`, `LAST-EVENT`, `LAST-FORM`, `LAST-KEY`, `LAST-OBJECT`, `LAST-OF`, `LAST-PROCE`, `LAST-PROCED`, `LAST-PROCEDU`, `LAST-PROCEDUR`, `LAST-PROCEDURE`, `LAST-SERVER`, `LAST-TAB-I`, `LAST-TAB-IT`, `LAST-TAB-ITE`, `LAST-TAB-ITEM`, `LASTKEY`, `LC`, `LDBNAME`, `LE`, `LEAVE`, `LEFT-ALIGN`, `LEFT-ALIGNE`, `LEFT-ALIGNED`, `LEFT-TRIM`, `LENGTH`, `LIBRARY`, `LIKE`, `LIKE-SEQUENTIAL`, `LINE`, `LINE-COUNT`, `LINE-COUNTE`, `LINE-COUNTER`, `LIST-EVENTS`, `LIST-ITEM-PAIRS`, `LIST-ITEMS`, `LIST-PROPERTY-NAMES`, `LIST-QUERY-ATTRS`, `LIST-SET-ATTRS`, `LIST-WIDGETS`, `LISTI`, `LISTIN`, `LISTING`, `LITERAL-QUESTION`, `LITTLE-ENDIAN`, `LOAD`, `LOAD-DOMAINS`, `LOAD-ICON`, `LOAD-IMAGE`, `LOAD-IMAGE-DOWN`, `LOAD-IMAGE-INSENSITIVE`, `LOAD-IMAGE-UP`, `LOAD-MOUSE-P`, `LOAD-MOUSE-PO`, `LOAD-MOUSE-POI`, `LOAD-MOUSE-POIN`, `LOAD-MOUSE-POINT`, `LOAD-MOUSE-POINTE`, `LOAD-MOUSE-POINTER`, `LOAD-PICTURE`, `LOAD-SMALL-ICON`, `LOCAL-NAME`, `LOCAL-VERSION-INFO`, `LOCATOR-COLUMN-NUMBER`, `LOCATOR-LINE-NUMBER`, `LOCATOR-PUBLIC-ID`, `LOCATOR-SYSTEM-ID`, `LOCATOR-TYPE`, `LOCK-REGISTRATION`, `LOCKED`, `LOG`, `LOG-AUDIT-EVENT`, `LOG-MANAGER`, `LOGICAL`, `LOGIN-EXPIRATION-TIMESTAMP`, `LOGIN-HOST`, `LOGIN-STATE`, `LOGOUT`, `LONGCHAR`, `LOOKAHEAD`, `LOOKUP`, `LT`, `MACHINE-CLASS`, `MANDATORY`, `MANUAL-HIGHLIGHT`, `MAP`, `MARGIN-EXTRA`, `MARGIN-HEIGHT`, `MARGIN-HEIGHT-`, `MARGIN-HEIGHT-C`, `MARGIN-HEIGHT-CH`, `MARGIN-HEIGHT-CHA`, `MARGIN-HEIGHT-CHAR`, `MARGIN-HEIGHT-CHARS`, `MARGIN-HEIGHT-P`, `MARGIN-HEIGHT-PI`, `MARGIN-HEIGHT-PIX`, `MARGIN-HEIGHT-PIXE`, `MARGIN-HEIGHT-PIXEL`, `MARGIN-HEIGHT-PIXELS`, `MARGIN-WIDTH`, `MARGIN-WIDTH-`, `MARGIN-WIDTH-C`, `MARGIN-WIDTH-CH`, `MARGIN-WIDTH-CHA`, `MARGIN-WIDTH-CHAR`, `MARGIN-WIDTH-CHARS`, `MARGIN-WIDTH-P`, `MARGIN-WIDTH-PI`, `MARGIN-WIDTH-PIX`, `MARGIN-WIDTH-PIXE`, `MARGIN-WIDTH-PIXEL`, `MARGIN-WIDTH-PIXELS`, `MARK-NEW`, `MARK-ROW-STATE`, `MATCHES`, `MAX`, `MAX-BUTTON`, `MAX-CHARS`, `MAX-DATA-GUESS`, `MAX-HEIGHT`, `MAX-HEIGHT-C`, `MAX-HEIGHT-CH`, `MAX-HEIGHT-CHA`, `MAX-HEIGHT-CHAR`, `MAX-HEIGHT-CHARS`, `MAX-HEIGHT-P`, `MAX-HEIGHT-PI`, `MAX-HEIGHT-PIX`, `MAX-HEIGHT-PIXE`, `MAX-HEIGHT-PIXEL`, `MAX-HEIGHT-PIXELS`, `MAX-ROWS`, `MAX-SIZE`, `MAX-VAL`, `MAX-VALU`, `MAX-VALUE`, `MAX-WIDTH`, `MAX-WIDTH-`, `MAX-WIDTH-C`, `MAX-WIDTH-CH`, `MAX-WIDTH-CHA`, `MAX-WIDTH-CHAR`, `MAX-WIDTH-CHARS`, `MAX-WIDTH-P`, `MAX-WIDTH-PI`, `MAX-WIDTH-PIX`, `MAX-WIDTH-PIXE`, `MAX-WIDTH-PIXEL`, `MAX-WIDTH-PIXELS`, `MAXI`, `MAXIM`, `MAXIMIZE`, `MAXIMU`, `MAXIMUM`, `MAXIMUM-LEVEL`, `MD5-DIGEST`, `MEMBER`, `MEMPTR-TO-NODE-VALUE`, `MENU`, `MENU-BAR`, `MENU-ITEM`, `MENU-K`, `MENU-KE`, `MENU-KEY`, `MENU-M`, `MENU-MO`, `MENU-MOU`, `MENU-MOUS`, `MENU-MOUSE`, `MENUBAR`, `MERGE-BY-FIELD`, `MESSAGE`, `MESSAGE-AREA`, `MESSAGE-AREA-FONT`, `MESSAGE-LINES`, `METHOD`, `MIN`, `MIN-BUTTON`, `MIN-COLUMN-WIDTH-C`, `MIN-COLUMN-WIDTH-CH`, `MIN-COLUMN-WIDTH-CHA`, `MIN-COLUMN-WIDTH-CHAR`, `MIN-COLUMN-WIDTH-CHARS`, `MIN-COLUMN-WIDTH-P`, `MIN-COLUMN-WIDTH-PI`, `MIN-COLUMN-WIDTH-PIX`, `MIN-COLUMN-WIDTH-PIXE`, `MIN-COLUMN-WIDTH-PIXEL`, `MIN-COLUMN-WIDTH-PIXELS`, `MIN-HEIGHT`, `MIN-HEIGHT-`, `MIN-HEIGHT-C`, `MIN-HEIGHT-CH`, `MIN-HEIGHT-CHA`, `MIN-HEIGHT-CHAR`, `MIN-HEIGHT-CHARS`, `MIN-HEIGHT-P`, `MIN-HEIGHT-PI`, `MIN-HEIGHT-PIX`, `MIN-HEIGHT-PIXE`, `MIN-HEIGHT-PIXEL`, `MIN-HEIGHT-PIXELS`, `MIN-SIZE`, `MIN-VAL`, `MIN-VALU`, `MIN-VALUE`, `MIN-WIDTH`, `MIN-WIDTH-`, `MIN-WIDTH-C`, `MIN-WIDTH-CH`, `MIN-WIDTH-CHA`, `MIN-WIDTH-CHAR`, `MIN-WIDTH-CHARS`, `MIN-WIDTH-P`, `MIN-WIDTH-PI`, `MIN-WIDTH-PIX`, `MIN-WIDTH-PIXE`, `MIN-WIDTH-PIXEL`, `MIN-WIDTH-PIXELS`, `MINI`, `MINIM`, `MINIMU`, `MINIMUM`, `MOD`, `MODIFIED`, `MODU`, `MODUL`, `MODULO`, `MONTH`, `MOUSE`, `MOUSE-P`, `MOUSE-PO`, `MOUSE-POI`, `MOUSE-POIN`, `MOUSE-POINT`, `MOUSE-POINTE`, `MOUSE-POINTER`, `MOVABLE`, `MOVE-AFTER`, `MOVE-AFTER-`, `MOVE-AFTER-T`, `MOVE-AFTER-TA`, `MOVE-AFTER-TAB`, `MOVE-AFTER-TAB-`, `MOVE-AFTER-TAB-I`, `MOVE-AFTER-TAB-IT`, `MOVE-AFTER-TAB-ITE`, `MOVE-AFTER-TAB-ITEM`, `MOVE-BEFOR`, `MOVE-BEFORE`, `MOVE-BEFORE-`, `MOVE-BEFORE-T`, `MOVE-BEFORE-TA`, `MOVE-BEFORE-TAB`, `MOVE-BEFORE-TAB-`, `MOVE-BEFORE-TAB-I`, `MOVE-BEFORE-TAB-IT`, `MOVE-BEFORE-TAB-ITE`, `MOVE-BEFORE-TAB-ITEM`, `MOVE-COL`, `MOVE-COLU`, `MOVE-COLUM`, `MOVE-COLUMN`, `MOVE-TO-B`, `MOVE-TO-BO`, `MOVE-TO-BOT`, `MOVE-TO-BOTT`, `MOVE-TO-BOTTO`, `MOVE-TO-BOTTOM`, `MOVE-TO-EOF`, `MOVE-TO-T`, `MOVE-TO-TO`, `MOVE-TO-TOP`, `MPE`, `MTIME`, `MULTI-COMPILE`, `MULTIPLE`, `MULTIPLE-KEY`, `MULTITASKING-INTERVAL`, `MUST-EXIST`, `NAME`, `NAMESPACE-PREFIX`, `NAMESPACE-URI`, `NATIVE`, `NE`, `NEEDS-APPSERVER-PROMPT`, `NEEDS-PROMPT`, `NEW`, `NEW-INSTANCE`, `NEW-ROW`, `NEXT`, `NEXT-COLUMN`, `NEXT-PROMPT`, `NEXT-ROWID`, `NEXT-SIBLING`, `NEXT-TAB-I`, `NEXT-TAB-IT`, `NEXT-TAB-ITE`, `NEXT-TAB-ITEM`, `NEXT-VALUE`, `NO`, `NO-APPLY`, `NO-ARRAY-MESSAGE`, `NO-ASSIGN`, `NO-ATTR`, `NO-ATTR-`, `NO-ATTR-L`, `NO-ATTR-LI`, `NO-ATTR-LIS`, `NO-ATTR-LIST`, `NO-ATTR-S`, `NO-ATTR-SP`, `NO-ATTR-SPA`, `NO-ATTR-SPAC`, `NO-ATTR-SPACE`, `NO-AUTO-VALIDATE`, `NO-BIND-WHERE`, `NO-BOX`, `NO-CONSOLE`, `NO-CONVERT`, `NO-CONVERT-3D-COLORS`, `NO-CURRENT-VALUE`, `NO-DEBUG`, `NO-DRAG`, `NO-ECHO`, `NO-EMPTY-SPACE`, `NO-ERROR`, `NO-F`, `NO-FI`, `NO-FIL`, `NO-FILL`, `NO-FOCUS`, `NO-HELP`, `NO-HIDE`, `NO-INDEX-HINT`, `NO-INHERIT-BGC`, `NO-INHERIT-BGCO`, `NO-INHERIT-BGCOLOR`, `NO-INHERIT-FGC`, `NO-INHERIT-FGCO`, `NO-INHERIT-FGCOL`, `NO-INHERIT-FGCOLO`, `NO-INHERIT-FGCOLOR`, `NO-JOIN-BY-SQLDB`, `NO-LABE`, `NO-LABELS`, `NO-LOBS`, `NO-LOCK`, `NO-LOOKAHEAD`, `NO-MAP`, `NO-MES`, `NO-MESS`, `NO-MESSA`, `NO-MESSAG`, `NO-MESSAGE`, `NO-PAUSE`, `NO-PREFE`, `NO-PREFET`, `NO-PREFETC`, `NO-PREFETCH`, `NO-ROW-MARKERS`, `NO-SCROLLBAR-VERTICAL`, `NO-SEPARATE-CONNECTION`, `NO-SEPARATORS`, `NO-TAB-STOP`, `NO-UND`, `NO-UNDE`, `NO-UNDER`, `NO-UNDERL`, `NO-UNDERLI`, `NO-UNDERLIN`, `NO-UNDERLINE`, `NO-UNDO`, `NO-VAL`, `NO-VALI`, `NO-VALID`, `NO-VALIDA`, `NO-VALIDAT`, `NO-VALIDATE`, `NO-WAIT`, `NO-WORD-WRAP`, `NODE-VALUE-TO-MEMPTR`, `NONAMESPACE-SCHEMA-LOCATION`, `NONE`, `NORMALIZE`, `NOT`, `NOT-ACTIVE`, `NOW`, `NULL`, `NUM-ALI`, `NUM-ALIA`, `NUM-ALIAS`, `NUM-ALIASE`, `NUM-ALIASES`, `NUM-BUFFERS`, `NUM-BUT`, `NUM-BUTT`, `NUM-BUTTO`, `NUM-BUTTON`, `NUM-BUTTONS`, `NUM-COL`, `NUM-COLU`, `NUM-COLUM`, `NUM-COLUMN`, `NUM-COLUMNS`, `NUM-COPIES`, `NUM-DBS`, `NUM-DROPPED-FILES`, `NUM-ENTRIES`, `NUM-FIELDS`, `NUM-FORMATS`, `NUM-ITEMS`, `NUM-ITERATIONS`, `NUM-LINES`, `NUM-LOCKED-COL`, `NUM-LOCKED-COLU`, `NUM-LOCKED-COLUM`, `NUM-LOCKED-COLUMN`, `NUM-LOCKED-COLUMNS`, `NUM-MESSAGES`, `NUM-PARAMETERS`, `NUM-REFERENCES`, `NUM-REPLACED`, `NUM-RESULTS`, `NUM-SELECTED`, `NUM-SELECTED-`, `NUM-SELECTED-ROWS`, `NUM-SELECTED-W`, `NUM-SELECTED-WI`, `NUM-SELECTED-WID`, `NUM-SELECTED-WIDG`, `NUM-SELECTED-WIDGE`, `NUM-SELECTED-WIDGET`, `NUM-SELECTED-WIDGETS`, `NUM-TABS`, `NUM-TO-RETAIN`, `NUM-VISIBLE-COLUMNS`, `NUMERIC`, `NUMERIC-F`, `NUMERIC-FO`, `NUMERIC-FOR`, `NUMERIC-FORM`, `NUMERIC-FORMA`, `NUMERIC-FORMAT`, `OCTET-LENGTH`, `OF`, `OFF`, `OK`, `OK-CANCEL`, `OLD`, `ON`, `ON-FRAME`, `ON-FRAME-`, `ON-FRAME-B`, `ON-FRAME-BO`, `ON-FRAME-BOR`, `ON-FRAME-BORD`, `ON-FRAME-BORDE`, `ON-FRAME-BORDER`, `OPEN`, `OPSYS`, `OPTION`, `OR`, `ORDERED-JOIN`, `ORDINAL`, `OS-APPEND`, `OS-COMMAND`, `OS-COPY`, `OS-CREATE-DIR`, `OS-DELETE`, `OS-DIR`, `OS-DRIVE`, `OS-DRIVES`, `OS-ERROR`, `OS-GETENV`, `OS-RENAME`, `OTHERWISE`, `OUTPUT`, `OVERLAY`, `OVERRIDE`, `OWNER`, `PAGE`, `PAGE-BOT`, `PAGE-BOTT`, `PAGE-BOTTO`, `PAGE-BOTTOM`, `PAGE-NUM`, `PAGE-NUMB`, `PAGE-NUMBE`, `PAGE-NUMBER`, `PAGE-SIZE`, `PAGE-TOP`, `PAGE-WID`, `PAGE-WIDT`, `PAGE-WIDTH`, `PAGED`, `PARAM`, `PARAME`, `PARAMET`, `PARAMETE`, `PARAMETER`, `PARENT`, `PARSE-STATUS`, `PARTIAL-KEY`, `PASCAL`, `PASSWORD-FIELD`, `PATHNAME`, `PAUSE`, `PBE-HASH-ALG`, `PBE-HASH-ALGO`, `PBE-HASH-ALGOR`, `PBE-HASH-ALGORI`, `PBE-HASH-ALGORIT`, `PBE-HASH-ALGORITH`, `PBE-HASH-ALGORITHM`, `PBE-KEY-ROUNDS`, `PDBNAME`, `PERSIST`, `PERSISTE`, `PERSISTEN`, `PERSISTENT`, `PERSISTENT-CACHE-DISABLED`, `PFC`, `PFCO`, `PFCOL`, `PFCOLO`, `PFCOLOR`, `PIXELS`, `PIXELS-PER-COL`, `PIXELS-PER-COLU`, `PIXELS-PER-COLUM`, `PIXELS-PER-COLUMN`, `PIXELS-PER-ROW`, `POPUP-M`, `POPUP-ME`, `POPUP-MEN`, `POPUP-MENU`, `POPUP-O`, `POPUP-ON`, `POPUP-ONL`, `POPUP-ONLY`, `PORTRAIT`, `POSITION`, `PRECISION`, `PREFER-DATASET`, `PREPARE-STRING`, `PREPARED`, `PREPROC`, `PREPROCE`, `PREPROCES`, `PREPROCESS`, `PRESEL`, `PRESELE`, `PRESELEC`, `PRESELECT`, `PREV`, `PREV-COLUMN`, `PREV-SIBLING`, `PREV-TAB-I`, `PREV-TAB-IT`, `PREV-TAB-ITE`, `PREV-TAB-ITEM`, `PRIMARY`, `PRINTER`, `PRINTER-CONTROL-HANDLE`, `PRINTER-HDC`, `PRINTER-NAME`, `PRINTER-PORT`, `PRINTER-SETUP`, `PRIVATE`, `PRIVATE-D`, `PRIVATE-DA`, `PRIVATE-DAT`, `PRIVATE-DATA`, `PRIVILEGES`, `PROC-HA`, `PROC-HAN`, `PROC-HAND`, `PROC-HANDL`, `PROC-HANDLE`, `PROC-ST`, `PROC-STA`, `PROC-STAT`, `PROC-STATU`, `PROC-STATUS`, `PROC-TEXT`, `PROC-TEXT-BUFFER`, `PROCE`, `PROCED`, `PROCEDU`, `PROCEDUR`, `PROCEDURE`, `PROCEDURE-CALL-TYPE`, `PROCEDURE-TYPE`, `PROCESS`, `PROFILER`, `PROGRAM-NAME`, `PROGRESS`, `PROGRESS-S`, `PROGRESS-SO`, `PROGRESS-SOU`, `PROGRESS-SOUR`, `PROGRESS-SOURC`, `PROGRESS-SOURCE`, `PROMPT`, `PROMPT-F`, `PROMPT-FO`, `PROMPT-FOR`, `PROMSGS`, `PROPATH`, `PROPERTY`, `PROTECTED`, `PROVERS`, `PROVERSI`, `PROVERSIO`, `PROVERSION`, `PROXY`, `PROXY-PASSWORD`, `PROXY-USERID`, `PUBLIC`, `PUBLIC-ID`, `PUBLISH`, `PUBLISHED-EVENTS`, `PUT`, `PUT-BYTE`, `PUT-DOUBLE`, `PUT-FLOAT`, `PUT-INT64`, `PUT-KEY-VAL`, `PUT-KEY-VALU`, `PUT-KEY-VALUE`, `PUT-LONG`, `PUT-SHORT`, `PUT-STRING`, `PUT-UNSIGNED-LONG`, `PUTBYTE`, `QUERY`, `QUERY-CLOSE`, `QUERY-OFF-END`, `QUERY-OPEN`, `QUERY-PREPARE`, `QUERY-TUNING`, `QUESTION`, `QUIT`, `QUOTER`, `R-INDEX`, `RADIO-BUTTONS`, `RADIO-SET`, `RANDOM`, `RAW`, `RAW-TRANSFER`, `RCODE-INFO`, `RCODE-INFOR`, `RCODE-INFORM`, `RCODE-INFORMA`, `RCODE-INFORMAT`, `RCODE-INFORMATI`, `RCODE-INFORMATIO`, `RCODE-INFORMATION`, `READ-AVAILABLE`, `READ-EXACT-NUM`, `READ-FILE`, `READ-JSON`, `READ-ONLY`, `READ-XML`, `READ-XMLSCHEMA`, `READKEY`, `REAL`, `RECID`, `RECORD-LENGTH`, `RECT`, `RECTA`, `RECTAN`, `RECTANG`, `RECTANGL`, `RECTANGLE`, `RECURSIVE`, `REFERENCE-ONLY`, `REFRESH`, `REFRESH-AUDIT-POLICY`, `REFRESHABLE`, `REGISTER-DOMAIN`, `RELEASE`, `REMOTE`, `REMOVE-EVENTS-PROCEDURE`, `REMOVE-SUPER-PROCEDURE`, `REPEAT`, `REPLACE`, `REPLACE-SELECTION-TEXT`, `REPOSITION`, `REPOSITION-BACKWARD`, `REPOSITION-FORWARD`, `REPOSITION-MODE`, `REPOSITION-TO-ROW`, `REPOSITION-TO-ROWID`, `REQUEST`, `REQUEST-INFO`, `RESET`, `RESIZA`, `RESIZAB`, `RESIZABL`, `RESIZABLE`, `RESIZE`, `RESPONSE-INFO`, `RESTART-ROW`, `RESTART-ROWID`, `RETAIN`, `RETAIN-SHAPE`, `RETRY`, `RETRY-CANCEL`, `RETURN`, `RETURN-ALIGN`, `RETURN-ALIGNE`, `RETURN-INS`, `RETURN-INSE`, `RETURN-INSER`, `RETURN-INSERT`, `RETURN-INSERTE`, `RETURN-INSERTED`, `RETURN-TO-START-DI`, `RETURN-TO-START-DIR`, `RETURN-VAL`, `RETURN-VALU`, `RETURN-VALUE`, `RETURN-VALUE-DATA-TYPE`, `RETURNS`, `REVERSE-FROM`, `REVERT`, `REVOKE`, `RGB-VALUE`, `RIGHT-ALIGNED`, `RIGHT-TRIM`, `ROLES`, `ROUND`, `ROUTINE-LEVEL`, `ROW`, `ROW-HEIGHT-CHARS`, `ROW-HEIGHT-PIXELS`, `ROW-MARKERS`, `ROW-OF`, `ROW-RESIZABLE`, `ROWID`, `RULE`, `RUN`, `RUN-PROCEDURE`, `SAVE CACHE`, `SAVE`, `SAVE-AS`, `SAVE-FILE`, `SAX-COMPLE`, `SAX-COMPLET`, `SAX-COMPLETE`, `SAX-PARSE`, `SAX-PARSE-FIRST`, `SAX-PARSE-NEXT`, `SAX-PARSER-ERROR`, `SAX-RUNNING`, `SAX-UNINITIALIZED`, `SAX-WRITE-BEGIN`, `SAX-WRITE-COMPLETE`, `SAX-WRITE-CONTENT`, `SAX-WRITE-ELEMENT`, `SAX-WRITE-ERROR`, `SAX-WRITE-IDLE`, `SAX-WRITE-TAG`, `SAX-WRITER`, `SCHEMA`, `SCHEMA-LOCATION`, `SCHEMA-MARSHAL`, `SCHEMA-PATH`, `SCREEN`, `SCREEN-IO`, `SCREEN-LINES`, `SCREEN-VAL`, `SCREEN-VALU`, `SCREEN-VALUE`, `SCROLL`, `SCROLL-BARS`, `SCROLL-DELTA`, `SCROLL-OFFSET`, `SCROLL-TO-CURRENT-ROW`, `SCROLL-TO-I`, `SCROLL-TO-IT`, `SCROLL-TO-ITE`, `SCROLL-TO-ITEM`, `SCROLL-TO-SELECTED-ROW`, `SCROLLABLE`, `SCROLLBAR-H`, `SCROLLBAR-HO`, `SCROLLBAR-HOR`, `SCROLLBAR-HORI`, `SCROLLBAR-HORIZ`, `SCROLLBAR-HORIZO`, `SCROLLBAR-HORIZON`, `SCROLLBAR-HORIZONT`, `SCROLLBAR-HORIZONTA`, `SCROLLBAR-HORIZONTAL`, `SCROLLBAR-V`, `SCROLLBAR-VE`, `SCROLLBAR-VER`, `SCROLLBAR-VERT`, `SCROLLBAR-VERTI`, `SCROLLBAR-VERTIC`, `SCROLLBAR-VERTICA`, `SCROLLBAR-VERTICAL`, `SCROLLED-ROW-POS`, `SCROLLED-ROW-POSI`, `SCROLLED-ROW-POSIT`, `SCROLLED-ROW-POSITI`, `SCROLLED-ROW-POSITIO`, `SCROLLED-ROW-POSITION`, `SCROLLING`, `SDBNAME`, `SEAL`, `SEAL-TIMESTAMP`, `SEARCH`, `SEARCH-SELF`, `SEARCH-TARGET`, `SECTION`, `SECURITY-POLICY`, `SEEK`, `SELECT`, `SELECT-ALL`, `SELECT-FOCUSED-ROW`, `SELECT-NEXT-ROW`, `SELECT-PREV-ROW`, `SELECT-ROW`, `SELECTABLE`, `SELECTED`, `SELECTION`, `SELECTION-END`, `SELECTION-LIST`, `SELECTION-START`, `SELECTION-TEXT`, `SELF`, `SEND`, `SEND-SQL-STATEMENT`, `SENSITIVE`, `SEPARATE-CONNECTION`, `SEPARATOR-FGCOLOR`, `SEPARATORS`, `SERIALIZABLE`, `SERIALIZE-HIDDEN`, `SERIALIZE-NAME`, `SERVER`, `SERVER-CONNECTION-BOUND`, `SERVER-CONNECTION-BOUND-REQUEST`, `SERVER-CONNECTION-CONTEXT`, `SERVER-CONNECTION-ID`, `SERVER-OPERATING-MODE`, `SESSION`, `SESSION-ID`, `SET`, `SET-APPL-CONTEXT`, `SET-ATTR-CALL-TYPE`, `SET-ATTRIBUTE-NODE`, `SET-BLUE`, `SET-BLUE-`, `SET-BLUE-V`, `SET-BLUE-VA`, `SET-BLUE-VAL`, `SET-BLUE-VALU`, `SET-BLUE-VALUE`, `SET-BREAK`, `SET-BUFFERS`, `SET-CALLBACK`, `SET-CLIENT`, `SET-COMMIT`, `SET-CONTENTS`, `SET-CURRENT-VALUE`, `SET-DB-CLIENT`, `SET-DYNAMIC`, `SET-EVENT-MANAGER-OPTION`, `SET-GREEN`, `SET-GREEN-`, `SET-GREEN-V`, `SET-GREEN-VA`, `SET-GREEN-VAL`, `SET-GREEN-VALU`, `SET-GREEN-VALUE`, `SET-INPUT-SOURCE`, `SET-OPTION`, `SET-OUTPUT-DESTINATION`, `SET-PARAMETER`, `SET-POINTER-VALUE`, `SET-PROPERTY`, `SET-RED`, `SET-RED-`, `SET-RED-V`, `SET-RED-VA`, `SET-RED-VAL`, `SET-RED-VALU`, `SET-RED-VALUE`, `SET-REPOSITIONED-ROW`, `SET-RGB-VALUE`, `SET-ROLLBACK`, `SET-SELECTION`, `SET-SIZE`, `SET-SORT-ARROW`, `SET-WAIT-STATE`, `SETUSER`, `SETUSERI`, `SETUSERID`, `SHA1-DIGEST`, `SHARE`, `SHARE-`, `SHARE-L`, `SHARE-LO`, `SHARE-LOC`, `SHARE-LOCK`, `SHARED`, `SHOW-IN-TASKBAR`, `SHOW-STAT`, `SHOW-STATS`, `SIDE-LAB`, `SIDE-LABE`, `SIDE-LABEL`, `SIDE-LABEL-H`, `SIDE-LABEL-HA`, `SIDE-LABEL-HAN`, `SIDE-LABEL-HAND`, `SIDE-LABEL-HANDL`, `SIDE-LABEL-HANDLE`, `SIDE-LABELS`, `SIGNATURE`, `SILENT`, `SIMPLE`, `SINGLE`, `SINGLE-RUN`, `SINGLETON`, `SIZE`, `SIZE-C`, `SIZE-CH`, `SIZE-CHA`, `SIZE-CHAR`, `SIZE-CHARS`, `SIZE-P`, `SIZE-PI`, `SIZE-PIX`, `SIZE-PIXE`, `SIZE-PIXEL`, `SIZE-PIXELS`, `SKIP`, `SKIP-DELETED-RECORD`, `SLIDER`, `SMALL-ICON`, `SMALL-TITLE`, `SMALLINT`, `SOME`, `SORT`, `SORT-ASCENDING`, `SORT-NUMBER`, `SOURCE`, `SOURCE-PROCEDURE`, `SPACE`, `SQL`, `SQRT`, `SSL-SERVER-NAME`, `STANDALONE`, `START`, `START-DOCUMENT`, `START-ELEMENT`, `START-MOVE`, `START-RESIZE`, `START-ROW-RESIZE`, `STATE-DETAIL`, `STATIC`, `STATUS`, `STATUS-AREA`, `STATUS-AREA-FONT`, `STDCALL`, `STOP`, `STOP-AFTER`, `STOP-PARSING`, `STOPPE`, `STOPPED`, `STORED-PROC`, `STORED-PROCE`, `STORED-PROCED`, `STORED-PROCEDU`, `STORED-PROCEDUR`, `STORED-PROCEDURE`, `STREAM`, `STREAM-HANDLE`, `STREAM-IO`, `STRETCH-TO-FIT`, `STRICT`, `STRICT-ENTITY-RESOLUTION`, `STRING`, `STRING-VALUE`, `STRING-XREF`, `SUB-AVE`, `SUB-AVER`, `SUB-AVERA`, `SUB-AVERAG`, `SUB-AVERAGE`, `SUB-COUNT`, `SUB-MAXIMUM`, `SUB-MENU`, `SUB-MIN`, `SUB-MINIMUM`, `SUB-TOTAL`, `SUBSCRIBE`, `SUBST`, `SUBSTI`, `SUBSTIT`, `SUBSTITU`, `SUBSTITUT`, `SUBSTITUTE`, `SUBSTR`, `SUBSTRI`, `SUBSTRIN`, `SUBSTRING`, `SUBTYPE`, `SUM`, `SUM-MAX`, `SUM-MAXI`, `SUM-MAXIM`, `SUM-MAXIMU`, `SUPER`, `SUPER-PROCEDURES`, `SUPPRESS-NAMESPACE-PROCESSING`, `SUPPRESS-W`, `SUPPRESS-WA`, `SUPPRESS-WAR`, `SUPPRESS-WARN`, `SUPPRESS-WARNI`, `SUPPRESS-WARNIN`, `SUPPRESS-WARNING`, `SUPPRESS-WARNINGS`, `SYMMETRIC-ENCRYPTION-ALGORITHM`, `SYMMETRIC-ENCRYPTION-IV`, `SYMMETRIC-ENCRYPTION-KEY`, `SYMMETRIC-SUPPORT`, `SYSTEM-ALERT`, `SYSTEM-ALERT-`, `SYSTEM-ALERT-B`, `SYSTEM-ALERT-BO`, `SYSTEM-ALERT-BOX`, `SYSTEM-ALERT-BOXE`, `SYSTEM-ALERT-BOXES`, `SYSTEM-DIALOG`, `SYSTEM-HELP`, `SYSTEM-ID`, `TAB-POSITION`, `TAB-STOP`, `TABLE`, `TABLE-HANDLE`, `TABLE-NUMBER`, `TABLE-SCAN`, `TARGET`, `TARGET-PROCEDURE`, `TEMP-DIR`, `TEMP-DIRE`, `TEMP-DIREC`, `TEMP-DIRECT`, `TEMP-DIRECTO`, `TEMP-DIRECTOR`, `TEMP-DIRECTORY`, `TEMP-TABLE`, `TEMP-TABLE-PREPARE`, `TERM`, `TERMI`, `TERMIN`, `TERMINA`, `TERMINAL`, `TERMINATE`, `TEXT`, `TEXT-CURSOR`, `TEXT-SEG-GROW`, `TEXT-SELECTED`, `THEN`, `THIS-OBJECT`, `THIS-PROCEDURE`, `THREAD-SAFE`, `THREE-D`, `THROUGH`, `THROW`, `THRU`, `TIC-MARKS`, `TIME`, `TIME-SOURCE`, `TITLE`, `TITLE-BGC`, `TITLE-BGCO`, `TITLE-BGCOL`, `TITLE-BGCOLO`, `TITLE-BGCOLOR`, `TITLE-DC`, `TITLE-DCO`, `TITLE-DCOL`, `TITLE-DCOLO`, `TITLE-DCOLOR`, `TITLE-FGC`, `TITLE-FGCO`, `TITLE-FGCOL`, `TITLE-FGCOLO`, `TITLE-FGCOLOR`, `TITLE-FO`, `TITLE-FON`, `TITLE-FONT`, `TO`, `TO-ROWID`, `TODAY`, `TOGGLE-BOX`, `TOOLTIP`, `TOOLTIPS`, `TOP-NAV-QUERY`, `TOP-ONLY`, `TOPIC`, `TOTAL`, `TRAILING`, `TRANS`, `TRANS-INIT-PROCEDURE`, `TRANSACTION`, `TRANSACTION-MODE`, `TRANSPARENT`, `TRIGGER`, `TRIGGERS`, `TRIM`, `TRUE`, `TRUNC`, `TRUNCA`, `TRUNCAT`, `TRUNCATE`, `TYPE`, `TYPE-OF`, `UNBOX`, `UNBUFF`, `UNBUFFE`, `UNBUFFER`, `UNBUFFERE`, `UNBUFFERED`, `UNDERL`, `UNDERLI`, `UNDERLIN`, `UNDERLINE`, `UNDO`, `UNFORM`, `UNFORMA`, `UNFORMAT`, `UNFORMATT`, `UNFORMATTE`, `UNFORMATTED`, `UNION`, `UNIQUE`, `UNIQUE-ID`, `UNIQUE-MATCH`, `UNIX`, `UNLESS-HIDDEN`, `UNLOAD`, `UNSIGNED-LONG`, `UNSUBSCRIBE`, `UP`, `UPDATE`, `UPDATE-ATTRIBUTE`, `URL`, `URL-DECODE`, `URL-ENCODE`, `URL-PASSWORD`, `URL-USERID`, `USE`, `USE-DICT-EXPS`, `USE-FILENAME`, `USE-INDEX`, `USE-REVVIDEO`, `USE-TEXT`, `USE-UNDERLINE`, `USE-WIDGET-POOL`, `USER`, `USER-ID`, `USERID`, `USING`, `V6DISPLAY`, `V6FRAME`, `VALID-EVENT`, `VALID-HANDLE`, `VALID-OBJECT`, `VALIDATE`, `VALIDATE-EXPRESSION`, `VALIDATE-MESSAGE`, `VALIDATE-SEAL`, `VALIDATION-ENABLED`, `VALUE`, `VALUE-CHANGED`, `VALUES`, `VAR`, `VARI`, `VARIA`, `VARIAB`, `VARIABL`, `VARIABLE`, `VERBOSE`, `VERSION`, `VERT`, `VERTI`, `VERTIC`, `VERTICA`, `VERTICAL`, `VIEW`, `VIEW-AS`, `VIEW-FIRST-COLUMN-ON-REOPEN`, `VIRTUAL-HEIGHT`, `VIRTUAL-HEIGHT-`, `VIRTUAL-HEIGHT-C`, `VIRTUAL-HEIGHT-CH`, `VIRTUAL-HEIGHT-CHA`, `VIRTUAL-HEIGHT-CHAR`, `VIRTUAL-HEIGHT-CHARS`, `VIRTUAL-HEIGHT-P`, `VIRTUAL-HEIGHT-PI`, `VIRTUAL-HEIGHT-PIX`, `VIRTUAL-HEIGHT-PIXE`, `VIRTUAL-HEIGHT-PIXEL`, `VIRTUAL-HEIGHT-PIXELS`, `VIRTUAL-WIDTH`, `VIRTUAL-WIDTH-`, `VIRTUAL-WIDTH-C`, `VIRTUAL-WIDTH-CH`, `VIRTUAL-WIDTH-CHA`, `VIRTUAL-WIDTH-CHAR`, `VIRTUAL-WIDTH-CHARS`, `VIRTUAL-WIDTH-P`, `VIRTUAL-WIDTH-PI`, `VIRTUAL-WIDTH-PIX`, `VIRTUAL-WIDTH-PIXE`, `VIRTUAL-WIDTH-PIXEL`, `VIRTUAL-WIDTH-PIXELS`, `VISIBLE`, `VOID`, `WAIT`, `WAIT-FOR`, `WARNING`, `WEB-CONTEXT`, `WEEKDAY`, `WHEN`, `WHERE`, `WHILE`, `WIDGET`, `WIDGET-E`, `WIDGET-EN`, `WIDGET-ENT`, `WIDGET-ENTE`, `WIDGET-ENTER`, `WIDGET-ID`, `WIDGET-L`, `WIDGET-LE`, `WIDGET-LEA`, `WIDGET-LEAV`, `WIDGET-LEAVE`, `WIDGET-POOL`, `WIDTH`, `WIDTH-`, `WIDTH-C`, `WIDTH-CH`, `WIDTH-CHA`, `WIDTH-CHAR`, `WIDTH-CHARS`, `WIDTH-P`, `WIDTH-PI`, `WIDTH-PIX`, `WIDTH-PIXE`, `WIDTH-PIXEL`, `WIDTH-PIXELS`, `WINDOW`, `WINDOW-MAXIM`, `WINDOW-MAXIMI`, `WINDOW-MAXIMIZ`, `WINDOW-MAXIMIZE`, `WINDOW-MAXIMIZED`, `WINDOW-MINIM`, `WINDOW-MINIMI`, `WINDOW-MINIMIZ`, `WINDOW-MINIMIZE`, `WINDOW-MINIMIZED`, `WINDOW-NAME`, `WINDOW-NORMAL`, `WINDOW-STA`, `WINDOW-STAT`, `WINDOW-STATE`, `WINDOW-SYSTEM`, `WITH`, `WORD-INDEX`, `WORD-WRAP`, `WORK-AREA-HEIGHT-PIXELS`, `WORK-AREA-WIDTH-PIXELS`, `WORK-AREA-X`, `WORK-AREA-Y`, `WORK-TAB`, `WORK-TABL`, `WORK-TABLE`, `WORKFILE`, `WRITE`, `WRITE-CDATA`, `WRITE-CHARACTERS`, `WRITE-COMMENT`, `WRITE-DATA-ELEMENT`, `WRITE-EMPTY-ELEMENT`, `WRITE-ENTITY-REF`, `WRITE-EXTERNAL-DTD`, `WRITE-FRAGMENT`, `WRITE-JSON`, `WRITE-MESSAGE`, `WRITE-PROCESSING-INSTRUCTION`, `WRITE-STATUS`, `WRITE-XML`, `WRITE-XMLSCHEMA`, `X`, `X-OF`, `XCODE`, `XML-DATA-TYPE`, `XML-ENTITY-EXPANSION-LIMIT`, `XML-NODE-TYPE`, `XML-SCHEMA-PATH`, `XML-STRICT-ENTITY-RESOLUTION`, `XML-SUPPRESS-NAMESPACE-PROCESSING`, `XREF`, `XREF-XML`, `Y`, `Y-OF`, `YEAR`, `YEAR-OFFSET`, `YES`, `YES-NO`, `YES-NO-CANCEL`), KeywordReserved, nil}, //nolint
+ {Words(`(?i)(^|(?<=[^\w\-]))`, `\s*($|(?=[^\w\-]))`, `ABS`, `ABSO`, `ABSOL`, `ABSOLU`, `ABSOLUT`, `ABSOLUTE`, `ABSTRACT`, `ACCELERATOR`, `ACCUM`, `ACCUMU`, `ACCUMUL`, `ACCUMULA`, `ACCUMULAT`, `ACCUMULATE`, `ACTIVE-FORM`, `ACTIVE-WINDOW`, `ADD`, `ADD-BUFFER`, `ADD-CALC-COLUMN`, `ADD-COLUMNS-FROM`, `ADD-EVENTS-PROCEDURE`, `ADD-FIELDS-FROM`, `ADD-FIRST`, `ADD-INDEX-FIELD`, `ADD-LAST`, `ADD-LIKE-COLUMN`, `ADD-LIKE-FIELD`, `ADD-LIKE-INDEX`, `ADD-NEW-FIELD`, `ADD-NEW-INDEX`, `ADD-SCHEMA-LOCATION`, `ADD-SUPER-PROCEDURE`, `ADM-DATA`, `ADVISE`, `ALERT-BOX`, `ALIAS`, `ALL`, `ALLOW-COLUMN-SEARCHING`, `ALLOW-REPLICATION`, `ALTER`, `ALWAYS-ON-TOP`, `AMBIG`, `AMBIGU`, `AMBIGUO`, `AMBIGUOU`, `AMBIGUOUS`, `ANALYZ`, `ANALYZE`, `AND`, `ANSI-ONLY`, `ANY`, `ANYWHERE`, `APPEND`, `APPL-ALERT`, `APPL-ALERT-`, `APPL-ALERT-B`, `APPL-ALERT-BO`, `APPL-ALERT-BOX`, `APPL-ALERT-BOXE`, `APPL-ALERT-BOXES`, `APPL-CONTEXT-ID`, `APPLICATION`, `APPLY`, `APPSERVER-INFO`, `APPSERVER-PASSWORD`, `APPSERVER-USERID`, `ARRAY-MESSAGE`, `AS`, `ASC`, `ASCE`, `ASCEN`, `ASCEND`, `ASCENDI`, `ASCENDIN`, `ASCENDING`, `ASK-OVERWRITE`, `ASSEMBLY`, `ASSIGN`, `ASYNC-REQUEST-COUNT`, `ASYNC-REQUEST-HANDLE`, `ASYNCHRONOUS`, `AT`, `ATTACHED-PAIRLIST`, `ATTR`, `ATTR-SPACE`, `ATTRI`, `ATTRIB`, `ATTRIBU`, `ATTRIBUT`, `AUDIT-CONTROL`, `AUDIT-ENABLED`, `AUDIT-EVENT-CONTEXT`, `AUDIT-POLICY`, `AUTHENTICATION-FAILED`, `AUTHORIZATION`, `AUTO-COMP`, `AUTO-COMPL`, `AUTO-COMPLE`, `AUTO-COMPLET`, `AUTO-COMPLETI`, `AUTO-COMPLETIO`, `AUTO-COMPLETION`, `AUTO-END-KEY`, `AUTO-ENDKEY`, `AUTO-GO`, `AUTO-IND`, `AUTO-INDE`, `AUTO-INDEN`, `AUTO-INDENT`, `AUTO-RESIZE`, `AUTO-RET`, `AUTO-RETU`, `AUTO-RETUR`, `AUTO-RETURN`, `AUTO-SYNCHRONIZE`, `AUTO-Z`, `AUTO-ZA`, `AUTO-ZAP`, `AUTOMATIC`, `AVAIL`, `AVAILA`, `AVAILAB`, `AVAILABL`, `AVAILABLE`, `AVAILABLE-FORMATS`, `AVE`, `AVER`, `AVERA`, `AVERAG`, `AVERAGE`, `AVG`, `BACK`, `BACKG`, `BACKGR`, `BACKGRO`, `BACKGROU`, `BACKGROUN`, `BACKGROUND`, `BACKWARD`, `BACKWARDS`, `BASE64-DECODE`, `BASE64-ENCODE`, `BASE-ADE`, `BASE-KEY`, `BATCH`, `BATCH-`, `BATCH-M`, `BATCH-MO`, `BATCH-MOD`, `BATCH-MODE`, `BATCH-SIZE`, `BEFORE-H`, `BEFORE-HI`, `BEFORE-HID`, `BEFORE-HIDE`, `BEGIN-EVENT-GROUP`, `BEGINS`, `BELL`, `BETWEEN`, `BGC`, `BGCO`, `BGCOL`, `BGCOLO`, `BGCOLOR`, `BIG-ENDIAN`, `BINARY`, `BIND`, `BIND-WHERE`, `BLANK`, `BLOCK-ITERATION-DISPLAY`, `BLOCK-LEVEL`, `BORDER-B`, `BORDER-BO`, `BORDER-BOT`, `BORDER-BOTT`, `BORDER-BOTTO`, `BORDER-BOTTOM-CHARS`, `BORDER-BOTTOM-P`, `BORDER-BOTTOM-PI`, `BORDER-BOTTOM-PIX`, `BORDER-BOTTOM-PIXE`, `BORDER-BOTTOM-PIXEL`, `BORDER-BOTTOM-PIXELS`, `BORDER-L`, `BORDER-LE`, `BORDER-LEF`, `BORDER-LEFT`, `BORDER-LEFT-`, `BORDER-LEFT-C`, `BORDER-LEFT-CH`, `BORDER-LEFT-CHA`, `BORDER-LEFT-CHAR`, `BORDER-LEFT-CHARS`, `BORDER-LEFT-P`, `BORDER-LEFT-PI`, `BORDER-LEFT-PIX`, `BORDER-LEFT-PIXE`, `BORDER-LEFT-PIXEL`, `BORDER-LEFT-PIXELS`, `BORDER-R`, `BORDER-RI`, `BORDER-RIG`, `BORDER-RIGH`, `BORDER-RIGHT`, `BORDER-RIGHT-`, `BORDER-RIGHT-C`, `BORDER-RIGHT-CH`, `BORDER-RIGHT-CHA`, `BORDER-RIGHT-CHAR`, `BORDER-RIGHT-CHARS`, `BORDER-RIGHT-P`, `BORDER-RIGHT-PI`, `BORDER-RIGHT-PIX`, `BORDER-RIGHT-PIXE`, `BORDER-RIGHT-PIXEL`, `BORDER-RIGHT-PIXELS`, `BORDER-T`, `BORDER-TO`, `BORDER-TOP`, `BORDER-TOP-`, `BORDER-TOP-C`, `BORDER-TOP-CH`, `BORDER-TOP-CHA`, `BORDER-TOP-CHAR`, `BORDER-TOP-CHARS`, `BORDER-TOP-P`, `BORDER-TOP-PI`, `BORDER-TOP-PIX`, `BORDER-TOP-PIXE`, `BORDER-TOP-PIXEL`, `BORDER-TOP-PIXELS`, `BOX`, `BOX-SELECT`, `BOX-SELECTA`, `BOX-SELECTAB`, `BOX-SELECTABL`, `BOX-SELECTABLE`, `BREAK`, `BROWSE`, `BUFFER`, `BUFFER-CHARS`, `BUFFER-COMPARE`, `BUFFER-COPY`, `BUFFER-CREATE`, `BUFFER-DELETE`, `BUFFER-FIELD`, `BUFFER-HANDLE`, `BUFFER-LINES`, `BUFFER-NAME`, `BUFFER-PARTITION-ID`, `BUFFER-RELEASE`, `BUFFER-VALUE`, `BUTTON`, `BUTTONS`, `BY`, `BY-POINTER`, `BY-VARIANT-POINTER`, `CACHE`, `CACHE-SIZE`, `CALL`, `CALL-NAME`, `CALL-TYPE`, `CAN-CREATE`, `CAN-DELETE`, `CAN-DO`, `CAN-DO-DOMAIN-SUPPORT`, `CAN-FIND`, `CAN-QUERY`, `CAN-READ`, `CAN-SET`, `CAN-WRITE`, `CANCEL-BREAK`, `CANCEL-BUTTON`, `CAPS`, `CAREFUL-PAINT`, `CASE`, `CASE-SEN`, `CASE-SENS`, `CASE-SENSI`, `CASE-SENSIT`, `CASE-SENSITI`, `CASE-SENSITIV`, `CASE-SENSITIVE`, `CAST`, `CATCH`, `CDECL`, `CENTER`, `CENTERE`, `CENTERED`, `CHAINED`, `CHARACTER`, `CHARACTER_LENGTH`, `CHARSET`, `CHECK`, `CHECKED`, `CHOOSE`, `CHR`, `CLASS`, `CLASS-TYPE`, `CLEAR`, `CLEAR-APPL-CONTEXT`, `CLEAR-LOG`, `CLEAR-SELECT`, `CLEAR-SELECTI`, `CLEAR-SELECTIO`, `CLEAR-SELECTION`, `CLEAR-SORT-ARROW`, `CLEAR-SORT-ARROWS`, `CLIENT-CONNECTION-ID`, `CLIENT-PRINCIPAL`, `CLIENT-TTY`, `CLIENT-TYPE`, `CLIENT-WORKSTATION`, `CLIPBOARD`, `CLOSE`, `CLOSE-LOG`, `CODE`, `CODEBASE-LOCATOR`, `CODEPAGE`, `CODEPAGE-CONVERT`, `COL`, `COL-OF`, `COLLATE`, `COLON`, `COLON-ALIGN`, `COLON-ALIGNE`, `COLON-ALIGNED`, `COLOR`, `COLOR-TABLE`, `COLU`, `COLUM`, `COLUMN`, `COLUMN-BGCOLOR`, `COLUMN-DCOLOR`, `COLUMN-FGCOLOR`, `COLUMN-FONT`, `COLUMN-LAB`, `COLUMN-LABE`, `COLUMN-LABEL`, `COLUMN-MOVABLE`, `COLUMN-OF`, `COLUMN-PFCOLOR`, `COLUMN-READ-ONLY`, `COLUMN-RESIZABLE`, `COLUMN-SCROLLING`, `COLUMNS`, `COM-HANDLE`, `COM-SELF`, `COMBO-BOX`, `COMMAND`, `COMPARES`, `COMPILE`, `COMPILER`, `COMPLETE`, `CONFIG-NAME`, `CONNECT`, `CONNECTED`, `CONSTRUCTOR`, `CONTAINS`, `CONTENTS`, `CONTEXT`, `CONTEXT-HELP`, `CONTEXT-HELP-FILE`, `CONTEXT-HELP-ID`, `CONTEXT-POPUP`, `CONTROL`, `CONTROL-BOX`, `CONTROL-FRAME`, `CONVERT`, `CONVERT-3D-COLORS`, `CONVERT-TO-OFFS`, `CONVERT-TO-OFFSE`, `CONVERT-TO-OFFSET`, `COPY-DATASET`, `COPY-LOB`, `COPY-SAX-ATTRIBUTES`, `COPY-TEMP-TABLE`, `COUNT`, `COUNT-OF`, `CPCASE`, `CPCOLL`, `CPINTERNAL`, `CPLOG`, `CPPRINT`, `CPRCODEIN`, `CPRCODEOUT`, `CPSTREAM`, `CPTERM`, `CRC-VALUE`, `CREATE`, `CREATE-LIKE`, `CREATE-LIKE-SEQUENTIAL`, `CREATE-NODE-NAMESPACE`, `CREATE-RESULT-LIST-ENTRY`, `CREATE-TEST-FILE`, `CURRENT`, `CURRENT-CHANGED`, `CURRENT-COLUMN`, `CURRENT-ENV`, `CURRENT-ENVI`, `CURRENT-ENVIR`, `CURRENT-ENVIRO`, `CURRENT-ENVIRON`, `CURRENT-ENVIRONM`, `CURRENT-ENVIRONME`, `CURRENT-ENVIRONMEN`, `CURRENT-ENVIRONMENT`, `CURRENT-ITERATION`, `CURRENT-LANG`, `CURRENT-LANGU`, `CURRENT-LANGUA`, `CURRENT-LANGUAG`, `CURRENT-LANGUAGE`, `CURRENT-QUERY`, `CURRENT-REQUEST-INFO`, `CURRENT-RESPONSE-INFO`, `CURRENT-RESULT-ROW`, `CURRENT-ROW-MODIFIED`, `CURRENT-VALUE`, `CURRENT-WINDOW`, `CURRENT_DATE`, `CURS`, `CURSO`, `CURSOR`, `CURSOR-CHAR`, `CURSOR-LINE`, `CURSOR-OFFSET`, `DATA-BIND`, `DATA-ENTRY-RET`, `DATA-ENTRY-RETU`, `DATA-ENTRY-RETUR`, `DATA-ENTRY-RETURN`, `DATA-REL`, `DATA-RELA`, `DATA-RELAT`, `DATA-RELATI`, `DATA-RELATIO`, `DATA-RELATION`, `DATA-SOURCE`, `DATA-SOURCE-COMPLETE-MAP`, `DATA-SOURCE-MODIFIED`, `DATA-SOURCE-ROWID`, `DATA-T`, `DATA-TY`, `DATA-TYP`, `DATA-TYPE`, `DATABASE`, `DATASERVERS`, `DATASET`, `DATASET-HANDLE`, `DATE`, `DATE-F`, `DATE-FO`, `DATE-FOR`, `DATE-FORM`, `DATE-FORMA`, `DATE-FORMAT`, `DAY`, `DB-CONTEXT`, `DB-REFERENCES`, `DBCODEPAGE`, `DBCOLLATION`, `DBNAME`, `DBPARAM`, `DBREST`, `DBRESTR`, `DBRESTRI`, `DBRESTRIC`, `DBRESTRICT`, `DBRESTRICTI`, `DBRESTRICTIO`, `DBRESTRICTION`, `DBRESTRICTIONS`, `DBTASKID`, `DBTYPE`, `DBVERS`, `DBVERSI`, `DBVERSIO`, `DBVERSION`, `DCOLOR`, `DDE`, `DDE-ERROR`, `DDE-I`, `DDE-ID`, `DDE-ITEM`, `DDE-NAME`, `DDE-TOPIC`, `DEBLANK`, `DEBU`, `DEBUG`, `DEBUG-ALERT`, `DEBUG-LIST`, `DEBUGGER`, `DECIMAL`, `DECIMALS`, `DECLARE`, `DECLARE-NAMESPACE`, `DECRYPT`, `DEFAULT`, `DEFAULT-B`, `DEFAULT-BU`, `DEFAULT-BUFFER-HANDLE`, `DEFAULT-BUT`, `DEFAULT-BUTT`, `DEFAULT-BUTTO`, `DEFAULT-BUTTON`, `DEFAULT-COMMIT`, `DEFAULT-EX`, `DEFAULT-EXT`, `DEFAULT-EXTE`, `DEFAULT-EXTEN`, `DEFAULT-EXTENS`, `DEFAULT-EXTENSI`, `DEFAULT-EXTENSIO`, `DEFAULT-EXTENSION`, `DEFAULT-NOXL`, `DEFAULT-NOXLA`, `DEFAULT-NOXLAT`, `DEFAULT-NOXLATE`, `DEFAULT-VALUE`, `DEFAULT-WINDOW`, `DEFINE`, `DEFINE-USER-EVENT-MANAGER`, `DEFINED`, `DEL`, `DELE`, `DELEGATE`, `DELET`, `DELETE PROCEDURE`, `DELETE`, `DELETE-CHAR`, `DELETE-CHARA`, `DELETE-CHARAC`, `DELETE-CHARACT`, `DELETE-CHARACTE`, `DELETE-CHARACTER`, `DELETE-CURRENT-ROW`, `DELETE-LINE`, `DELETE-RESULT-LIST-ENTRY`, `DELETE-SELECTED-ROW`, `DELETE-SELECTED-ROWS`, `DELIMITER`, `DESC`, `DESCE`, `DESCEN`, `DESCEND`, `DESCENDI`, `DESCENDIN`, `DESCENDING`, `DESELECT-FOCUSED-ROW`, `DESELECT-ROWS`, `DESELECT-SELECTED-ROW`, `DESELECTION`, `DESTRUCTOR`, `DIALOG-BOX`, `DICT`, `DICTI`, `DICTIO`, `DICTION`, `DICTIONA`, `DICTIONAR`, `DICTIONARY`, `DIR`, `DISABLE`, `DISABLE-AUTO-ZAP`, `DISABLE-DUMP-TRIGGERS`, `DISABLE-LOAD-TRIGGERS`, `DISABLED`, `DISCON`, `DISCONN`, `DISCONNE`, `DISCONNEC`, `DISCONNECT`, `DISP`, `DISPL`, `DISPLA`, `DISPLAY`, `DISPLAY-MESSAGE`, `DISPLAY-T`, `DISPLAY-TY`, `DISPLAY-TYP`, `DISPLAY-TYPE`, `DISTINCT`, `DO`, `DOMAIN-DESCRIPTION`, `DOMAIN-NAME`, `DOMAIN-TYPE`, `DOS`, `DOUBLE`, `DOWN`, `DRAG-ENABLED`, `DROP`, `DROP-DOWN`, `DROP-DOWN-LIST`, `DROP-FILE-NOTIFY`, `DROP-TARGET`, `DS-CLOSE-CURSOR`, `DSLOG-MANAGER`, `DUMP`, `DYNAMIC`, `DYNAMIC-ENUM`, `DYNAMIC-FUNCTION`, `DYNAMIC-INVOKE`, `EACH`, `ECHO`, `EDGE`, `EDGE-`, `EDGE-C`, `EDGE-CH`, `EDGE-CHA`, `EDGE-CHAR`, `EDGE-CHARS`, `EDGE-P`, `EDGE-PI`, `EDGE-PIX`, `EDGE-PIXE`, `EDGE-PIXEL`, `EDGE-PIXELS`, `EDIT-CAN-PASTE`, `EDIT-CAN-UNDO`, `EDIT-CLEAR`, `EDIT-COPY`, `EDIT-CUT`, `EDIT-PASTE`, `EDIT-UNDO`, `EDITING`, `EDITOR`, `ELSE`, `EMPTY`, `EMPTY-TEMP-TABLE`, `ENABLE`, `ENABLED-FIELDS`, `ENCODE`, `ENCRYPT`, `ENCRYPT-AUDIT-MAC-KEY`, `ENCRYPTION-SALT`, `END`, `END-DOCUMENT`, `END-ELEMENT`, `END-EVENT-GROUP`, `END-FILE-DROP`, `END-KEY`, `END-MOVE`, `END-RESIZE`, `END-ROW-RESIZE`, `END-USER-PROMPT`, `ENDKEY`, `ENTERED`, `ENTITY-EXPANSION-LIMIT`, `ENTRY`, `ENUM`, `EQ`, `ERROR`, `ERROR-COL`, `ERROR-COLU`, `ERROR-COLUM`, `ERROR-COLUMN`, `ERROR-ROW`, `ERROR-STACK-TRACE`, `ERROR-STAT`, `ERROR-STATU`, `ERROR-STATUS`, `ESCAPE`, `ETIME`, `EVENT`, `EVENT-GROUP-ID`, `EVENT-PROCEDURE`, `EVENT-PROCEDURE-CONTEXT`, `EVENT-T`, `EVENT-TY`, `EVENT-TYP`, `EVENT-TYPE`, `EVENTS`, `EXCEPT`, `EXCLUSIVE`, `EXCLUSIVE-`, `EXCLUSIVE-ID`, `EXCLUSIVE-L`, `EXCLUSIVE-LO`, `EXCLUSIVE-LOC`, `EXCLUSIVE-LOCK`, `EXCLUSIVE-WEB-USER`, `EXECUTE`, `EXISTS`, `EXP`, `EXPAND`, `EXPANDABLE`, `EXPLICIT`, `EXPORT`, `EXPORT-PRINCIPAL`, `EXTENDED`, `EXTENT`, `EXTERNAL`, `FALSE`, `FETCH`, `FETCH-SELECTED-ROW`, `FGC`, `FGCO`, `FGCOL`, `FGCOLO`, `FGCOLOR`, `FIELD`, `FIELDS`, `FILE`, `FILE-CREATE-DATE`, `FILE-CREATE-TIME`, `FILE-INFO`, `FILE-INFOR`, `FILE-INFORM`, `FILE-INFORMA`, `FILE-INFORMAT`, `FILE-INFORMATI`, `FILE-INFORMATIO`, `FILE-INFORMATION`, `FILE-MOD-DATE`, `FILE-MOD-TIME`, `FILE-NAME`, `FILE-OFF`, `FILE-OFFS`, `FILE-OFFSE`, `FILE-OFFSET`, `FILE-SIZE`, `FILE-TYPE`, `FILENAME`, `FILL`, `FILL-IN`, `FILLED`, `FILTERS`, `FINAL`, `FINALLY`, `FIND`, `FIND-BY-ROWID`, `FIND-CASE-SENSITIVE`, `FIND-CURRENT`, `FIND-FIRST`, `FIND-GLOBAL`, `FIND-LAST`, `FIND-NEXT-OCCURRENCE`, `FIND-PREV-OCCURRENCE`, `FIND-SELECT`, `FIND-UNIQUE`, `FIND-WRAP-AROUND`, `FINDER`, `FIRST`, `FIRST-ASYNCH-REQUEST`, `FIRST-CHILD`, `FIRST-COLUMN`, `FIRST-FORM`, `FIRST-OBJECT`, `FIRST-OF`, `FIRST-PROC`, `FIRST-PROCE`, `FIRST-PROCED`, `FIRST-PROCEDU`, `FIRST-PROCEDUR`, `FIRST-PROCEDURE`, `FIRST-SERVER`, `FIRST-TAB-I`, `FIRST-TAB-IT`, `FIRST-TAB-ITE`, `FIRST-TAB-ITEM`, `FIT-LAST-COLUMN`, `FIXED-ONLY`, `FLAT-BUTTON`, `FLOAT`, `FOCUS`, `FOCUSED-ROW`, `FOCUSED-ROW-SELECTED`, `FONT`, `FONT-TABLE`, `FOR`, `FORCE-FILE`, `FORE`, `FOREG`, `FOREGR`, `FOREGRO`, `FOREGROU`, `FOREGROUN`, `FOREGROUND`, `FORM INPUT`, `FORM`, `FORM-LONG-INPUT`, `FORMA`, `FORMAT`, `FORMATTE`, `FORMATTED`, `FORWARD`, `FORWARDS`, `FRAGMEN`, `FRAGMENT`, `FRAM`, `FRAME`, `FRAME-COL`, `FRAME-DB`, `FRAME-DOWN`, `FRAME-FIELD`, `FRAME-FILE`, `FRAME-INDE`, `FRAME-INDEX`, `FRAME-LINE`, `FRAME-NAME`, `FRAME-ROW`, `FRAME-SPA`, `FRAME-SPAC`, `FRAME-SPACI`, `FRAME-SPACIN`, `FRAME-SPACING`, `FRAME-VAL`, `FRAME-VALU`, `FRAME-VALUE`, `FRAME-X`, `FRAME-Y`, `FREQUENCY`, `FROM`, `FROM-C`, `FROM-CH`, `FROM-CHA`, `FROM-CHAR`, `FROM-CHARS`, `FROM-CUR`, `FROM-CURR`, `FROM-CURRE`, `FROM-CURREN`, `FROM-CURRENT`, `FROM-P`, `FROM-PI`, `FROM-PIX`, `FROM-PIXE`, `FROM-PIXEL`, `FROM-PIXELS`, `FULL-HEIGHT`, `FULL-HEIGHT-`, `FULL-HEIGHT-C`, `FULL-HEIGHT-CH`, `FULL-HEIGHT-CHA`, `FULL-HEIGHT-CHAR`, `FULL-HEIGHT-CHARS`, `FULL-HEIGHT-P`, `FULL-HEIGHT-PI`, `FULL-HEIGHT-PIX`, `FULL-HEIGHT-PIXE`, `FULL-HEIGHT-PIXEL`, `FULL-HEIGHT-PIXELS`, `FULL-PATHN`, `FULL-PATHNA`, `FULL-PATHNAM`, `FULL-PATHNAME`, `FULL-WIDTH`, `FULL-WIDTH-`, `FULL-WIDTH-C`, `FULL-WIDTH-CH`, `FULL-WIDTH-CHA`, `FULL-WIDTH-CHAR`, `FULL-WIDTH-CHARS`, `FULL-WIDTH-P`, `FULL-WIDTH-PI`, `FULL-WIDTH-PIX`, `FULL-WIDTH-PIXE`, `FULL-WIDTH-PIXEL`, `FULL-WIDTH-PIXELS`, `FUNCTION`, `FUNCTION-CALL-TYPE`, `GATEWAY`, `GATEWAYS`, `GE`, `GENERATE-MD5`, `GENERATE-PBE-KEY`, `GENERATE-PBE-SALT`, `GENERATE-RANDOM-KEY`, `GENERATE-UUID`, `GET`, `GET-ATTR-CALL-TYPE`, `GET-ATTRIBUTE-NODE`, `GET-BINARY-DATA`, `GET-BLUE`, `GET-BLUE-`, `GET-BLUE-V`, `GET-BLUE-VA`, `GET-BLUE-VAL`, `GET-BLUE-VALU`, `GET-BLUE-VALUE`, `GET-BROWSE-COLUMN`, `GET-BUFFER-HANDLE`, `GET-BYTE`, `GET-CALLBACK-PROC-CONTEXT`, `GET-CALLBACK-PROC-NAME`, `GET-CGI-LIST`, `GET-CGI-LONG-VALUE`, `GET-CGI-VALUE`, `GET-CLASS`, `GET-CODEPAGES`, `GET-COLLATIONS`, `GET-CONFIG-VALUE`, `GET-CURRENT`, `GET-DOUBLE`, `GET-DROPPED-FILE`, `GET-DYNAMIC`, `GET-ERROR-COLUMN`, `GET-ERROR-ROW`, `GET-FILE`, `GET-FILE-NAME`, `GET-FILE-OFFSE`, `GET-FILE-OFFSET`, `GET-FIRST`, `GET-FLOAT`, `GET-GREEN`, `GET-GREEN-`, `GET-GREEN-V`, `GET-GREEN-VA`, `GET-GREEN-VAL`, `GET-GREEN-VALU`, `GET-GREEN-VALUE`, `GET-INDEX-BY-NAMESPACE-NAME`, `GET-INDEX-BY-QNAME`, `GET-INT64`, `GET-ITERATION`, `GET-KEY-VAL`, `GET-KEY-VALU`, `GET-KEY-VALUE`, `GET-LAST`, `GET-LOCALNAME-BY-INDEX`, `GET-LONG`, `GET-MESSAGE`, `GET-NEXT`, `GET-NUMBER`, `GET-POINTER-VALUE`, `GET-PREV`, `GET-PRINTERS`, `GET-PROPERTY`, `GET-QNAME-BY-INDEX`, `GET-RED`, `GET-RED-`, `GET-RED-V`, `GET-RED-VA`, `GET-RED-VAL`, `GET-RED-VALU`, `GET-RED-VALUE`, `GET-REPOSITIONED-ROW`, `GET-RGB-VALUE`, `GET-SELECTED`, `GET-SELECTED-`, `GET-SELECTED-W`, `GET-SELECTED-WI`, `GET-SELECTED-WID`, `GET-SELECTED-WIDG`, `GET-SELECTED-WIDGE`, `GET-SELECTED-WIDGET`, `GET-SHORT`, `GET-SIGNATURE`, `GET-SIZE`, `GET-STRING`, `GET-TAB-ITEM`, `GET-TEXT-HEIGHT`, `GET-TEXT-HEIGHT-`, `GET-TEXT-HEIGHT-C`, `GET-TEXT-HEIGHT-CH`, `GET-TEXT-HEIGHT-CHA`, `GET-TEXT-HEIGHT-CHAR`, `GET-TEXT-HEIGHT-CHARS`, `GET-TEXT-HEIGHT-P`, `GET-TEXT-HEIGHT-PI`, `GET-TEXT-HEIGHT-PIX`, `GET-TEXT-HEIGHT-PIXE`, `GET-TEXT-HEIGHT-PIXEL`, `GET-TEXT-HEIGHT-PIXELS`, `GET-TEXT-WIDTH`, `GET-TEXT-WIDTH-`, `GET-TEXT-WIDTH-C`, `GET-TEXT-WIDTH-CH`, `GET-TEXT-WIDTH-CHA`, `GET-TEXT-WIDTH-CHAR`, `GET-TEXT-WIDTH-CHARS`, `GET-TEXT-WIDTH-P`, `GET-TEXT-WIDTH-PI`, `GET-TEXT-WIDTH-PIX`, `GET-TEXT-WIDTH-PIXE`, `GET-TEXT-WIDTH-PIXEL`, `GET-TEXT-WIDTH-PIXELS`, `GET-TYPE-BY-INDEX`, `GET-TYPE-BY-NAMESPACE-NAME`, `GET-TYPE-BY-QNAME`, `GET-UNSIGNED-LONG`, `GET-UNSIGNED-SHORT`, `GET-URI-BY-INDEX`, `GET-VALUE-BY-INDEX`, `GET-VALUE-BY-NAMESPACE-NAME`, `GET-VALUE-BY-QNAME`, `GET-WAIT-STATE`, `GETBYTE`, `GLOBAL`, `GO-ON`, `GO-PEND`, `GO-PENDI`, `GO-PENDIN`, `GO-PENDING`, `GRANT`, `GRAPHIC-E`, `GRAPHIC-ED`, `GRAPHIC-EDG`, `GRAPHIC-EDGE`, `GRID-FACTOR-H`, `GRID-FACTOR-HO`, `GRID-FACTOR-HOR`, `GRID-FACTOR-HORI`, `GRID-FACTOR-HORIZ`, `GRID-FACTOR-HORIZO`, `GRID-FACTOR-HORIZON`, `GRID-FACTOR-HORIZONT`, `GRID-FACTOR-HORIZONTA`, `GRID-FACTOR-HORIZONTAL`, `GRID-FACTOR-V`, `GRID-FACTOR-VE`, `GRID-FACTOR-VER`, `GRID-FACTOR-VERT`, `GRID-FACTOR-VERTI`, `GRID-FACTOR-VERTIC`, `GRID-FACTOR-VERTICA`, `GRID-FACTOR-VERTICAL`, `GRID-SNAP`, `GRID-UNIT-HEIGHT`, `GRID-UNIT-HEIGHT-`, `GRID-UNIT-HEIGHT-C`, `GRID-UNIT-HEIGHT-CH`, `GRID-UNIT-HEIGHT-CHA`, `GRID-UNIT-HEIGHT-CHARS`, `GRID-UNIT-HEIGHT-P`, `GRID-UNIT-HEIGHT-PI`, `GRID-UNIT-HEIGHT-PIX`, `GRID-UNIT-HEIGHT-PIXE`, `GRID-UNIT-HEIGHT-PIXEL`, `GRID-UNIT-HEIGHT-PIXELS`, `GRID-UNIT-WIDTH`, `GRID-UNIT-WIDTH-`, `GRID-UNIT-WIDTH-C`, `GRID-UNIT-WIDTH-CH`, `GRID-UNIT-WIDTH-CHA`, `GRID-UNIT-WIDTH-CHAR`, `GRID-UNIT-WIDTH-CHARS`, `GRID-UNIT-WIDTH-P`, `GRID-UNIT-WIDTH-PI`, `GRID-UNIT-WIDTH-PIX`, `GRID-UNIT-WIDTH-PIXE`, `GRID-UNIT-WIDTH-PIXEL`, `GRID-UNIT-WIDTH-PIXELS`, `GRID-VISIBLE`, `GROUP`, `GT`, `GUID`, `HANDLE`, `HANDLER`, `HAS-RECORDS`, `HAVING`, `HEADER`, `HEIGHT`, `HEIGHT-`, `HEIGHT-C`, `HEIGHT-CH`, `HEIGHT-CHA`, `HEIGHT-CHAR`, `HEIGHT-CHARS`, `HEIGHT-P`, `HEIGHT-PI`, `HEIGHT-PIX`, `HEIGHT-PIXE`, `HEIGHT-PIXEL`, `HEIGHT-PIXELS`, `HELP`, `HEX-DECODE`, `HEX-ENCODE`, `HIDDEN`, `HIDE`, `HORI`, `HORIZ`, `HORIZO`, `HORIZON`, `HORIZONT`, `HORIZONTA`, `HORIZONTAL`, `HOST-BYTE-ORDER`, `HTML-CHARSET`, `HTML-END-OF-LINE`, `HTML-END-OF-PAGE`, `HTML-FRAME-BEGIN`, `HTML-FRAME-END`, `HTML-HEADER-BEGIN`, `HTML-HEADER-END`, `HTML-TITLE-BEGIN`, `HTML-TITLE-END`, `HWND`, `ICON`, `IF`, `IMAGE`, `IMAGE-DOWN`, `IMAGE-INSENSITIVE`, `IMAGE-SIZE`, `IMAGE-SIZE-C`, `IMAGE-SIZE-CH`, `IMAGE-SIZE-CHA`, `IMAGE-SIZE-CHAR`, `IMAGE-SIZE-CHARS`, `IMAGE-SIZE-P`, `IMAGE-SIZE-PI`, `IMAGE-SIZE-PIX`, `IMAGE-SIZE-PIXE`, `IMAGE-SIZE-PIXEL`, `IMAGE-SIZE-PIXELS`, `IMAGE-UP`, `IMMEDIATE-DISPLAY`, `IMPLEMENTS`, `IMPORT`, `IMPORT-PRINCIPAL`, `IN`, `IN-HANDLE`, `INCREMENT-EXCLUSIVE-ID`, `INDEX`, `INDEX-HINT`, `INDEX-INFORMATION`, `INDEXED-REPOSITION`, `INDICATOR`, `INFO`, `INFOR`, `INFORM`, `INFORMA`, `INFORMAT`, `INFORMATI`, `INFORMATIO`, `INFORMATION`, `INHERIT-BGC`, `INHERIT-BGCO`, `INHERIT-BGCOL`, `INHERIT-BGCOLO`, `INHERIT-BGCOLOR`, `INHERIT-FGC`, `INHERIT-FGCO`, `INHERIT-FGCOL`, `INHERIT-FGCOLO`, `INHERIT-FGCOLOR`, `INHERITS`, `INIT`, `INITI`, `INITIA`, `INITIAL`, `INITIAL-DIR`, `INITIAL-FILTER`, `INITIALIZE-DOCUMENT-TYPE`, `INITIATE`, `INNER-CHARS`, `INNER-LINES`, `INPUT`, `INPUT-O`, `INPUT-OU`, `INPUT-OUT`, `INPUT-OUTP`, `INPUT-OUTPU`, `INPUT-OUTPUT`, `INPUT-VALUE`, `INSERT`, `INSERT-ATTRIBUTE`, `INSERT-B`, `INSERT-BA`, `INSERT-BAC`, `INSERT-BACK`, `INSERT-BACKT`, `INSERT-BACKTA`, `INSERT-BACKTAB`, `INSERT-FILE`, `INSERT-ROW`, `INSERT-STRING`, `INSERT-T`, `INSERT-TA`, `INSERT-TAB`, `INT64`, `INT`, `INTEGER`, `INTERFACE`, `INTERNAL-ENTRIES`, `INTO`, `INVOKE`, `IS`, `IS-ATTR`, `IS-ATTR-`, `IS-ATTR-S`, `IS-ATTR-SP`, `IS-ATTR-SPA`, `IS-ATTR-SPAC`, `IS-ATTR-SPACE`, `IS-CLASS`, `IS-JSON`, `IS-LEAD-BYTE`, `IS-OPEN`, `IS-PARAMETER-SET`, `IS-PARTITIONED`, `IS-ROW-SELECTED`, `IS-SELECTED`, `IS-XML`, `ITEM`, `ITEMS-PER-ROW`, `JOIN`, `JOIN-BY-SQLDB`, `KBLABEL`, `KEEP-CONNECTION-OPEN`, `KEEP-FRAME-Z`, `KEEP-FRAME-Z-`, `KEEP-FRAME-Z-O`, `KEEP-FRAME-Z-OR`, `KEEP-FRAME-Z-ORD`, `KEEP-FRAME-Z-ORDE`, `KEEP-FRAME-Z-ORDER`, `KEEP-MESSAGES`, `KEEP-SECURITY-CACHE`, `KEEP-TAB-ORDER`, `KEY`, `KEY-CODE`, `KEY-FUNC`, `KEY-FUNCT`, `KEY-FUNCTI`, `KEY-FUNCTIO`, `KEY-FUNCTION`, `KEY-LABEL`, `KEYCODE`, `KEYFUNC`, `KEYFUNCT`, `KEYFUNCTI`, `KEYFUNCTIO`, `KEYFUNCTION`, `KEYLABEL`, `KEYS`, `KEYWORD`, `KEYWORD-ALL`, `LABEL`, `LABEL-BGC`, `LABEL-BGCO`, `LABEL-BGCOL`, `LABEL-BGCOLO`, `LABEL-BGCOLOR`, `LABEL-DC`, `LABEL-DCO`, `LABEL-DCOL`, `LABEL-DCOLO`, `LABEL-DCOLOR`, `LABEL-FGC`, `LABEL-FGCO`, `LABEL-FGCOL`, `LABEL-FGCOLO`, `LABEL-FGCOLOR`, `LABEL-FONT`, `LABEL-PFC`, `LABEL-PFCO`, `LABEL-PFCOL`, `LABEL-PFCOLO`, `LABEL-PFCOLOR`, `LABELS`, `LABELS-HAVE-COLONS`, `LANDSCAPE`, `LANGUAGE`, `LANGUAGES`, `LARGE`, `LARGE-TO-SMALL`, `LAST`, `LAST-ASYNCH-REQUEST`, `LAST-BATCH`, `LAST-CHILD`, `LAST-EVEN`, `LAST-EVENT`, `LAST-FORM`, `LAST-KEY`, `LAST-OBJECT`, `LAST-OF`, `LAST-PROCE`, `LAST-PROCED`, `LAST-PROCEDU`, `LAST-PROCEDUR`, `LAST-PROCEDURE`, `LAST-SERVER`, `LAST-TAB-I`, `LAST-TAB-IT`, `LAST-TAB-ITE`, `LAST-TAB-ITEM`, `LASTKEY`, `LC`, `LDBNAME`, `LE`, `LEAVE`, `LEFT-ALIGN`, `LEFT-ALIGNE`, `LEFT-ALIGNED`, `LEFT-TRIM`, `LENGTH`, `LIBRARY`, `LIKE`, `LIKE-SEQUENTIAL`, `LINE`, `LINE-COUNT`, `LINE-COUNTE`, `LINE-COUNTER`, `LIST-EVENTS`, `LIST-ITEM-PAIRS`, `LIST-ITEMS`, `LIST-PROPERTY-NAMES`, `LIST-QUERY-ATTRS`, `LIST-SET-ATTRS`, `LIST-WIDGETS`, `LISTI`, `LISTIN`, `LISTING`, `LITERAL-QUESTION`, `LITTLE-ENDIAN`, `LOAD`, `LOAD-DOMAINS`, `LOAD-ICON`, `LOAD-IMAGE`, `LOAD-IMAGE-DOWN`, `LOAD-IMAGE-INSENSITIVE`, `LOAD-IMAGE-UP`, `LOAD-MOUSE-P`, `LOAD-MOUSE-PO`, `LOAD-MOUSE-POI`, `LOAD-MOUSE-POIN`, `LOAD-MOUSE-POINT`, `LOAD-MOUSE-POINTE`, `LOAD-MOUSE-POINTER`, `LOAD-PICTURE`, `LOAD-SMALL-ICON`, `LOCAL-NAME`, `LOCAL-VERSION-INFO`, `LOCATOR-COLUMN-NUMBER`, `LOCATOR-LINE-NUMBER`, `LOCATOR-PUBLIC-ID`, `LOCATOR-SYSTEM-ID`, `LOCATOR-TYPE`, `LOCK-REGISTRATION`, `LOCKED`, `LOG`, `LOG-AUDIT-EVENT`, `LOG-MANAGER`, `LOGICAL`, `LOGIN-EXPIRATION-TIMESTAMP`, `LOGIN-HOST`, `LOGIN-STATE`, `LOGOUT`, `LONGCHAR`, `LOOKAHEAD`, `LOOKUP`, `LT`, `MACHINE-CLASS`, `MANDATORY`, `MANUAL-HIGHLIGHT`, `MAP`, `MARGIN-EXTRA`, `MARGIN-HEIGHT`, `MARGIN-HEIGHT-`, `MARGIN-HEIGHT-C`, `MARGIN-HEIGHT-CH`, `MARGIN-HEIGHT-CHA`, `MARGIN-HEIGHT-CHAR`, `MARGIN-HEIGHT-CHARS`, `MARGIN-HEIGHT-P`, `MARGIN-HEIGHT-PI`, `MARGIN-HEIGHT-PIX`, `MARGIN-HEIGHT-PIXE`, `MARGIN-HEIGHT-PIXEL`, `MARGIN-HEIGHT-PIXELS`, `MARGIN-WIDTH`, `MARGIN-WIDTH-`, `MARGIN-WIDTH-C`, `MARGIN-WIDTH-CH`, `MARGIN-WIDTH-CHA`, `MARGIN-WIDTH-CHAR`, `MARGIN-WIDTH-CHARS`, `MARGIN-WIDTH-P`, `MARGIN-WIDTH-PI`, `MARGIN-WIDTH-PIX`, `MARGIN-WIDTH-PIXE`, `MARGIN-WIDTH-PIXEL`, `MARGIN-WIDTH-PIXELS`, `MARK-NEW`, `MARK-ROW-STATE`, `MATCHES`, `MAX`, `MAX-BUTTON`, `MAX-CHARS`, `MAX-DATA-GUESS`, `MAX-HEIGHT`, `MAX-HEIGHT-C`, `MAX-HEIGHT-CH`, `MAX-HEIGHT-CHA`, `MAX-HEIGHT-CHAR`, `MAX-HEIGHT-CHARS`, `MAX-HEIGHT-P`, `MAX-HEIGHT-PI`, `MAX-HEIGHT-PIX`, `MAX-HEIGHT-PIXE`, `MAX-HEIGHT-PIXEL`, `MAX-HEIGHT-PIXELS`, `MAX-ROWS`, `MAX-SIZE`, `MAX-VAL`, `MAX-VALU`, `MAX-VALUE`, `MAX-WIDTH`, `MAX-WIDTH-`, `MAX-WIDTH-C`, `MAX-WIDTH-CH`, `MAX-WIDTH-CHA`, `MAX-WIDTH-CHAR`, `MAX-WIDTH-CHARS`, `MAX-WIDTH-P`, `MAX-WIDTH-PI`, `MAX-WIDTH-PIX`, `MAX-WIDTH-PIXE`, `MAX-WIDTH-PIXEL`, `MAX-WIDTH-PIXELS`, `MAXI`, `MAXIM`, `MAXIMIZE`, `MAXIMU`, `MAXIMUM`, `MAXIMUM-LEVEL`, `MD5-DIGEST`, `MEMBER`, `MEMPTR-TO-NODE-VALUE`, `MENU`, `MENU-BAR`, `MENU-ITEM`, `MENU-K`, `MENU-KE`, `MENU-KEY`, `MENU-M`, `MENU-MO`, `MENU-MOU`, `MENU-MOUS`, `MENU-MOUSE`, `MENUBAR`, `MERGE-BY-FIELD`, `MESSAGE`, `MESSAGE-AREA`, `MESSAGE-AREA-FONT`, `MESSAGE-LINES`, `METHOD`, `MIN`, `MIN-BUTTON`, `MIN-COLUMN-WIDTH-C`, `MIN-COLUMN-WIDTH-CH`, `MIN-COLUMN-WIDTH-CHA`, `MIN-COLUMN-WIDTH-CHAR`, `MIN-COLUMN-WIDTH-CHARS`, `MIN-COLUMN-WIDTH-P`, `MIN-COLUMN-WIDTH-PI`, `MIN-COLUMN-WIDTH-PIX`, `MIN-COLUMN-WIDTH-PIXE`, `MIN-COLUMN-WIDTH-PIXEL`, `MIN-COLUMN-WIDTH-PIXELS`, `MIN-HEIGHT`, `MIN-HEIGHT-`, `MIN-HEIGHT-C`, `MIN-HEIGHT-CH`, `MIN-HEIGHT-CHA`, `MIN-HEIGHT-CHAR`, `MIN-HEIGHT-CHARS`, `MIN-HEIGHT-P`, `MIN-HEIGHT-PI`, `MIN-HEIGHT-PIX`, `MIN-HEIGHT-PIXE`, `MIN-HEIGHT-PIXEL`, `MIN-HEIGHT-PIXELS`, `MIN-SIZE`, `MIN-VAL`, `MIN-VALU`, `MIN-VALUE`, `MIN-WIDTH`, `MIN-WIDTH-`, `MIN-WIDTH-C`, `MIN-WIDTH-CH`, `MIN-WIDTH-CHA`, `MIN-WIDTH-CHAR`, `MIN-WIDTH-CHARS`, `MIN-WIDTH-P`, `MIN-WIDTH-PI`, `MIN-WIDTH-PIX`, `MIN-WIDTH-PIXE`, `MIN-WIDTH-PIXEL`, `MIN-WIDTH-PIXELS`, `MINI`, `MINIM`, `MINIMU`, `MINIMUM`, `MOD`, `MODIFIED`, `MODU`, `MODUL`, `MODULO`, `MONTH`, `MOUSE`, `MOUSE-P`, `MOUSE-PO`, `MOUSE-POI`, `MOUSE-POIN`, `MOUSE-POINT`, `MOUSE-POINTE`, `MOUSE-POINTER`, `MOVABLE`, `MOVE-AFTER`, `MOVE-AFTER-`, `MOVE-AFTER-T`, `MOVE-AFTER-TA`, `MOVE-AFTER-TAB`, `MOVE-AFTER-TAB-`, `MOVE-AFTER-TAB-I`, `MOVE-AFTER-TAB-IT`, `MOVE-AFTER-TAB-ITE`, `MOVE-AFTER-TAB-ITEM`, `MOVE-BEFOR`, `MOVE-BEFORE`, `MOVE-BEFORE-`, `MOVE-BEFORE-T`, `MOVE-BEFORE-TA`, `MOVE-BEFORE-TAB`, `MOVE-BEFORE-TAB-`, `MOVE-BEFORE-TAB-I`, `MOVE-BEFORE-TAB-IT`, `MOVE-BEFORE-TAB-ITE`, `MOVE-BEFORE-TAB-ITEM`, `MOVE-COL`, `MOVE-COLU`, `MOVE-COLUM`, `MOVE-COLUMN`, `MOVE-TO-B`, `MOVE-TO-BO`, `MOVE-TO-BOT`, `MOVE-TO-BOTT`, `MOVE-TO-BOTTO`, `MOVE-TO-BOTTOM`, `MOVE-TO-EOF`, `MOVE-TO-T`, `MOVE-TO-TO`, `MOVE-TO-TOP`, `MPE`, `MTIME`, `MULTI-COMPILE`, `MULTIPLE`, `MULTIPLE-KEY`, `MULTITASKING-INTERVAL`, `MUST-EXIST`, `NAME`, `NAMESPACE-PREFIX`, `NAMESPACE-URI`, `NATIVE`, `NE`, `NEEDS-APPSERVER-PROMPT`, `NEEDS-PROMPT`, `NEW`, `NEW-INSTANCE`, `NEW-ROW`, `NEXT`, `NEXT-COLUMN`, `NEXT-PROMPT`, `NEXT-ROWID`, `NEXT-SIBLING`, `NEXT-TAB-I`, `NEXT-TAB-IT`, `NEXT-TAB-ITE`, `NEXT-TAB-ITEM`, `NEXT-VALUE`, `NO`, `NO-APPLY`, `NO-ARRAY-MESSAGE`, `NO-ASSIGN`, `NO-ATTR`, `NO-ATTR-`, `NO-ATTR-L`, `NO-ATTR-LI`, `NO-ATTR-LIS`, `NO-ATTR-LIST`, `NO-ATTR-S`, `NO-ATTR-SP`, `NO-ATTR-SPA`, `NO-ATTR-SPAC`, `NO-ATTR-SPACE`, `NO-AUTO-VALIDATE`, `NO-BIND-WHERE`, `NO-BOX`, `NO-CONSOLE`, `NO-CONVERT`, `NO-CONVERT-3D-COLORS`, `NO-CURRENT-VALUE`, `NO-DEBUG`, `NO-DRAG`, `NO-ECHO`, `NO-EMPTY-SPACE`, `NO-ERROR`, `NO-F`, `NO-FI`, `NO-FIL`, `NO-FILL`, `NO-FOCUS`, `NO-HELP`, `NO-HIDE`, `NO-INDEX-HINT`, `NO-INHERIT-BGC`, `NO-INHERIT-BGCO`, `NO-INHERIT-BGCOLOR`, `NO-INHERIT-FGC`, `NO-INHERIT-FGCO`, `NO-INHERIT-FGCOL`, `NO-INHERIT-FGCOLO`, `NO-INHERIT-FGCOLOR`, `NO-JOIN-BY-SQLDB`, `NO-LABE`, `NO-LABELS`, `NO-LOBS`, `NO-LOCK`, `NO-LOOKAHEAD`, `NO-MAP`, `NO-MES`, `NO-MESS`, `NO-MESSA`, `NO-MESSAG`, `NO-MESSAGE`, `NO-PAUSE`, `NO-PREFE`, `NO-PREFET`, `NO-PREFETC`, `NO-PREFETCH`, `NO-ROW-MARKERS`, `NO-SCROLLBAR-VERTICAL`, `NO-SEPARATE-CONNECTION`, `NO-SEPARATORS`, `NO-TAB-STOP`, `NO-UND`, `NO-UNDE`, `NO-UNDER`, `NO-UNDERL`, `NO-UNDERLI`, `NO-UNDERLIN`, `NO-UNDERLINE`, `NO-UNDO`, `NO-VAL`, `NO-VALI`, `NO-VALID`, `NO-VALIDA`, `NO-VALIDAT`, `NO-VALIDATE`, `NO-WAIT`, `NO-WORD-WRAP`, `NODE-VALUE-TO-MEMPTR`, `NONAMESPACE-SCHEMA-LOCATION`, `NONE`, `NORMALIZE`, `NOT`, `NOT-ACTIVE`, `NOW`, `NULL`, `NUM-ALI`, `NUM-ALIA`, `NUM-ALIAS`, `NUM-ALIASE`, `NUM-ALIASES`, `NUM-BUFFERS`, `NUM-BUT`, `NUM-BUTT`, `NUM-BUTTO`, `NUM-BUTTON`, `NUM-BUTTONS`, `NUM-COL`, `NUM-COLU`, `NUM-COLUM`, `NUM-COLUMN`, `NUM-COLUMNS`, `NUM-COPIES`, `NUM-DBS`, `NUM-DROPPED-FILES`, `NUM-ENTRIES`, `NUM-FIELDS`, `NUM-FORMATS`, `NUM-ITEMS`, `NUM-ITERATIONS`, `NUM-LINES`, `NUM-LOCKED-COL`, `NUM-LOCKED-COLU`, `NUM-LOCKED-COLUM`, `NUM-LOCKED-COLUMN`, `NUM-LOCKED-COLUMNS`, `NUM-MESSAGES`, `NUM-PARAMETERS`, `NUM-REFERENCES`, `NUM-REPLACED`, `NUM-RESULTS`, `NUM-SELECTED`, `NUM-SELECTED-`, `NUM-SELECTED-ROWS`, `NUM-SELECTED-W`, `NUM-SELECTED-WI`, `NUM-SELECTED-WID`, `NUM-SELECTED-WIDG`, `NUM-SELECTED-WIDGE`, `NUM-SELECTED-WIDGET`, `NUM-SELECTED-WIDGETS`, `NUM-TABS`, `NUM-TO-RETAIN`, `NUM-VISIBLE-COLUMNS`, `NUMERIC`, `NUMERIC-F`, `NUMERIC-FO`, `NUMERIC-FOR`, `NUMERIC-FORM`, `NUMERIC-FORMA`, `NUMERIC-FORMAT`, `OCTET-LENGTH`, `OF`, `OFF`, `OK`, `OK-CANCEL`, `OLD`, `ON`, `ON-FRAME`, `ON-FRAME-`, `ON-FRAME-B`, `ON-FRAME-BO`, `ON-FRAME-BOR`, `ON-FRAME-BORD`, `ON-FRAME-BORDE`, `ON-FRAME-BORDER`, `OPEN`, `OPSYS`, `OPTION`, `OR`, `ORDERED-JOIN`, `ORDINAL`, `OS-APPEND`, `OS-COMMAND`, `OS-COPY`, `OS-CREATE-DIR`, `OS-DELETE`, `OS-DIR`, `OS-DRIVE`, `OS-DRIVES`, `OS-ERROR`, `OS-GETENV`, `OS-RENAME`, `OTHERWISE`, `OUTPUT`, `OVERLAY`, `OVERRIDE`, `OWNER`, `PAGE`, `PAGE-BOT`, `PAGE-BOTT`, `PAGE-BOTTO`, `PAGE-BOTTOM`, `PAGE-NUM`, `PAGE-NUMB`, `PAGE-NUMBE`, `PAGE-NUMBER`, `PAGE-SIZE`, `PAGE-TOP`, `PAGE-WID`, `PAGE-WIDT`, `PAGE-WIDTH`, `PAGED`, `PARAM`, `PARAME`, `PARAMET`, `PARAMETE`, `PARAMETER`, `PARENT`, `PARSE-STATUS`, `PARTIAL-KEY`, `PASCAL`, `PASSWORD-FIELD`, `PATHNAME`, `PAUSE`, `PBE-HASH-ALG`, `PBE-HASH-ALGO`, `PBE-HASH-ALGOR`, `PBE-HASH-ALGORI`, `PBE-HASH-ALGORIT`, `PBE-HASH-ALGORITH`, `PBE-HASH-ALGORITHM`, `PBE-KEY-ROUNDS`, `PDBNAME`, `PERSIST`, `PERSISTE`, `PERSISTEN`, `PERSISTENT`, `PERSISTENT-CACHE-DISABLED`, `PFC`, `PFCO`, `PFCOL`, `PFCOLO`, `PFCOLOR`, `PIXELS`, `PIXELS-PER-COL`, `PIXELS-PER-COLU`, `PIXELS-PER-COLUM`, `PIXELS-PER-COLUMN`, `PIXELS-PER-ROW`, `POPUP-M`, `POPUP-ME`, `POPUP-MEN`, `POPUP-MENU`, `POPUP-O`, `POPUP-ON`, `POPUP-ONL`, `POPUP-ONLY`, `PORTRAIT`, `POSITION`, `PRECISION`, `PREFER-DATASET`, `PREPARE-STRING`, `PREPARED`, `PREPROC`, `PREPROCE`, `PREPROCES`, `PREPROCESS`, `PRESEL`, `PRESELE`, `PRESELEC`, `PRESELECT`, `PREV`, `PREV-COLUMN`, `PREV-SIBLING`, `PREV-TAB-I`, `PREV-TAB-IT`, `PREV-TAB-ITE`, `PREV-TAB-ITEM`, `PRIMARY`, `PRINTER`, `PRINTER-CONTROL-HANDLE`, `PRINTER-HDC`, `PRINTER-NAME`, `PRINTER-PORT`, `PRINTER-SETUP`, `PRIVATE`, `PRIVATE-D`, `PRIVATE-DA`, `PRIVATE-DAT`, `PRIVATE-DATA`, `PRIVILEGES`, `PROC-HA`, `PROC-HAN`, `PROC-HAND`, `PROC-HANDL`, `PROC-HANDLE`, `PROC-ST`, `PROC-STA`, `PROC-STAT`, `PROC-STATU`, `PROC-STATUS`, `PROC-TEXT`, `PROC-TEXT-BUFFER`, `PROCE`, `PROCED`, `PROCEDU`, `PROCEDUR`, `PROCEDURE`, `PROCEDURE-CALL-TYPE`, `PROCEDURE-TYPE`, `PROCESS`, `PROFILER`, `PROGRAM-NAME`, `PROGRESS`, `PROGRESS-S`, `PROGRESS-SO`, `PROGRESS-SOU`, `PROGRESS-SOUR`, `PROGRESS-SOURC`, `PROGRESS-SOURCE`, `PROMPT`, `PROMPT-F`, `PROMPT-FO`, `PROMPT-FOR`, `PROMSGS`, `PROPATH`, `PROPERTY`, `PROTECTED`, `PROVERS`, `PROVERSI`, `PROVERSIO`, `PROVERSION`, `PROXY`, `PROXY-PASSWORD`, `PROXY-USERID`, `PUBLIC`, `PUBLIC-ID`, `PUBLISH`, `PUBLISHED-EVENTS`, `PUT`, `PUT-BYTE`, `PUT-DOUBLE`, `PUT-FLOAT`, `PUT-INT64`, `PUT-KEY-VAL`, `PUT-KEY-VALU`, `PUT-KEY-VALUE`, `PUT-LONG`, `PUT-SHORT`, `PUT-STRING`, `PUT-UNSIGNED-LONG`, `PUTBYTE`, `QUERY`, `QUERY-CLOSE`, `QUERY-OFF-END`, `QUERY-OPEN`, `QUERY-PREPARE`, `QUERY-TUNING`, `QUESTION`, `QUIT`, `QUOTER`, `R-INDEX`, `RADIO-BUTTONS`, `RADIO-SET`, `RANDOM`, `RAW`, `RAW-TRANSFER`, `RCODE-INFO`, `RCODE-INFOR`, `RCODE-INFORM`, `RCODE-INFORMA`, `RCODE-INFORMAT`, `RCODE-INFORMATI`, `RCODE-INFORMATIO`, `RCODE-INFORMATION`, `READ-AVAILABLE`, `READ-EXACT-NUM`, `READ-FILE`, `READ-JSON`, `READ-ONLY`, `READ-XML`, `READ-XMLSCHEMA`, `READKEY`, `REAL`, `RECID`, `RECORD-LENGTH`, `RECT`, `RECTA`, `RECTAN`, `RECTANG`, `RECTANGL`, `RECTANGLE`, `RECURSIVE`, `REFERENCE-ONLY`, `REFRESH`, `REFRESH-AUDIT-POLICY`, `REFRESHABLE`, `REGISTER-DOMAIN`, `RELEASE`, `REMOTE`, `REMOVE-EVENTS-PROCEDURE`, `REMOVE-SUPER-PROCEDURE`, `REPEAT`, `REPLACE`, `REPLACE-SELECTION-TEXT`, `REPOSITION`, `REPOSITION-BACKWARD`, `REPOSITION-FORWARD`, `REPOSITION-MODE`, `REPOSITION-TO-ROW`, `REPOSITION-TO-ROWID`, `REQUEST`, `REQUEST-INFO`, `RESET`, `RESIZA`, `RESIZAB`, `RESIZABL`, `RESIZABLE`, `RESIZE`, `RESPONSE-INFO`, `RESTART-ROW`, `RESTART-ROWID`, `RETAIN`, `RETAIN-SHAPE`, `RETRY`, `RETRY-CANCEL`, `RETURN`, `RETURN-ALIGN`, `RETURN-ALIGNE`, `RETURN-INS`, `RETURN-INSE`, `RETURN-INSER`, `RETURN-INSERT`, `RETURN-INSERTE`, `RETURN-INSERTED`, `RETURN-TO-START-DI`, `RETURN-TO-START-DIR`, `RETURN-VAL`, `RETURN-VALU`, `RETURN-VALUE`, `RETURN-VALUE-DATA-TYPE`, `RETURNS`, `REVERSE-FROM`, `REVERT`, `REVOKE`, `RGB-VALUE`, `RIGHT-ALIGNED`, `RIGHT-TRIM`, `ROLES`, `ROUND`, `ROUTINE-LEVEL`, `ROW`, `ROW-HEIGHT-CHARS`, `ROW-HEIGHT-PIXELS`, `ROW-MARKERS`, `ROW-OF`, `ROW-RESIZABLE`, `ROWID`, `RULE`, `RUN`, `RUN-PROCEDURE`, `SAVE CACHE`, `SAVE`, `SAVE-AS`, `SAVE-FILE`, `SAX-COMPLE`, `SAX-COMPLET`, `SAX-COMPLETE`, `SAX-PARSE`, `SAX-PARSE-FIRST`, `SAX-PARSE-NEXT`, `SAX-PARSER-ERROR`, `SAX-RUNNING`, `SAX-UNINITIALIZED`, `SAX-WRITE-BEGIN`, `SAX-WRITE-COMPLETE`, `SAX-WRITE-CONTENT`, `SAX-WRITE-ELEMENT`, `SAX-WRITE-ERROR`, `SAX-WRITE-IDLE`, `SAX-WRITE-TAG`, `SAX-WRITER`, `SCHEMA`, `SCHEMA-LOCATION`, `SCHEMA-MARSHAL`, `SCHEMA-PATH`, `SCREEN`, `SCREEN-IO`, `SCREEN-LINES`, `SCREEN-VAL`, `SCREEN-VALU`, `SCREEN-VALUE`, `SCROLL`, `SCROLL-BARS`, `SCROLL-DELTA`, `SCROLL-OFFSET`, `SCROLL-TO-CURRENT-ROW`, `SCROLL-TO-I`, `SCROLL-TO-IT`, `SCROLL-TO-ITE`, `SCROLL-TO-ITEM`, `SCROLL-TO-SELECTED-ROW`, `SCROLLABLE`, `SCROLLBAR-H`, `SCROLLBAR-HO`, `SCROLLBAR-HOR`, `SCROLLBAR-HORI`, `SCROLLBAR-HORIZ`, `SCROLLBAR-HORIZO`, `SCROLLBAR-HORIZON`, `SCROLLBAR-HORIZONT`, `SCROLLBAR-HORIZONTA`, `SCROLLBAR-HORIZONTAL`, `SCROLLBAR-V`, `SCROLLBAR-VE`, `SCROLLBAR-VER`, `SCROLLBAR-VERT`, `SCROLLBAR-VERTI`, `SCROLLBAR-VERTIC`, `SCROLLBAR-VERTICA`, `SCROLLBAR-VERTICAL`, `SCROLLED-ROW-POS`, `SCROLLED-ROW-POSI`, `SCROLLED-ROW-POSIT`, `SCROLLED-ROW-POSITI`, `SCROLLED-ROW-POSITIO`, `SCROLLED-ROW-POSITION`, `SCROLLING`, `SDBNAME`, `SEAL`, `SEAL-TIMESTAMP`, `SEARCH`, `SEARCH-SELF`, `SEARCH-TARGET`, `SECTION`, `SECURITY-POLICY`, `SEEK`, `SELECT`, `SELECT-ALL`, `SELECT-FOCUSED-ROW`, `SELECT-NEXT-ROW`, `SELECT-PREV-ROW`, `SELECT-ROW`, `SELECTABLE`, `SELECTED`, `SELECTION`, `SELECTION-END`, `SELECTION-LIST`, `SELECTION-START`, `SELECTION-TEXT`, `SELF`, `SEND`, `SEND-SQL-STATEMENT`, `SENSITIVE`, `SEPARATE-CONNECTION`, `SEPARATOR-FGCOLOR`, `SEPARATORS`, `SERIALIZABLE`, `SERIALIZE-HIDDEN`, `SERIALIZE-NAME`, `SERVER`, `SERVER-CONNECTION-BOUND`, `SERVER-CONNECTION-BOUND-REQUEST`, `SERVER-CONNECTION-CONTEXT`, `SERVER-CONNECTION-ID`, `SERVER-OPERATING-MODE`, `SESSION`, `SESSION-ID`, `SET`, `SET-APPL-CONTEXT`, `SET-ATTR-CALL-TYPE`, `SET-ATTRIBUTE-NODE`, `SET-BLUE`, `SET-BLUE-`, `SET-BLUE-V`, `SET-BLUE-VA`, `SET-BLUE-VAL`, `SET-BLUE-VALU`, `SET-BLUE-VALUE`, `SET-BREAK`, `SET-BUFFERS`, `SET-CALLBACK`, `SET-CLIENT`, `SET-COMMIT`, `SET-CONTENTS`, `SET-CURRENT-VALUE`, `SET-DB-CLIENT`, `SET-DYNAMIC`, `SET-EVENT-MANAGER-OPTION`, `SET-GREEN`, `SET-GREEN-`, `SET-GREEN-V`, `SET-GREEN-VA`, `SET-GREEN-VAL`, `SET-GREEN-VALU`, `SET-GREEN-VALUE`, `SET-INPUT-SOURCE`, `SET-OPTION`, `SET-OUTPUT-DESTINATION`, `SET-PARAMETER`, `SET-POINTER-VALUE`, `SET-PROPERTY`, `SET-RED`, `SET-RED-`, `SET-RED-V`, `SET-RED-VA`, `SET-RED-VAL`, `SET-RED-VALU`, `SET-RED-VALUE`, `SET-REPOSITIONED-ROW`, `SET-RGB-VALUE`, `SET-ROLLBACK`, `SET-SELECTION`, `SET-SIZE`, `SET-SORT-ARROW`, `SET-WAIT-STATE`, `SETUSER`, `SETUSERI`, `SETUSERID`, `SHA1-DIGEST`, `SHARE`, `SHARE-`, `SHARE-L`, `SHARE-LO`, `SHARE-LOC`, `SHARE-LOCK`, `SHARED`, `SHOW-IN-TASKBAR`, `SHOW-STAT`, `SHOW-STATS`, `SIDE-LAB`, `SIDE-LABE`, `SIDE-LABEL`, `SIDE-LABEL-H`, `SIDE-LABEL-HA`, `SIDE-LABEL-HAN`, `SIDE-LABEL-HAND`, `SIDE-LABEL-HANDL`, `SIDE-LABEL-HANDLE`, `SIDE-LABELS`, `SIGNATURE`, `SILENT`, `SIMPLE`, `SINGLE`, `SINGLE-RUN`, `SINGLETON`, `SIZE`, `SIZE-C`, `SIZE-CH`, `SIZE-CHA`, `SIZE-CHAR`, `SIZE-CHARS`, `SIZE-P`, `SIZE-PI`, `SIZE-PIX`, `SIZE-PIXE`, `SIZE-PIXEL`, `SIZE-PIXELS`, `SKIP`, `SKIP-DELETED-RECORD`, `SLIDER`, `SMALL-ICON`, `SMALL-TITLE`, `SMALLINT`, `SOME`, `SORT`, `SORT-ASCENDING`, `SORT-NUMBER`, `SOURCE`, `SOURCE-PROCEDURE`, `SPACE`, `SQL`, `SQRT`, `SSL-SERVER-NAME`, `STANDALONE`, `START`, `START-DOCUMENT`, `START-ELEMENT`, `START-MOVE`, `START-RESIZE`, `START-ROW-RESIZE`, `STATE-DETAIL`, `STATIC`, `STATUS`, `STATUS-AREA`, `STATUS-AREA-FONT`, `STDCALL`, `STOP`, `STOP-AFTER`, `STOP-PARSING`, `STOPPE`, `STOPPED`, `STORED-PROC`, `STORED-PROCE`, `STORED-PROCED`, `STORED-PROCEDU`, `STORED-PROCEDUR`, `STORED-PROCEDURE`, `STREAM`, `STREAM-HANDLE`, `STREAM-IO`, `STRETCH-TO-FIT`, `STRICT`, `STRICT-ENTITY-RESOLUTION`, `STRING`, `STRING-VALUE`, `STRING-XREF`, `SUB-AVE`, `SUB-AVER`, `SUB-AVERA`, `SUB-AVERAG`, `SUB-AVERAGE`, `SUB-COUNT`, `SUB-MAXIMUM`, `SUB-MENU`, `SUB-MIN`, `SUB-MINIMUM`, `SUB-TOTAL`, `SUBSCRIBE`, `SUBST`, `SUBSTI`, `SUBSTIT`, `SUBSTITU`, `SUBSTITUT`, `SUBSTITUTE`, `SUBSTR`, `SUBSTRI`, `SUBSTRIN`, `SUBSTRING`, `SUBTYPE`, `SUM`, `SUM-MAX`, `SUM-MAXI`, `SUM-MAXIM`, `SUM-MAXIMU`, `SUPER`, `SUPER-PROCEDURES`, `SUPPRESS-NAMESPACE-PROCESSING`, `SUPPRESS-W`, `SUPPRESS-WA`, `SUPPRESS-WAR`, `SUPPRESS-WARN`, `SUPPRESS-WARNI`, `SUPPRESS-WARNIN`, `SUPPRESS-WARNING`, `SUPPRESS-WARNINGS`, `SYMMETRIC-ENCRYPTION-ALGORITHM`, `SYMMETRIC-ENCRYPTION-IV`, `SYMMETRIC-ENCRYPTION-KEY`, `SYMMETRIC-SUPPORT`, `SYSTEM-ALERT`, `SYSTEM-ALERT-`, `SYSTEM-ALERT-B`, `SYSTEM-ALERT-BO`, `SYSTEM-ALERT-BOX`, `SYSTEM-ALERT-BOXE`, `SYSTEM-ALERT-BOXES`, `SYSTEM-DIALOG`, `SYSTEM-HELP`, `SYSTEM-ID`, `TAB-POSITION`, `TAB-STOP`, `TABLE`, `TABLE-HANDLE`, `TABLE-NUMBER`, `TABLE-SCAN`, `TARGET`, `TARGET-PROCEDURE`, `TEMP-DIR`, `TEMP-DIRE`, `TEMP-DIREC`, `TEMP-DIRECT`, `TEMP-DIRECTO`, `TEMP-DIRECTOR`, `TEMP-DIRECTORY`, `TEMP-TABLE`, `TEMP-TABLE-PREPARE`, `TERM`, `TERMI`, `TERMIN`, `TERMINA`, `TERMINAL`, `TERMINATE`, `TEXT`, `TEXT-CURSOR`, `TEXT-SEG-GROW`, `TEXT-SELECTED`, `THEN`, `THIS-OBJECT`, `THIS-PROCEDURE`, `THREAD-SAFE`, `THREE-D`, `THROUGH`, `THROW`, `THRU`, `TIC-MARKS`, `TIME`, `TIME-SOURCE`, `TITLE`, `TITLE-BGC`, `TITLE-BGCO`, `TITLE-BGCOL`, `TITLE-BGCOLO`, `TITLE-BGCOLOR`, `TITLE-DC`, `TITLE-DCO`, `TITLE-DCOL`, `TITLE-DCOLO`, `TITLE-DCOLOR`, `TITLE-FGC`, `TITLE-FGCO`, `TITLE-FGCOL`, `TITLE-FGCOLO`, `TITLE-FGCOLOR`, `TITLE-FO`, `TITLE-FON`, `TITLE-FONT`, `TO`, `TO-ROWID`, `TODAY`, `TOGGLE-BOX`, `TOOLTIP`, `TOOLTIPS`, `TOP-NAV-QUERY`, `TOP-ONLY`, `TOPIC`, `TOTAL`, `TRAILING`, `TRANS`, `TRANS-INIT-PROCEDURE`, `TRANSACTION`, `TRANSACTION-MODE`, `TRANSPARENT`, `TRIGGER`, `TRIGGERS`, `TRIM`, `TRUE`, `TRUNC`, `TRUNCA`, `TRUNCAT`, `TRUNCATE`, `TYPE`, `TYPE-OF`, `UNBOX`, `UNBUFF`, `UNBUFFE`, `UNBUFFER`, `UNBUFFERE`, `UNBUFFERED`, `UNDERL`, `UNDERLI`, `UNDERLIN`, `UNDERLINE`, `UNDO`, `UNFORM`, `UNFORMA`, `UNFORMAT`, `UNFORMATT`, `UNFORMATTE`, `UNFORMATTED`, `UNION`, `UNIQUE`, `UNIQUE-ID`, `UNIQUE-MATCH`, `UNIX`, `UNLESS-HIDDEN`, `UNLOAD`, `UNSIGNED-LONG`, `UNSUBSCRIBE`, `UP`, `UPDATE`, `UPDATE-ATTRIBUTE`, `URL`, `URL-DECODE`, `URL-ENCODE`, `URL-PASSWORD`, `URL-USERID`, `USE`, `USE-DICT-EXPS`, `USE-FILENAME`, `USE-INDEX`, `USE-REVVIDEO`, `USE-TEXT`, `USE-UNDERLINE`, `USE-WIDGET-POOL`, `USER`, `USER-ID`, `USERID`, `USING`, `V6DISPLAY`, `V6FRAME`, `VALID-EVENT`, `VALID-HANDLE`, `VALID-OBJECT`, `VALIDATE`, `VALIDATE-EXPRESSION`, `VALIDATE-MESSAGE`, `VALIDATE-SEAL`, `VALIDATION-ENABLED`, `VALUE`, `VALUE-CHANGED`, `VALUES`, `VAR`, `VARI`, `VARIA`, `VARIAB`, `VARIABL`, `VARIABLE`, `VERBOSE`, `VERSION`, `VERT`, `VERTI`, `VERTIC`, `VERTICA`, `VERTICAL`, `VIEW`, `VIEW-AS`, `VIEW-FIRST-COLUMN-ON-REOPEN`, `VIRTUAL-HEIGHT`, `VIRTUAL-HEIGHT-`, `VIRTUAL-HEIGHT-C`, `VIRTUAL-HEIGHT-CH`, `VIRTUAL-HEIGHT-CHA`, `VIRTUAL-HEIGHT-CHAR`, `VIRTUAL-HEIGHT-CHARS`, `VIRTUAL-HEIGHT-P`, `VIRTUAL-HEIGHT-PI`, `VIRTUAL-HEIGHT-PIX`, `VIRTUAL-HEIGHT-PIXE`, `VIRTUAL-HEIGHT-PIXEL`, `VIRTUAL-HEIGHT-PIXELS`, `VIRTUAL-WIDTH`, `VIRTUAL-WIDTH-`, `VIRTUAL-WIDTH-C`, `VIRTUAL-WIDTH-CH`, `VIRTUAL-WIDTH-CHA`, `VIRTUAL-WIDTH-CHAR`, `VIRTUAL-WIDTH-CHARS`, `VIRTUAL-WIDTH-P`, `VIRTUAL-WIDTH-PI`, `VIRTUAL-WIDTH-PIX`, `VIRTUAL-WIDTH-PIXE`, `VIRTUAL-WIDTH-PIXEL`, `VIRTUAL-WIDTH-PIXELS`, `VISIBLE`, `VOID`, `WAIT`, `WAIT-FOR`, `WARNING`, `WEB-CONTEXT`, `WEEKDAY`, `WHEN`, `WHERE`, `WHILE`, `WIDGET`, `WIDGET-E`, `WIDGET-EN`, `WIDGET-ENT`, `WIDGET-ENTE`, `WIDGET-ENTER`, `WIDGET-ID`, `WIDGET-L`, `WIDGET-LE`, `WIDGET-LEA`, `WIDGET-LEAV`, `WIDGET-LEAVE`, `WIDGET-POOL`, `WIDTH`, `WIDTH-`, `WIDTH-C`, `WIDTH-CH`, `WIDTH-CHA`, `WIDTH-CHAR`, `WIDTH-CHARS`, `WIDTH-P`, `WIDTH-PI`, `WIDTH-PIX`, `WIDTH-PIXE`, `WIDTH-PIXEL`, `WIDTH-PIXELS`, `WINDOW`, `WINDOW-MAXIM`, `WINDOW-MAXIMI`, `WINDOW-MAXIMIZ`, `WINDOW-MAXIMIZE`, `WINDOW-MAXIMIZED`, `WINDOW-MINIM`, `WINDOW-MINIMI`, `WINDOW-MINIMIZ`, `WINDOW-MINIMIZE`, `WINDOW-MINIMIZED`, `WINDOW-NAME`, `WINDOW-NORMAL`, `WINDOW-STA`, `WINDOW-STAT`, `WINDOW-STATE`, `WINDOW-SYSTEM`, `WITH`, `WORD-INDEX`, `WORD-WRAP`, `WORK-AREA-HEIGHT-PIXELS`, `WORK-AREA-WIDTH-PIXELS`, `WORK-AREA-X`, `WORK-AREA-Y`, `WORK-TAB`, `WORK-TABL`, `WORK-TABLE`, `WORKFILE`, `WRITE`, `WRITE-CDATA`, `WRITE-CHARACTERS`, `WRITE-COMMENT`, `WRITE-DATA-ELEMENT`, `WRITE-EMPTY-ELEMENT`, `WRITE-ENTITY-REF`, `WRITE-EXTERNAL-DTD`, `WRITE-FRAGMENT`, `WRITE-JSON`, `WRITE-MESSAGE`, `WRITE-PROCESSING-INSTRUCTION`, `WRITE-STATUS`, `WRITE-XML`, `WRITE-XMLSCHEMA`, `X`, `X-OF`, `XCODE`, `XML-DATA-TYPE`, `XML-ENTITY-EXPANSION-LIMIT`, `XML-NODE-TYPE`, `XML-SCHEMA-PATH`, `XML-STRICT-ENTITY-RESOLUTION`, `XML-SUPPRESS-NAMESPACE-PROCESSING`, `XREF`, `XREF-XML`, `Y`, `Y-OF`, `YEAR`, `YEAR-OFFSET`, `YES`, `YES-NO`, `YES-NO-CANCEL`), KeywordReserved, nil}, // nolint
{`"(\\\\|\\[^\\]|[^"\\])*"`, LiteralStringDouble, nil},
{`'(\\\\|\\[^\\]|[^'\\])*'`, LiteralStringSingle, nil},
{`[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?`, LiteralNumberFloat, nil},
diff --git a/lexers/o/org.go b/lexers/org.go
similarity index 93%
rename from lexers/o/org.go
rename to lexers/org.go
index 00f6df4..aed663f 100644
--- a/lexers/o/org.go
+++ b/lexers/org.go
@@ -1,12 +1,11 @@
-package o
+package lexers
import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
+ . "github.com/alecthomas/chroma/v2" // nolint
)
// Org mode lexer.
-var Org = internal.Register(MustNewLazyLexer(
+var Org = Register(MustNewLexer(
&Config{
Name: "Org Mode",
Aliases: []string{"org", "orgmode"},
@@ -51,21 +50,13 @@ func orgRules() Rules {
// - Src Blocks
{
`(?i)^( *#\+begin_src )([^ \n]+)(.*?\n)([\w\W]*?)(^ *#\+end_src *$)`,
- UsingByGroup(
- internal.Get,
- 2, 4,
- Comment, CommentSpecial, Comment, Text, Comment,
- ),
+ UsingByGroup(2, 4, Comment, CommentSpecial, Comment, Text, Comment),
nil,
},
// - Export Blocks
{
`(?i)^( *#\+begin_export )(\w+)( *\n)([\w\W]*?)(^ *#\+end_export *$)`,
- UsingByGroup(
- internal.Get,
- 2, 4,
- Comment, CommentSpecial, Text, Text, Comment,
- ),
+ UsingByGroup(2, 4, Comment, CommentSpecial, Text, Text, Comment),
nil,
},
// - Org Special, Example, Verse, etc. Blocks
diff --git a/lexers/p/pacman.go b/lexers/p/pacman.go
deleted file mode 100644
index 00c6255..0000000
--- a/lexers/p/pacman.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Pacmanconf lexer.
-var Pacmanconf = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "PacmanConf",
- Aliases: []string{"pacmanconf"},
- Filenames: []string{"pacman.conf"},
- MimeTypes: []string{},
- },
- pacmanconfRules,
-))
-
-func pacmanconfRules() Rules {
- return Rules{
- "root": {
- {`#.*$`, CommentSingle, nil},
- {`^\s*\[.*?\]\s*$`, Keyword, nil},
- {`(\w+)(\s*)(=)`, ByGroups(NameAttribute, Text, Operator), nil},
- {`^(\s*)(\w+)(\s*)$`, ByGroups(Text, NameAttribute, Text), nil},
- {Words(``, `\b`, `$repo`, `$arch`, `%o`, `%u`), NameVariable, nil},
- {`.`, Text, nil},
- },
- }
-}
diff --git a/lexers/p/perl.go b/lexers/p/perl.go
deleted file mode 100644
index 6aa338a..0000000
--- a/lexers/p/perl.go
+++ /dev/null
@@ -1,142 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Perl lexer.
-var Perl = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Perl",
- Aliases: []string{"perl", "pl"},
- Filenames: []string{"*.pl", "*.pm", "*.t"},
- MimeTypes: []string{"text/x-perl", "application/x-perl"},
- DotAll: true,
- },
- perlRules,
-))
-
-func perlRules() Rules {
- return Rules{
- "balanced-regex": {
- {`/(\\\\|\\[^\\]|[^\\/])*/[egimosx]*`, LiteralStringRegex, Pop(1)},
- {`!(\\\\|\\[^\\]|[^\\!])*![egimosx]*`, LiteralStringRegex, Pop(1)},
- {`\\(\\\\|[^\\])*\\[egimosx]*`, LiteralStringRegex, Pop(1)},
- {`\{(\\\\|\\[^\\]|[^\\}])*\}[egimosx]*`, LiteralStringRegex, Pop(1)},
- {`<(\\\\|\\[^\\]|[^\\>])*>[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/lexers/p/pig.go b/lexers/p/pig.go
deleted file mode 100644
index f2852c1..0000000
--- a/lexers/p/pig.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Pig lexer.
-var Pig = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Pig",
- Aliases: []string{"pig"},
- Filenames: []string{"*.pig"},
- MimeTypes: []string{"text/x-pig"},
- CaseInsensitive: true,
- },
- pigRules,
-))
-
-func pigRules() Rules {
- return 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/lexers/p/pkgconfig.go b/lexers/p/pkgconfig.go
deleted file mode 100644
index 9e02410..0000000
--- a/lexers/p/pkgconfig.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Pkgconfig lexer.
-var Pkgconfig = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "PkgConfig",
- Aliases: []string{"pkgconfig"},
- Filenames: []string{"*.pc"},
- MimeTypes: []string{},
- },
- pkgconfigRules,
-))
-
-func pkgconfigRules() Rules {
- return 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/lexers/p/plaintext.go b/lexers/p/plaintext.go
deleted file mode 100644
index 058c02a..0000000
--- a/lexers/p/plaintext.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-var Plaintext = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "plaintext",
- Aliases: []string{"text", "plain", "no-highlight"},
- Filenames: []string{"*.txt"},
- MimeTypes: []string{"text/plain"},
- Priority: 0.1,
- },
- internal.PlaintextRules,
-))
diff --git a/lexers/p/plsql.go b/lexers/p/plsql.go
deleted file mode 100644
index 324d3fe..0000000
--- a/lexers/p/plsql.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Pl/Pgsql lexer.
-var PLpgSQL = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "PL/pgSQL",
- Aliases: []string{"plpgsql"},
- Filenames: []string{},
- MimeTypes: []string{"text/x-plpgsql"},
- NotMultiline: true,
- CaseInsensitive: true,
- },
- plpgSQLRules,
-))
-
-func plpgSQLRules() Rules {
- return Rules{
- "root": {
- {`\%[a-z]\w*\b`, NameBuiltin, nil},
- {`:=`, Operator, nil},
- {`\<\<[a-z]\w*\>\>`, NameLabel, nil},
- {`\#[a-z]\w*\b`, KeywordPseudo, nil},
- {`\s+`, TextWhitespace, 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/lexers/p/plutus_core.go b/lexers/p/plutus_core.go
deleted file mode 100644
index b2ad4e1..0000000
--- a/lexers/p/plutus_core.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// nolint
-
-// Lexer for the Plutus Core Languages (version 2.1)
-//
-// including both Typed- and Untyped- versions
-// based on “Formal Specification of the Plutus Core Language (version 2.1)”, published 6th April 2021:
-// https://hydra.iohk.io/build/8205579/download/1/plutus-core-specification.pdf
-
-var PlutusCoreLang = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Plutus Core",
- Aliases: []string{"plutus-core", "plc"},
- Filenames: []string{"*.plc"},
- MimeTypes: []string{"text/x-plutus-core", "application/x-plutus-core"},
- },
- plutusCoreRules,
-))
-
-func plutusCoreRules() Rules {
- return Rules{
- "root": {
- {`\s+`, Text, nil},
- {`(\(|\))`, Punctuation, nil},
- {`(\[|\])`, Punctuation, nil},
- {`({|})`, Punctuation, nil},
-
- // Constants. Figure 1.
- // For version, see handling of (program ...) below.
- {`([+-]?\d+)`, LiteralNumberInteger, nil},
- {`(#([a-fA-F0-9][a-fA-F0-9])+)`, LiteralString, nil},
- {`(\(\))`, NameConstant, nil},
- {`(True|False)`, NameConstant, nil},
-
- // Keywords. Figures 2 and 15.
- // Special handling for program because it is followed by a version.
- {`(con |abs |iwrap |unwrap |lam |builtin |delay |force |error)`, Keyword, nil},
- {`(fun |all |ifix |lam |con )`, Keyword, nil},
- {`(type|fun )`, Keyword, nil},
- {`(program )(\S+)`, ByGroups(Keyword, LiteralString), nil},
-
- // Built-in Types. Figure 12.
- {`(unit|bool|integer|bytestring|string)`, KeywordType, nil},
-
- // Built-ins Functions. Figure 14 but, more importantly, implementation:
- // https://github.com/input-output-hk/plutus/blob/6d759c4/plutus-core/plutus-core/src/PlutusCore/Default/Builtins.hs#L42-L111
- {`(addInteger |subtractInteger |multiplyInteger |divideInteger |quotientInteger |remainderInteger |modInteger |equalsInteger |lessThanInteger |lessThanEqualsInteger )`, NameBuiltin, nil},
- {`(appendByteString |consByteString |sliceByteString |lengthOfByteString |indexByteString |equalsByteString |lessThanByteString |lessThanEqualsByteString )`, NameBuiltin, nil},
- {`(sha2_256 |sha3_256 |blake2b_256 |verifySignature )`, NameBuiltin, nil},
- {`(appendString |equalsString |encodeUtf8 |decodeUtf8 )`, NameBuiltin, nil},
- {`(ifThenElse )`, NameBuiltin, nil},
- {`(chooseUnit )`, NameBuiltin, nil},
- {`(trace )`, NameBuiltin, nil},
- {`(fstPair |sndPair )`, NameBuiltin, nil},
- {`(chooseList |mkCons |headList |tailList |nullList )`, NameBuiltin, nil},
- {`(chooseData |constrData |mapData |listData |iData |bData |unConstrData |unMapData |unListData |unIData |unBData |equalsData )`, NameBuiltin, nil},
- {`(mkPairData |mkNilData |mkNilPairData )`, NameBuiltin, nil},
-
- // Name. Figure 1.
- {`([a-zA-Z][a-zA-Z0-9_']*)`, Name, nil},
-
- // Unicode String. Not in the specification.
- {`"`, LiteralStringDouble, Push("string")},
- },
- "string": {
- {`[^\\"]+`, LiteralStringDouble, nil},
- {`"`, LiteralStringDouble, Pop(1)},
- },
- }
-}
diff --git a/lexers/p/pony.go b/lexers/p/pony.go
deleted file mode 100644
index 41d5682..0000000
--- a/lexers/p/pony.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Pony lexer.
-var Pony = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Pony",
- Aliases: []string{"pony"},
- Filenames: []string{"*.pony"},
- MimeTypes: []string{},
- },
- ponyRules,
-))
-
-func ponyRules() Rules {
- return Rules{
- "root": {
- {`\n`, Text, nil},
- {`[^\S\n]+`, Text, nil},
- {`//.*\n`, CommentSingle, nil},
- {`/\*`, CommentMultiline, Push("nested_comment")},
- {`"""(?:.|\n)*?"""`, LiteralStringDoc, nil},
- {`"`, LiteralString, Push("string")},
- {`\'.*\'`, LiteralStringChar, nil},
- {`=>|[]{}:().~;,|&!^?[]`, Punctuation, nil},
- {Words(``, `\b`, `addressof`, `and`, `as`, `consume`, `digestof`, `is`, `isnt`, `not`, `or`), OperatorWord, nil},
- {`!=|==|<<|>>|[-+/*%=<>]`, Operator, nil},
- {Words(``, `\b`, `box`, `break`, `compile_error`, `compile_intrinsic`, `continue`, `do`, `else`, `elseif`, `embed`, `end`, `error`, `for`, `if`, `ifdef`, `in`, `iso`, `lambda`, `let`, `match`, `object`, `recover`, `ref`, `repeat`, `return`, `tag`, `then`, `this`, `trn`, `try`, `until`, `use`, `var`, `val`, `where`, `while`, `with`, `#any`, `#read`, `#send`, `#share`), Keyword, nil},
- {`(actor|class|struct|primitive|interface|trait|type)((?:\s)+)`, ByGroups(Keyword, Text), Push("typename")},
- {`(new|fun|be)((?:\s)+)`, ByGroups(Keyword, Text), Push("methodname")},
- {Words(``, `\b`, `U8`, `U16`, `U32`, `U64`, `ULong`, `USize`, `U128`, `Unsigned`, `Stringable`, `String`, `StringBytes`, `StringRunes`, `InputNotify`, `InputStream`, `Stdin`, `ByteSeq`, `ByteSeqIter`, `OutStream`, `StdStream`, `SourceLoc`, `I8`, `I16`, `I32`, `I64`, `ILong`, `ISize`, `I128`, `Signed`, `Seq`, `RuntimeOptions`, `Real`, `Integer`, `SignedInteger`, `UnsignedInteger`, `FloatingPoint`, `Number`, `Int`, `ReadSeq`, `ReadElement`, `Pointer`, `Platform`, `NullablePointer`, `None`, `Iterator`, `F32`, `F64`, `Float`, `Env`, `DoNotOptimise`, `DisposableActor`, `Less`, `Equal`, `Greater`, `Compare`, `HasEq`, `Equatable`, `Comparable`, `Bool`, `AsioEventID`, `AsioEventNotify`, `AsioEvent`, `Array`, `ArrayKeys`, `ArrayValues`, `ArrayPairs`, `Any`, `AmbientAuth`), KeywordType, nil},
- {`_?[A-Z]\w*`, NameClass, nil},
- {`string\(\)`, NameOther, nil},
- {`(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+`, LiteralNumberFloat, nil},
- {`0x[0-9a-fA-F]+`, LiteralNumberHex, nil},
- {`\d+`, LiteralNumberInteger, nil},
- {`(true|false)\b`, Keyword, nil},
- {`_\d*`, Name, nil},
- {`_?[a-z][\w\'_]*`, Name, nil},
- },
- "typename": {
- {`(iso|trn|ref|val|box|tag)?((?:\s)*)(_?[A-Z]\w*)`, ByGroups(Keyword, Text, NameClass), Pop(1)},
- },
- "methodname": {
- {`(iso|trn|ref|val|box|tag)?((?:\s)*)(_?[a-z]\w*)`, ByGroups(Keyword, Text, NameFunction), Pop(1)},
- },
- "nested_comment": {
- {`[^*/]+`, CommentMultiline, nil},
- {`/\*`, CommentMultiline, Push()},
- {`\*/`, CommentMultiline, Pop(1)},
- {`[*/]`, CommentMultiline, nil},
- },
- "string": {
- {`"`, LiteralString, Pop(1)},
- {`\\"`, LiteralString, nil},
- {`[^\\"]+`, LiteralString, nil},
- },
- }
-}
diff --git a/lexers/p/postscript.go b/lexers/p/postscript.go
deleted file mode 100644
index 0b51ba5..0000000
--- a/lexers/p/postscript.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Postscript lexer.
-var Postscript = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "PostScript",
- Aliases: []string{"postscript", "postscr"},
- Filenames: []string{"*.ps", "*.eps"},
- MimeTypes: []string{"application/postscript"},
- },
- postscriptRules,
-))
-
-func postscriptRules() Rules {
- return 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/lexers/p/povray.go b/lexers/p/povray.go
deleted file mode 100644
index 2d870f1..0000000
--- a/lexers/p/povray.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Povray lexer.
-var Povray = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "POVRay",
- Aliases: []string{"pov"},
- Filenames: []string{"*.pov", "*.inc"},
- MimeTypes: []string{"text/x-povray"},
- },
- povrayRules,
-))
-
-func povrayRules() Rules {
- return 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/lexers/p/powerquery.go b/lexers/p/powerquery.go
deleted file mode 100644
index 0302420..0000000
--- a/lexers/p/powerquery.go
+++ /dev/null
@@ -1,38 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// PowerQuery lexer.
-var PowerQuery = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "PowerQuery",
- Aliases: []string{"powerquery", "pq"},
- Filenames: []string{"*.pq"},
- MimeTypes: []string{"text/x-powerquery"},
- DotAll: true,
- CaseInsensitive: true,
- },
- powerqueryRules,
-))
-
-func powerqueryRules() Rules {
- return Rules{
- "root": {
- {`\s+`, Text, nil},
- {`//.*?\n`, CommentSingle, nil},
- {`/\*.*?\*/`, CommentMultiline, nil},
- {`"(\\\\|\\"|[^"])*"`, LiteralString, nil},
- {`(and|as|each|else|error|false|if|in|is|let|meta|not|null|or|otherwise|section|shared|then|true|try|type)\b`, Keyword, nil},
- {`(#binary|#date|#datetime|#datetimezone|#duration|#infinity|#nan|#sections|#shared|#table|#time)\b`, KeywordType, nil},
- {`(([a-zA-Z]|_)[\w|._]*|#"[^"]+")`, Name, nil},
- {`0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?`, LiteralNumberHex, nil},
- {`([0-9]+\.[0-9]+|\.[0-9]+)([eE][0-9]+)?`, LiteralNumberFloat, nil},
- {`[0-9]+`, LiteralNumberInteger, nil},
- {`[\(\)\[\]\{\}]`, Punctuation, nil},
- {`\.\.|\.\.\.|=>|<=|>=|<>|[@!?,;=<>\+\-\*\/&]`, Operator, nil},
- },
- }
-}
diff --git a/lexers/p/powershell.go b/lexers/p/powershell.go
deleted file mode 100644
index 9b7b56e..0000000
--- a/lexers/p/powershell.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Powershell lexer.
-var Powershell = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "PowerShell",
- Aliases: []string{"powershell", "posh", "ps1", "psm1", "psd1"},
- Filenames: []string{"*.ps1", "*.psm1", "*.psd1"},
- MimeTypes: []string{"text/x-powershell"},
- DotAll: true,
- CaseInsensitive: true,
- },
- powershellRules,
-))
-
-func powershellRules() Rules {
- return 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")},
- {`(?i)([A-Z]:)`, Name, nil},
- {`@"\n`, LiteralStringHeredoc, Push("heredoc-double")},
- {`@'\n.*?\n'@`, LiteralStringHeredoc, nil},
- {"`[\\'\"$@-]", Punctuation, nil},
- {`"`, LiteralStringDouble, Push("string")},
- {`'([^']|'')*'`, LiteralStringSingle, nil},
- {`(\$|@@|@)((global|script|private|env):)?\w+`, NameVariable, nil},
- {`[a-z]\w*-[a-z]\w*\b`, NameBuiltin, 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},
- {`(ac|asnp|cat|cd|cfs|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|curl|cvpa|dbp|del|diff|dir|dnsn|ebp|echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fhx|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps|gpv|group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md|measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri|rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|wget|where|wjb|write)\s`, 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/lexers/p/prolog.go b/lexers/p/prolog.go
deleted file mode 100644
index a2f346b..0000000
--- a/lexers/p/prolog.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Prolog lexer.
-var Prolog = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Prolog",
- Aliases: []string{"prolog"},
- Filenames: []string{"*.ecl", "*.prolog", "*.pro", "*.pl"},
- MimeTypes: []string{"text/x-prolog"},
- },
- prologRules,
-))
-
-func prologRules() Rules {
- return Rules{
- "root": {
- {`/\*`, 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/lexers/p/promql.go b/lexers/p/promql.go
deleted file mode 100644
index e80b926..0000000
--- a/lexers/p/promql.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Promql lexer.
-var Promql = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "PromQL",
- Aliases: []string{"promql"},
- Filenames: []string{"*.promql"},
- MimeTypes: []string{},
- },
- promqlRules,
-))
-
-func promqlRules() Rules {
- return Rules{
- "root": {
- {`\n`, TextWhitespace, nil},
- {`\s+`, TextWhitespace, nil},
- {`,`, Punctuation, nil},
- {Words(``, `\b`, `bool`, `by`, `group_left`, `group_right`, `ignoring`, `offset`, `on`, `without`), Keyword, nil},
- {Words(``, `\b`, `sum`, `min`, `max`, `avg`, `group`, `stddev`, `stdvar`, `count`, `count_values`, `bottomk`, `topk`, `quantile`), Keyword, nil},
- {Words(``, `\b`, `abs`, `absent`, `absent_over_time`, `avg_over_time`, `ceil`, `changes`, `clamp_max`, `clamp_min`, `count_over_time`, `day_of_month`, `day_of_week`, `days_in_month`, `delta`, `deriv`, `exp`, `floor`, `histogram_quantile`, `holt_winters`, `hour`, `idelta`, `increase`, `irate`, `label_join`, `label_replace`, `ln`, `log10`, `log2`, `max_over_time`, `min_over_time`, `minute`, `month`, `predict_linear`, `quantile_over_time`, `rate`, `resets`, `round`, `scalar`, `sort`, `sort_desc`, `sqrt`, `stddev_over_time`, `stdvar_over_time`, `sum_over_time`, `time`, `timestamp`, `vector`, `year`), KeywordReserved, nil},
- {`[1-9][0-9]*[smhdwy]`, LiteralString, nil},
- {`-?[0-9]+\.[0-9]+`, LiteralNumberFloat, nil},
- {`-?[0-9]+`, LiteralNumberInteger, nil},
- {`#.*?$`, CommentSingle, nil},
- {`(\+|\-|\*|\/|\%|\^)`, Operator, nil},
- {`==|!=|>=|<=|<|>`, Operator, nil},
- {`and|or|unless`, OperatorWord, nil},
- {`[_a-zA-Z][a-zA-Z0-9_]+`, NameVariable, nil},
- {`(["\'])(.*?)(["\'])`, ByGroups(Punctuation, LiteralString, Punctuation), nil},
- {`\(`, Operator, Push("function")},
- {`\)`, Operator, nil},
- {`\{`, Punctuation, Push("labels")},
- {`\[`, Punctuation, Push("range")},
- },
- "labels": {
- {`\}`, Punctuation, Pop(1)},
- {`\n`, TextWhitespace, nil},
- {`\s+`, TextWhitespace, nil},
- {`,`, Punctuation, nil},
- {`([_a-zA-Z][a-zA-Z0-9_]*?)(\s*?)(=~|!=|=|!~)(\s*?)("|')(.*?)("|')`, ByGroups(NameLabel, TextWhitespace, Operator, TextWhitespace, Punctuation, LiteralString, Punctuation), nil},
- },
- "range": {
- {`\]`, Punctuation, Pop(1)},
- {`[1-9][0-9]*[smhdwy]`, LiteralString, nil},
- },
- "function": {
- {`\)`, Operator, Pop(1)},
- {`\(`, Operator, Push()},
- Default(Pop(1)),
- },
- }
-}
diff --git a/lexers/p/protobuf.go b/lexers/p/protobuf.go
deleted file mode 100644
index 76576cb..0000000
--- a/lexers/p/protobuf.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// ProtocolBuffer lexer.
-var ProtocolBuffer = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Protocol Buffer",
- Aliases: []string{"protobuf", "proto"},
- Filenames: []string{"*.proto"},
- MimeTypes: []string{},
- },
- protocolBufferRules,
-))
-
-func protocolBufferRules() Rules {
- return 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(Name, 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/lexers/p/puppet.go b/lexers/p/puppet.go
deleted file mode 100644
index b32caed..0000000
--- a/lexers/p/puppet.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Puppet lexer.
-var Puppet = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Puppet",
- Aliases: []string{"puppet"},
- Filenames: []string{"*.pp"},
- MimeTypes: []string{},
- },
- puppetRules,
-))
-
-func puppetRules() Rules {
- return 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/lexers/p/python.go b/lexers/p/python.go
deleted file mode 100644
index ad10a32..0000000
--- a/lexers/p/python.go
+++ /dev/null
@@ -1,211 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Python lexer.
-var Python = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Python",
- Aliases: []string{"python", "py", "sage", "python3", "py3"},
- Filenames: []string{"*.py", "*.pyi", "*.pyw", "*.jy", "*.sage", "*.sc", "SConstruct", "SConscript", "*.bzl", "BUCK", "BUILD", "BUILD.bazel", "WORKSPACE", "*.tac"},
- MimeTypes: []string{"text/x-python", "application/x-python", "text/x-python3", "application/x-python3"},
- },
- pythonRules,
-))
-
-func pythonRules() Rules {
- const pythonIdentifier = `[_\p{L}][_\p{L}\p{N}]*`
-
- return Rules{
- "root": {
- {`\n`, Text, nil},
- {`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil},
- {`^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil},
- {`\A#!.+$`, CommentHashbang, nil},
- {`#.*$`, CommentSingle, nil},
- {`\\\n`, Text, nil},
- {`\\`, Text, 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("expr"),
- },
- "expr": {
- {`(?i)(rf|fr)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("rfstringescape", "tdqf")},
- {`(?i)(rf|fr)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("rfstringescape", "tsqf")},
- {`(?i)(rf|fr)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("rfstringescape", "dqf")},
- {`(?i)(rf|fr)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("rfstringescape", "sqf")},
- {`([fF])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("fstringescape", "tdqf")},
- {`([fF])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("fstringescape", "tsqf")},
- {`([fF])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("fstringescape", "dqf")},
- {`([fF])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("fstringescape", "sqf")},
- {`(?i)(rb|br|r)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")},
- {`(?i)(rb|br|r)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")},
- {`(?i)(rb|br|r)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")},
- {`(?i)(rb|br|r)(')`, 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")},
- {`[^\S\n]+`, Text, nil},
- Include("numbers"),
- {`!=|==|<<|>>|:=|[-~+/*%=<>&^|.]`, Operator, nil},
- {`[]{}:(),;[]`, Punctuation, nil},
- {`(in|is|and|or|not)\b`, OperatorWord, nil},
- Include("expr-keywords"),
- Include("builtins"),
- Include("magicfuncs"),
- Include("magicvars"),
- Include("name"),
- },
- "expr-inside-fstring": {
- {`[{([]`, Punctuation, Push("expr-inside-fstring-inner")},
- {`(=\s*)?(\![sraf])?\}`, LiteralStringInterpol, Pop(1)},
- {`(=\s*)?(\![sraf])?:`, LiteralStringInterpol, Pop(1)},
- {`\s+`, Text, nil},
- Include("expr"),
- },
- "expr-inside-fstring-inner": {
- {`[{([]`, Punctuation, Push("expr-inside-fstring-inner")},
- {`[])}]`, Punctuation, Pop(1)},
- {`\s+`, Text, nil},
- Include("expr"),
- },
- "expr-keywords": {
- {Words(``, `\b`, `async for`, `await`, `else`, `for`, `if`, `lambda`, `yield`, `yield from`), Keyword, nil},
- {Words(``, `\b`, `True`, `False`, `None`), KeywordConstant, nil},
- },
- "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-giorsaux%]`, LiteralStringInterpol, nil},
- {`\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil},
- {`[^\\\'"%{\n]+`, LiteralStringDouble, nil},
- {`[\'"\\]`, LiteralStringDouble, nil},
- {`%|(\{{1,2})`, LiteralStringDouble, nil},
- },
- "dqf": {
- {`"`, LiteralStringDouble, Pop(1)},
- {`\\\\|\\"|\\\n`, LiteralStringEscape, nil},
- Include("fstrings-double"),
- },
- "sqf": {
- {`'`, LiteralStringSingle, Pop(1)},
- {`\\\\|\\'|\\\n`, LiteralStringEscape, nil},
- Include("fstrings-single"),
- },
- "dqs": {
- {`"`, LiteralStringDouble, Pop(1)},
- {`\\\\|\\"|\\\n`, LiteralStringEscape, nil},
- Include("strings-double"),
- },
- "sqs": {
- {`'`, LiteralStringSingle, Pop(1)},
- {`\\\\|\\'|\\\n`, LiteralStringEscape, nil},
- Include("strings-single"),
- },
- "tdqf": {
- {`"""`, LiteralStringDouble, Pop(1)},
- Include("fstrings-double"),
- {`\n`, LiteralStringDouble, nil},
- },
- "tsqf": {
- {`'''`, LiteralStringSingle, Pop(1)},
- Include("fstrings-single"),
- {`\n`, LiteralStringSingle, nil},
- },
- "tdqs": {
- {`"""`, LiteralStringDouble, Pop(1)},
- Include("strings-double"),
- {`\n`, LiteralStringDouble, nil},
- },
- "tsqs": {
- {`'''`, LiteralStringSingle, Pop(1)},
- Include("strings-single"),
- {`\n`, LiteralStringSingle, nil},
- },
- }
-}
diff --git a/lexers/p/python2.go b/lexers/p/python2.go
deleted file mode 100644
index f1f6036..0000000
--- a/lexers/p/python2.go
+++ /dev/null
@@ -1,141 +0,0 @@
-package p
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Python2 lexer.
-var Python2 = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Python 2",
- Aliases: []string{"python2", "py2"},
- Filenames: []string{},
- MimeTypes: []string{"text/x-python2", "application/x-python2"},
- },
- python2Rules,
-))
-
-func python2Rules() Rules {
- return 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(`(? LANGUAGE
- StringSingle, StringSingle, StringSingle, // 'type'
- ),
+ StringSingle, StringSingle, StringSingle), // 'type'
nil,
},
{`(?s)(\$)([^$]*)(\$)(.*?)(\$)(\2)(\$)`, LiteralStringHeredoc, nil},
diff --git a/lexers/q/qbasic.go b/lexers/q/qbasic.go
deleted file mode 100644
index 1e36f86..0000000
--- a/lexers/q/qbasic.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package q
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Qbasic lexer.
-var Qbasic = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "QBasic",
- Aliases: []string{"qbasic", "basic"},
- Filenames: []string{"*.BAS", "*.bas"},
- MimeTypes: []string{"text/basic"},
- },
- qbasicRules,
-))
-
-func qbasicRules() Rules {
- return 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/lexers/q/qml.go b/lexers/q/qml.go
deleted file mode 100644
index dfd3c75..0000000
--- a/lexers/q/qml.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package q
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Qml lexer.
-var Qml = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "QML",
- Aliases: []string{"qml", "qbs"},
- Filenames: []string{"*.qml", "*.qbs"},
- MimeTypes: []string{"application/x-qml", "application/x-qt.qbs+qml"},
- DotAll: true,
- },
- qmlRules,
-))
-
-func qmlRules() Rules {
- return 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/lexers/x/xorg.go b/lexers/x/xorg.go
deleted file mode 100644
index 7936a51..0000000
--- a/lexers/x/xorg.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package x
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Xorg lexer.
-var Xorg = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Xorg",
- Aliases: []string{"xorg.conf"},
- Filenames: []string{"xorg.conf"},
- MimeTypes: []string{},
- },
- xorgRules,
-))
-
-func xorgRules() Rules {
- return 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/lexers/y/yaml.go b/lexers/y/yaml.go
deleted file mode 100644
index 488f760..0000000
--- a/lexers/y/yaml.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package y
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-var YAML = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "YAML",
- Aliases: []string{"yaml"},
- Filenames: []string{"*.yaml", "*.yml"},
- MimeTypes: []string{"text/x-yaml"},
- },
- yamlRules,
-))
-
-func yamlRules() Rules {
- return Rules{
- "root": {
- Include("whitespace"),
- {`^---`, NameNamespace, nil},
- {`^\.\.\.`, NameNamespace, nil},
- {`[\n?]?\s*- `, Text, nil},
- {`#.*$`, Comment, nil},
- {`!![^\s]+`, CommentPreproc, nil},
- {`&[^\s]+`, CommentPreproc, nil},
- {`\*[^\s]+`, CommentPreproc, nil},
- {`^%include\s+[^\n\r]+`, CommentPreproc, nil},
- Include("key"),
- Include("value"),
- {`[?:,\[\]]`, Punctuation, nil},
- {`.`, Text, nil},
- },
- "value": {
- {`([>|](?:[+-])?)(\n(^ {1,})(?:.*\n*(?:^\3 *).*)*)`, ByGroups(Punctuation, StringDoc, Whitespace), nil},
- {Words(``, `\b`, "true", "True", "TRUE", "false", "False", "FALSE", "null",
- "y", "Y", "yes", "Yes", "YES", "n", "N", "no", "No", "NO",
- "on", "On", "ON", "off", "Off", "OFF"), 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},
- {`([^\{\}\[\]\?,\:\!\-\*&\@].*)( )+(#.*)`, ByGroups(Literal, Whitespace, Comment), nil},
- {`[^\{\}\[\]\?,\:\!\-\*&\@].*`, Literal, nil},
- },
- "key": {
- {`"[^"\n].*": `, NameTag, nil},
- {`(-)( )([^"\n{]*)(:)( )`, ByGroups(Punctuation, Whitespace, NameTag, Punctuation, Whitespace), nil},
- {`([^"\n{]*)(:)( )`, ByGroups(NameTag, Punctuation, Whitespace), nil},
- {`([^"\n{]*)(:)(\n)`, ByGroups(NameTag, Punctuation, Whitespace), nil},
- },
- "whitespace": {
- {`\s+`, Whitespace, nil},
- {`\n+`, Whitespace, nil},
- },
- }
-}
diff --git a/lexers/y/yang.go b/lexers/y/yang.go
deleted file mode 100644
index 36349eb..0000000
--- a/lexers/y/yang.go
+++ /dev/null
@@ -1,71 +0,0 @@
-package y
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-var YANG = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "YANG",
- Aliases: []string{"yang"},
- Filenames: []string{"*.yang"},
- MimeTypes: []string{"application/yang"},
- },
- yangRules,
-))
-
-func yangRules() Rules {
- return Rules{
- "root": {
- {`\s+`, Whitespace, nil},
- {`[\{\}\;]+`, Punctuation, nil},
- {`(?<|^!?/\-*&~:]`, Operator, nil},
- {`[{}()\[\],.;]`, Punctuation, nil},
- },
- }
-}
diff --git a/lexers/z/zig.go b/lexers/z/zig.go
deleted file mode 100644
index 56f54fd..0000000
--- a/lexers/z/zig.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package z
-
-import (
- . "github.com/alecthomas/chroma" // nolint
- "github.com/alecthomas/chroma/lexers/internal"
-)
-
-// Zig lexer.
-var Zig = internal.Register(MustNewLazyLexer(
- &Config{
- Name: "Zig",
- Aliases: []string{"zig"},
- Filenames: []string{"*.zig"},
- MimeTypes: []string{"text/zig"},
- },
- zigRules,
-))
-
-func zigRules() Rules {
- return Rules{
- "root": {
- {`\n`, TextWhitespace, nil},
- {`\s+`, TextWhitespace, nil},
- {`//.*?\n`, CommentSingle, nil},
- {Words(``, `\b`, `break`, `return`, `continue`, `asm`, `defer`, `errdefer`, `unreachable`, `try`, `catch`, `async`, `await`, `suspend`, `resume`, `cancel`), Keyword, nil},
- {Words(``, `\b`, `const`, `var`, `extern`, `packed`, `export`, `pub`, `noalias`, `inline`, `comptime`, `nakedcc`, `stdcallcc`, `volatile`, `allowzero`, `align`, `linksection`, `threadlocal`), KeywordReserved, nil},
- {Words(``, `\b`, `struct`, `enum`, `union`, `error`), Keyword, nil},
- {Words(``, `\b`, `while`, `for`), Keyword, nil},
- {Words(``, `\b`, `bool`, `f16`, `f32`, `f64`, `f128`, `void`, `noreturn`, `type`, `anyerror`, `promise`, `i0`, `u0`, `isize`, `usize`, `comptime_int`, `comptime_float`, `c_short`, `c_ushort`, `c_int`, `c_uint`, `c_long`, `c_ulong`, `c_longlong`, `c_ulonglong`, `c_longdouble`, `c_voidi8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`), KeywordType, nil},
- {Words(``, `\b`, `true`, `false`, `null`, `undefined`), KeywordConstant, nil},
- {Words(``, `\b`, `if`, `else`, `switch`, `and`, `or`, `orelse`), Keyword, nil},
- {Words(``, `\b`, `fn`, `usingnamespace`, `test`), Keyword, nil},
- {`0x[0-9a-fA-F]+\.[0-9a-fA-F]+([pP][\-+]?[0-9a-fA-F]+)?`, LiteralNumberFloat, nil},
- {`0x[0-9a-fA-F]+\.?[pP][\-+]?[0-9a-fA-F]+`, LiteralNumberFloat, nil},
- {`[0-9]+\.[0-9]+([eE][-+]?[0-9]+)?`, LiteralNumberFloat, nil},
- {`[0-9]+\.?[eE][-+]?[0-9]+`, LiteralNumberFloat, nil},
- {`0b(?:_?[01])+`, LiteralNumberBin, nil},
- {`0o(?:_?[0-7])+`, LiteralNumberOct, nil},
- {`0x(?:_?[0-9a-fA-F])+`, LiteralNumberHex, nil},
- {`(?:_?[0-9])+`, LiteralNumberInteger, nil},
- {`@[a-zA-Z_]\w*`, NameBuiltin, nil},
- {`[a-zA-Z_]\w*`, Name, nil},
- {`\'\\\'\'`, LiteralStringEscape, nil},
- {`\'\\(|x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{6}|[nr\\t\'"])\'`, LiteralStringEscape, nil},
- {`\'[^\\\']\'`, LiteralString, nil},
- {`\\\\[^\n]*`, LiteralStringHeredoc, nil},
- {`c\\\\[^\n]*`, LiteralStringHeredoc, nil},
- {`c?"`, LiteralString, Push("string")},
- {`[+%=><|^!?/\-*&~:]`, Operator, nil},
- {`[{}()\[\],.;]`, Punctuation, nil},
- },
- "string": {
- {`\\(x[a-fA-F0-9]{2}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{6}|[nr\\t\'"])`, LiteralStringEscape, nil},
- {`[^\\"\n]+`, LiteralString, nil},
- {`"`, LiteralString, Pop(1)},
- },
- }
-}
diff --git a/lexers/zed.go b/lexers/zed.go
new file mode 100644
index 0000000..aadc80f
--- /dev/null
+++ b/lexers/zed.go
@@ -0,0 +1,24 @@
+package lexers
+
+import (
+ "strings"
+)
+
+// Zed lexer.
+func init() { // nolint: gochecknoinits
+ Get("Zed").SetAnalyser(func(text string) float32 {
+ if strings.Contains(text, "definition ") && strings.Contains(text, "relation ") && strings.Contains(text, "permission ") {
+ return 0.9
+ }
+ if strings.Contains(text, "definition ") {
+ return 0.5
+ }
+ if strings.Contains(text, "relation ") {
+ return 0.5
+ }
+ if strings.Contains(text, "permission ") {
+ return 0.25
+ }
+ return 0.0
+ })
+}
diff --git a/mutators.go b/mutators.go
index bd6d720..ae648aa 100644
--- a/mutators.go
+++ b/mutators.go
@@ -1,6 +1,7 @@
package chroma
import (
+ "encoding/xml"
"fmt"
"strings"
)
@@ -11,9 +12,17 @@ type Mutator interface {
Mutate(state *LexerState) error
}
+// SerialisableMutator is a Mutator that can be serialised and deserialised.
+type SerialisableMutator interface {
+ Mutator
+ MutatorKind() string
+}
+
// A LexerMutator is an additional interface that a Mutator can implement
// to modify the lexer when it is compiled.
type LexerMutator interface {
+ // MutateLexer can be implemented to mutate the lexer itself.
+ //
// 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
}
@@ -23,20 +32,61 @@ type MutatorFunc func(state *LexerState) error
func (m MutatorFunc) Mutate(state *LexerState) error { return m(state) } // nolint
-// 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 {
+type multiMutator struct {
+ Mutators []Mutator `xml:"mutator"`
+}
+
+func (m *multiMutator) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ for {
+ token, err := d.Token()
+ if err != nil {
+ return err
+ }
+ switch token := token.(type) {
+ case xml.StartElement:
+ mutator, err := unmarshalMutator(d, token)
+ if err != nil {
return err
}
+ m.Mutators = append(m.Mutators, mutator)
+
+ case xml.EndElement:
+ return nil
}
- return nil
}
}
+func (m *multiMutator) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ name := xml.Name{Local: "mutators"}
+ if err := e.EncodeToken(xml.StartElement{Name: name}); err != nil {
+ return err
+ }
+ for _, m := range m.Mutators {
+ if err := marshalMutator(e, m); err != nil {
+ return err
+ }
+ }
+ return e.EncodeToken(xml.EndElement{Name: name})
+}
+
+func (m *multiMutator) MutatorKind() string { return "multiple" }
+
+func (m *multiMutator) Mutate(state *LexerState) error {
+ for _, modifier := range m.Mutators {
+ if err := modifier.Mutate(state); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Mutators applies a set of Mutators in order.
+func Mutators(modifiers ...Mutator) Mutator {
+ return &multiMutator{modifiers}
+}
+
type includeMutator struct {
- state string
+ State string `xml:"state,attr"`
}
// Include the given state.
@@ -44,37 +94,41 @@ func Include(state string) Rule {
return Rule{Mutator: &includeMutator{state}}
}
+func (i *includeMutator) MutatorKind() string { return "include" }
+
func (i *includeMutator) Mutate(s *LexerState) error {
- return fmt.Errorf("should never reach here Include(%q)", i.state)
+ 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]
+ includedRules, ok := rules[i.State]
if !ok {
- return fmt.Errorf("invalid include state %q", i.state)
+ 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
+ States []string `xml:"state,attr"`
}
+func (c *combinedMutator) MutatorKind() string { return "combined" }
+
// 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)
+ 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, "__")
+ name := "__combined_" + strings.Join(c.States, "__")
if _, ok := rules[name]; !ok {
combined := []*CompiledRule{}
- for _, state := range c.states {
+ for _, state := range c.States {
rules, ok := rules[state]
if !ok {
return fmt.Errorf("invalid combine state %q", state)
@@ -87,33 +141,49 @@ func (c *combinedMutator) MutateLexer(rules CompiledRules, state string, rule in
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)
- }
+type pushMutator struct {
+ States []string `xml:"state,attr"`
+}
+
+func (p *pushMutator) MutatorKind() string { return "push" }
+
+func (p *pushMutator) Mutate(s *LexerState) error {
+ if len(p.States) == 0 {
+ s.Stack = append(s.Stack, s.State)
+ } else {
+ for _, state := range p.States {
+ if state == "#pop" {
+ s.Stack = s.Stack[:len(s.Stack)-1]
+ } else {
+ s.Stack = append(s.Stack, state)
}
}
- return nil
}
+ return nil
+}
+
+// Push states onto the stack.
+func Push(states ...string) Mutator {
+ return &pushMutator{states}
+}
+
+type popMutator struct {
+ Depth int `xml:"depth,attr"`
+}
+
+func (p *popMutator) MutatorKind() string { return "pop" }
+
+func (p *popMutator) Mutate(state *LexerState) error {
+ if len(state.Stack) == 0 {
+ return fmt.Errorf("nothing to pop")
+ }
+ state.Stack = state.Stack[:len(state.Stack)-p.Depth]
+ 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
- }
+func Pop(n int) Mutator {
+ return &popMutator{n}
}
// Default returns a Rule that applies a set of Mutators.
diff --git a/mutators_test.go b/mutators_test.go
index 225174f..6b6c758 100644
--- a/mutators_test.go
+++ b/mutators_test.go
@@ -44,7 +44,7 @@ func TestInclude(t *testing.T) {
}
func TestCombine(t *testing.T) {
- l := MustNewLexer(nil, Rules{ // nolint: forbidigo
+ l := mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {{`hello`, String, Combined("world", "bye", "space")}},
"world": {{`world`, Name, nil}},
"bye": {{`bye`, Name, nil}},
diff --git a/quick/example_test.go b/quick/example_test.go
index 3233de8..075a668 100644
--- a/quick/example_test.go
+++ b/quick/example_test.go
@@ -4,7 +4,7 @@ import (
"log"
"os"
- "github.com/alecthomas/chroma/quick"
+ "github.com/alecthomas/chroma/v2/quick"
)
func Example() {
diff --git a/quick/quick.go b/quick/quick.go
index 1ed3db7..af701d9 100644
--- a/quick/quick.go
+++ b/quick/quick.go
@@ -4,10 +4,10 @@ package quick
import (
"io"
- "github.com/alecthomas/chroma"
- "github.com/alecthomas/chroma/formatters"
- "github.com/alecthomas/chroma/lexers"
- "github.com/alecthomas/chroma/styles"
+ "github.com/alecthomas/chroma/v2"
+ "github.com/alecthomas/chroma/v2/formatters"
+ "github.com/alecthomas/chroma/v2/lexers"
+ "github.com/alecthomas/chroma/v2/styles"
)
// Highlight some text.
diff --git a/regexp.go b/regexp.go
index 4096dfc..1794662 100644
--- a/regexp.go
+++ b/regexp.go
@@ -21,156 +21,6 @@ type Rule struct {
Mutator Mutator
}
-// An Emitter takes group matches and returns tokens.
-type Emitter interface {
- // Emit tokens for the given regex groups.
- Emit(groups []string, state *LexerState) Iterator
-}
-
-// EmitterFunc is a function that is an Emitter.
-type EmitterFunc func(groups []string, state *LexerState) Iterator
-
-// Emit tokens for groups.
-func (e EmitterFunc) Emit(groups []string, state *LexerState) Iterator {
- return e(groups, state)
-}
-
-// ByGroups emits a token for each matching group in the rule's regex.
-func ByGroups(emitters ...Emitter) Emitter {
- return EmitterFunc(func(groups []string, state *LexerState) Iterator {
- iterators := make([]Iterator, 0, len(groups)-1)
- if len(emitters) != len(groups)-1 {
- iterators = append(iterators, Error.Emit(groups, state))
- // panic(errors.Errorf("number of groups %q does not match number of emitters %v", groups, emitters))
- } else {
- for i, group := range groups[1:] {
- if emitters[i] != nil {
- iterators = append(iterators, emitters[i].Emit([]string{group}, state))
- }
- }
- }
- return Concaterator(iterators...)
- })
-}
-
-// ByGroupNames emits a token for each named matching group in the rule's regex.
-func ByGroupNames(emitters map[string]Emitter) Emitter {
- return EmitterFunc(func(groups []string, state *LexerState) Iterator {
- iterators := make([]Iterator, 0, len(state.NamedGroups)-1)
- if len(state.NamedGroups)-1 == 0 {
- if emitter, ok := emitters[`0`]; ok {
- iterators = append(iterators, emitter.Emit(groups, state))
- } else {
- iterators = append(iterators, Error.Emit(groups, state))
- }
- } else {
- ruleRegex := state.Rules[state.State][state.Rule].Regexp
- for i := 1; i < len(state.NamedGroups); i++ {
- groupName := ruleRegex.GroupNameFromNumber(i)
- group := state.NamedGroups[groupName]
- if emitter, ok := emitters[groupName]; ok {
- if emitter != nil {
- iterators = append(iterators, emitter.Emit([]string{group}, state))
- }
- } else {
- iterators = append(iterators, Error.Emit([]string{group}, state))
- }
- }
- }
- return Concaterator(iterators...)
- })
-}
-
-// UsingByGroup emits tokens for the matched groups in the regex using a
-// "sublexer". Used when lexing code blocks where the name of a sublexer is
-// contained within the block, for example on a Markdown text block or SQL
-// language block.
-//
-// The sublexer will be retrieved using sublexerGetFunc (typically
-// internal.Get), using the captured value from the matched sublexerNameGroup.
-//
-// If sublexerGetFunc returns a non-nil lexer for the captured sublexerNameGroup,
-// then tokens for the matched codeGroup will be emitted using the retrieved
-// lexer. Otherwise, if the sublexer is nil, then tokens will be emitted from
-// the passed emitter.
-//
-// Example:
-//
-// var Markdown = internal.Register(MustNewLexer(
-// &Config{
-// Name: "markdown",
-// Aliases: []string{"md", "mkd"},
-// Filenames: []string{"*.md", "*.mkd", "*.markdown"},
-// MimeTypes: []string{"text/x-markdown"},
-// },
-// Rules{
-// "root": {
-// {"^(```)(\\w+)(\\n)([\\w\\W]*?)(^```$)",
-// UsingByGroup(
-// internal.Get,
-// 2, 4,
-// String, String, String, Text, String,
-// ),
-// nil,
-// },
-// },
-// },
-// ))
-//
-// See the lexers/m/markdown.go for the complete example.
-//
-// Note: panic's if the number emitters does not equal the number of matched
-// groups in the regex.
-func UsingByGroup(sublexerGetFunc func(string) Lexer, sublexerNameGroup, codeGroup int, emitters ...Emitter) Emitter {
- return EmitterFunc(func(groups []string, state *LexerState) Iterator {
- // bounds check
- if len(emitters) != len(groups)-1 {
- panic("UsingByGroup expects number of emitters to be the same as len(groups)-1")
- }
-
- // grab sublexer
- sublexer := sublexerGetFunc(groups[sublexerNameGroup])
-
- // build iterators
- iterators := make([]Iterator, len(groups)-1)
- for i, group := range groups[1:] {
- if i == codeGroup-1 && sublexer != nil {
- var err error
- iterators[i], err = sublexer.Tokenise(nil, groups[codeGroup])
- if err != nil {
- panic(err)
- }
- } else if emitters[i] != nil {
- iterators[i] = emitters[i].Emit([]string{group}, state)
- }
- }
-
- return Concaterator(iterators...)
- })
-}
-
-// Using returns an Emitter that uses a given Lexer for parsing and emitting.
-func Using(lexer Lexer) Emitter {
- return EmitterFunc(func(groups []string, _ *LexerState) Iterator {
- it, err := lexer.Tokenise(&TokeniseOptions{State: "root", Nested: true}, groups[0])
- if err != nil {
- panic(err)
- }
- return it
- })
-}
-
-// UsingSelf is like Using, but uses the current Lexer.
-func UsingSelf(stateName string) Emitter {
- return EmitterFunc(func(groups []string, state *LexerState) Iterator {
- it, err := state.Lexer.Tokenise(&TokeniseOptions{State: stateName, Nested: true}, 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 {
sort.Slice(words, func(i, j int) bool {
@@ -225,17 +75,20 @@ func (r Rules) Merge(rules Rules) Rules {
return out
}
-// MustNewLazyLexer creates a new Lexer with deferred rules generation or panics.
-func MustNewLazyLexer(config *Config, rulesFunc func() Rules) *RegexLexer {
- lexer, err := NewLazyLexer(config, rulesFunc)
+// MustNewLexer creates a new Lexer with deferred rules generation or panics.
+func MustNewLexer(config *Config, rulesFunc func() Rules) *RegexLexer {
+ lexer, err := NewLexer(config, rulesFunc)
if err != nil {
panic(err)
}
return lexer
}
-// NewLazyLexer creates a new regex-based Lexer with deferred rules generation.
-func NewLazyLexer(config *Config, rulesFunc func() Rules) (*RegexLexer, error) {
+// NewLexer creates a new regex-based Lexer.
+//
+// "rules" is a state machine transition 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, rulesFunc func() Rules) (*RegexLexer, error) {
if config == nil {
config = &Config{}
}
@@ -245,31 +98,40 @@ func NewLazyLexer(config *Config, rulesFunc func() Rules) (*RegexLexer, error) {
return nil, fmt.Errorf("%s: %q is not a valid glob: %w", config.Name, glob, err)
}
}
- return &RegexLexer{
- config: config,
- compilerFunc: rulesFunc,
- }, nil
-}
-
-// MustNewLexer creates a new Lexer or panics.
-//
-// Deprecated: Use MustNewLazyLexer instead.
-func MustNewLexer(config *Config, rules Rules) *RegexLexer { // nolint: forbidigo
- lexer, err := NewLexer(config, rules) // nolint: forbidigo
- if err != nil {
- panic(err)
+ r := &RegexLexer{
+ config: config,
+ fetchRulesFunc: func() (Rules, error) { return rulesFunc(), nil },
}
- 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.
-//
-// Deprecated: Use NewLazyLexer instead.
-func NewLexer(config *Config, rules Rules) (*RegexLexer, error) { // nolint: forbidigo
- return NewLazyLexer(config, func() Rules { return rules })
+ // One-off code to generate XML lexers in the Chroma source tree.
+ // var nameCleanRe = regexp.MustCompile(`[^-+A-Za-z0-9_]`)
+ // name := strings.ToLower(nameCleanRe.ReplaceAllString(config.Name, "_"))
+ // data, err := Marshal(r)
+ // if err != nil {
+ // if errors.Is(err, ErrNotSerialisable) {
+ // fmt.Fprintf(os.Stderr, "warning: %q: %s\n", name, err)
+ // return r, nil
+ // }
+ // return nil, err
+ // }
+ // _, file, _, ok := runtime.Caller(2)
+ // if !ok {
+ // panic("??")
+ // }
+ // fmt.Println(file)
+ // if strings.Contains(file, "/lexers/") {
+ // dir := filepath.Join(filepath.Dir(file), "embedded")
+ // err = os.MkdirAll(dir, 0700)
+ // if err != nil {
+ // return nil, err
+ // }
+ // filename := filepath.Join(dir, name) + ".xml"
+ // fmt.Println(filename)
+ // err = ioutil.WriteFile(filename, data, 0600)
+ // if err != nil {
+ // return nil, err
+ // }
+ // }
+ return r, nil
}
// Trace enables debug tracing.
@@ -292,13 +154,14 @@ type CompiledRules map[string][]*CompiledRule
// LexerState contains the state for a single lex.
type LexerState struct {
- Lexer *RegexLexer
- Text []rune
- Pos int
- Rules CompiledRules
- Stack []string
- State string
- Rule int
+ Lexer *RegexLexer
+ Registry *LexerRegistry
+ Text []rune
+ Pos int
+ Rules CompiledRules
+ Stack []string
+ State string
+ Rule int
// Group matches.
Groups []string
// Named Group matches.
@@ -398,19 +261,39 @@ func (l *LexerState) Iterator() Token { // nolint: gocognit
// RegexLexer is the default lexer implementation used in Chroma.
type RegexLexer struct {
+ registry *LexerRegistry // The LexerRegistry this Lexer is associated with, if any.
config *Config
analyser func(text string) float32
trace bool
- mu sync.Mutex
- compiled bool
- rules map[string][]*CompiledRule
- compilerFunc func() Rules
- compileOnce sync.Once
+ mu sync.Mutex
+ compiled bool
+ rawRules Rules
+ rules map[string][]*CompiledRule
+ fetchRulesFunc func() (Rules, error)
+ compileOnce sync.Once
+}
+
+func (r *RegexLexer) String() string {
+ return r.config.Name
+}
+
+// Rules in the Lexer.
+func (r *RegexLexer) Rules() (Rules, error) {
+ if err := r.needRules(); err != nil {
+ return nil, err
+ }
+ return r.rawRules, nil
+}
+
+// SetRegistry the lexer will use to lookup other lexers if necessary.
+func (r *RegexLexer) SetRegistry(registry *LexerRegistry) Lexer {
+ r.registry = registry
+ return r
}
// SetAnalyser sets the analyser function used to perform content inspection.
-func (r *RegexLexer) SetAnalyser(analyser func(text string) float32) *RegexLexer {
+func (r *RegexLexer) SetAnalyser(analyser func(text string) float32) Lexer {
r.analyser = analyser
return r
}
@@ -422,6 +305,12 @@ func (r *RegexLexer) AnalyseText(text string) float32 { // nolint
return 0.0
}
+// SetConfig replaces the Config for this Lexer.
+func (r *RegexLexer) SetConfig(config *Config) *RegexLexer {
+ r.config = config
+ return r
+}
+
func (r *RegexLexer) Config() *Config { // nolint
return r.config
}
@@ -473,8 +362,11 @@ restart:
return nil
}
-func (r *RegexLexer) compileRules() error {
- rules := r.compilerFunc()
+func (r *RegexLexer) fetchRules() error {
+ rules, err := r.fetchRulesFunc()
+ if err != nil {
+ return fmt.Errorf("%s: failed to compile rules: %w", r.config.Name, err)
+ }
if _, ok := rules["root"]; !ok {
return fmt.Errorf("no \"root\" state")
}
@@ -496,21 +388,27 @@ func (r *RegexLexer) compileRules() error {
}
}
+ r.rawRules = rules
r.rules = compiledRules
return nil
}
-func (r *RegexLexer) Tokenise(options *TokeniseOptions, text string) (Iterator, error) { // nolint
+func (r *RegexLexer) needRules() error {
var err error
- if r.compilerFunc != nil {
+ if r.fetchRulesFunc != nil {
r.compileOnce.Do(func() {
- err = r.compileRules()
+ err = r.fetchRules()
})
}
- if err != nil {
- return nil, err
- }
if err := r.maybeCompile(); err != nil {
+ return err
+ }
+ return err
+}
+
+func (r *RegexLexer) Tokenise(options *TokeniseOptions, text string) (Iterator, error) { // nolint
+ err := r.needRules()
+ if err != nil {
return nil, err
}
if options == nil {
@@ -525,6 +423,7 @@ func (r *RegexLexer) Tokenise(options *TokeniseOptions, text string) (Iterator,
newlineAdded = true
}
state := &LexerState{
+ Registry: r.registry,
newlineAdded: newlineAdded,
options: options,
Lexer: r,
@@ -536,6 +435,15 @@ func (r *RegexLexer) Tokenise(options *TokeniseOptions, text string) (Iterator,
return state.Iterator, nil
}
+// MustRules is like Rules() but will panic on error.
+func (r *RegexLexer) MustRules() Rules {
+ rules, err := r.Rules()
+ if err != nil {
+ panic(err)
+ }
+ return rules
+}
+
func matchRules(text []rune, pos int, rules []*CompiledRule) (int, *CompiledRule, []string, map[string]string) {
for i, rule := range rules {
match, err := rule.Regexp.FindRunesMatchStartingAt(text, pos)
diff --git a/regexp_test.go b/regexp_test.go
index 96b54dd..cc2dcd8 100644
--- a/regexp_test.go
+++ b/regexp_test.go
@@ -4,10 +4,19 @@ import (
"testing"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
+func mustNewLexer(t *testing.T, config *Config, rules Rules) *RegexLexer { // nolint: forbidigo
+ lexer, err := NewLexer(config, func() Rules {
+ return rules
+ })
+ require.NoError(t, err)
+ return lexer
+}
+
func TestNewlineAtEndOfFile(t *testing.T) {
- l := Coalesce(MustNewLexer(&Config{EnsureNL: true}, Rules{ // nolint: forbidigo
+ l := Coalesce(mustNewLexer(t, &Config{EnsureNL: true}, Rules{ // nolint: forbidigo
"root": {
{`(\w+)(\n)`, ByGroups(Keyword, Whitespace), nil},
},
@@ -16,7 +25,7 @@ func TestNewlineAtEndOfFile(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, []Token{{Keyword, "hello"}, {Whitespace, "\n"}}, it.Tokens())
- l = Coalesce(MustNewLexer(nil, Rules{ // nolint: forbidigo
+ l = Coalesce(mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{`(\w+)(\n)`, ByGroups(Keyword, Whitespace), nil},
},
@@ -27,7 +36,7 @@ func TestNewlineAtEndOfFile(t *testing.T) {
}
func TestMatchingAtStart(t *testing.T) {
- l := Coalesce(MustNewLexer(&Config{}, Rules{ // nolint: forbidigo
+ l := Coalesce(mustNewLexer(t, &Config{}, Rules{ // nolint: forbidigo
"root": {
{`\s+`, Whitespace, nil},
{`^-`, Punctuation, Push("directive")},
@@ -45,7 +54,7 @@ func TestMatchingAtStart(t *testing.T) {
}
func TestEnsureLFOption(t *testing.T) {
- l := Coalesce(MustNewLexer(&Config{}, Rules{ // nolint: forbidigo
+ l := Coalesce(mustNewLexer(t, &Config{}, Rules{ // nolint: forbidigo
"root": {
{`(\w+)(\r?\n|\r)`, ByGroups(Keyword, Whitespace), nil},
},
@@ -62,7 +71,7 @@ func TestEnsureLFOption(t *testing.T) {
{Whitespace, "\n"},
}, it.Tokens())
- l = Coalesce(MustNewLexer(nil, Rules{ // nolint: forbidigo
+ l = Coalesce(mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{`(\w+)(\r?\n|\r)`, ByGroups(Keyword, Whitespace), nil},
},
@@ -101,7 +110,7 @@ func TestEnsureLFFunc(t *testing.T) {
}
func TestByGroupNames(t *testing.T) {
- l := Coalesce(MustNewLexer(nil, Rules{ // nolint: forbidigo
+ l := Coalesce(mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{
`(?\w+)(?=)(?\w+)`,
@@ -118,7 +127,7 @@ func TestByGroupNames(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, []Token{{String, `abc`}, {Operator, `=`}, {String, `123`}}, it.Tokens())
- l = Coalesce(MustNewLexer(nil, Rules{ // nolint: forbidigo
+ l = Coalesce(mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{
`(?\w+)(?=)(?\w+)`,
@@ -134,7 +143,7 @@ func TestByGroupNames(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, []Token{{String, `abc`}, {Error, `=`}, {String, `123`}}, it.Tokens())
- l = Coalesce(MustNewLexer(nil, Rules{ // nolint: forbidigo
+ l = Coalesce(mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{
`(?\w+)=(?\w+)`,
@@ -150,7 +159,7 @@ func TestByGroupNames(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, []Token{{String, `abc123`}}, it.Tokens())
- l = Coalesce(MustNewLexer(nil, Rules{ // nolint: forbidigo
+ l = Coalesce(mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{
`(?\w+)(?=)(?\w+)`,
@@ -167,7 +176,7 @@ func TestByGroupNames(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, []Token{{String, `abc`}, {Error, `=`}, {String, `123`}}, it.Tokens())
- l = Coalesce(MustNewLexer(nil, Rules{ // nolint: forbidigo
+ l = Coalesce(mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{
`\w+=\w+`,
diff --git a/lexers/internal/api.go b/registry.go
similarity index 57%
rename from lexers/internal/api.go
rename to registry.go
index 12fa45f..b047dfc 100644
--- a/lexers/internal/api.go
+++ b/registry.go
@@ -1,12 +1,9 @@
-// Package internal contains common API functions and structures shared between lexer packages.
-package internal
+package chroma
import (
"path/filepath"
"sort"
"strings"
-
- "github.com/alecthomas/chroma"
)
var (
@@ -22,20 +19,25 @@ var (
}
)
-// 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{},
+// LexerRegistry is a registry of Lexers.
+type LexerRegistry struct {
+ Lexers Lexers
+ byName map[string]Lexer
+ byAlias map[string]Lexer
+}
+
+// NewLexerRegistry creates a new LexerRegistry of Lexers.
+func NewLexerRegistry() *LexerRegistry {
+ return &LexerRegistry{
+ byName: map[string]Lexer{},
+ byAlias: map[string]Lexer{},
+ }
}
// Names of all lexers, optionally including aliases.
-func Names(withAliases bool) []string {
+func (l *LexerRegistry) Names(withAliases bool) []string {
out := []string{}
- for _, lexer := range Registry.Lexers {
+ for _, lexer := range l.Lexers {
config := lexer.Config()
out = append(out, config.Name)
if withAliases {
@@ -47,27 +49,27 @@ func Names(withAliases bool) []string {
}
// Get a Lexer by name, alias or file extension.
-func Get(name string) chroma.Lexer {
- if lexer := Registry.byName[name]; lexer != nil {
+func (l *LexerRegistry) Get(name string) Lexer {
+ if lexer := l.byName[name]; lexer != nil {
return lexer
}
- if lexer := Registry.byAlias[name]; lexer != nil {
+ if lexer := l.byAlias[name]; lexer != nil {
return lexer
}
- if lexer := Registry.byName[strings.ToLower(name)]; lexer != nil {
+ if lexer := l.byName[strings.ToLower(name)]; lexer != nil {
return lexer
}
- if lexer := Registry.byAlias[strings.ToLower(name)]; lexer != nil {
+ if lexer := l.byAlias[strings.ToLower(name)]; lexer != nil {
return lexer
}
- candidates := chroma.PrioritisedLexers{}
+ candidates := PrioritisedLexers{}
// Try file extension.
- if lexer := Match("filename." + name); lexer != nil {
+ if lexer := l.Match("filename." + name); lexer != nil {
candidates = append(candidates, lexer)
}
// Try exact filename.
- if lexer := Match(name); lexer != nil {
+ if lexer := l.Match(name); lexer != nil {
candidates = append(candidates, lexer)
}
if len(candidates) == 0 {
@@ -78,9 +80,9 @@ func Get(name string) chroma.Lexer {
}
// MatchMimeType attempts to find a lexer for the given MIME type.
-func MatchMimeType(mimeType string) chroma.Lexer {
- matched := chroma.PrioritisedLexers{}
- for _, l := range Registry.Lexers {
+func (l *LexerRegistry) MatchMimeType(mimeType string) Lexer {
+ matched := PrioritisedLexers{}
+ for _, l := range l.Lexers {
for _, lmt := range l.Config().MimeTypes {
if mimeType == lmt {
matched = append(matched, l)
@@ -95,11 +97,11 @@ func MatchMimeType(mimeType string) chroma.Lexer {
}
// Match returns the first lexer matching filename.
-func Match(filename string) chroma.Lexer {
+func (l *LexerRegistry) Match(filename string) Lexer {
filename = filepath.Base(filename)
- matched := chroma.PrioritisedLexers{}
+ matched := PrioritisedLexers{}
// First, try primary filename matches.
- for _, lexer := range Registry.Lexers {
+ for _, lexer := range l.Lexers {
config := lexer.Config()
for _, glob := range config.Filenames {
ok, err := filepath.Match(glob, filename)
@@ -126,7 +128,7 @@ func Match(filename string) chroma.Lexer {
}
matched = nil
// Next, try filename aliases.
- for _, lexer := range Registry.Lexers {
+ for _, lexer := range l.Lexers {
config := lexer.Config()
for _, glob := range config.AliasFilenames {
ok, err := filepath.Match(glob, filename)
@@ -155,11 +157,11 @@ func Match(filename string) chroma.Lexer {
}
// Analyse text content and return the "best" lexer..
-func Analyse(text string) chroma.Lexer {
- var picked chroma.Lexer
+func (l *LexerRegistry) Analyse(text string) Lexer {
+ var picked Lexer
highest := float32(0.0)
- for _, lexer := range Registry.Lexers {
- if analyser, ok := lexer.(chroma.Analyser); ok {
+ for _, lexer := range l.Lexers {
+ if analyser, ok := lexer.(Analyser); ok {
weight := analyser.AnalyseText(text)
if weight > highest {
picked = lexer
@@ -170,32 +172,16 @@ func Analyse(text string) chroma.Lexer {
return picked
}
-// Register a Lexer with the global registry.
-func Register(lexer chroma.Lexer) chroma.Lexer {
+// Register a Lexer with the LexerRegistry.
+func (l *LexerRegistry) Register(lexer Lexer) Lexer {
+ lexer.SetRegistry(l)
config := lexer.Config()
- Registry.byName[config.Name] = lexer
- Registry.byName[strings.ToLower(config.Name)] = lexer
+ l.byName[config.Name] = lexer
+ l.byName[strings.ToLower(config.Name)] = lexer
for _, alias := range config.Aliases {
- Registry.byAlias[alias] = lexer
- Registry.byAlias[strings.ToLower(alias)] = lexer
+ l.byAlias[alias] = lexer
+ l.byAlias[strings.ToLower(alias)] = lexer
}
- Registry.Lexers = append(Registry.Lexers, lexer)
+ l.Lexers = append(l.Lexers, lexer)
return lexer
}
-
-// PlaintextRules is used for the fallback lexer as well as the explicit
-// plaintext lexer.
-func PlaintextRules() chroma.Rules {
- return chroma.Rules{
- "root": []chroma.Rule{
- {`.+`, chroma.Text, nil},
- {`\n`, chroma.Text, nil},
- },
- }
-}
-
-// Fallback lexer if no other is found.
-var Fallback chroma.Lexer = chroma.MustNewLazyLexer(&chroma.Config{
- Name: "fallback",
- Filenames: []string{"*"},
-}, PlaintextRules)
diff --git a/remap.go b/remap.go
index cfb5c38..440761b 100644
--- a/remap.go
+++ b/remap.go
@@ -10,6 +10,20 @@ func RemappingLexer(lexer Lexer, mapper func(Token) []Token) Lexer {
return &remappingLexer{lexer, mapper}
}
+func (r *remappingLexer) AnalyseText(text string) float32 {
+ return r.lexer.AnalyseText(text)
+}
+
+func (r *remappingLexer) SetAnalyser(analyser func(text string) float32) Lexer {
+ r.lexer.SetAnalyser(analyser)
+ return r
+}
+
+func (r *remappingLexer) SetRegistry(registry *LexerRegistry) Lexer {
+ r.lexer.SetRegistry(registry)
+ return r
+}
+
func (r *remappingLexer) Config() *Config {
return r.lexer.Config()
}
diff --git a/remap_test.go b/remap_test.go
index 460cfe0..4f9cc7c 100644
--- a/remap_test.go
+++ b/remap_test.go
@@ -7,7 +7,7 @@ import (
)
func TestRemappingLexer(t *testing.T) {
- var lexer Lexer = MustNewLexer(nil, Rules{ // nolint: forbidigo
+ var lexer Lexer = mustNewLexer(t, nil, Rules{ // nolint: forbidigo
"root": {
{`\s+`, Whitespace, nil},
{`\w+`, Name, nil},
diff --git a/serialise.go b/serialise.go
new file mode 100644
index 0000000..0369639
--- /dev/null
+++ b/serialise.go
@@ -0,0 +1,433 @@
+package chroma
+
+import (
+ "compress/gzip"
+ "encoding/xml"
+ "errors"
+ "fmt"
+ "io"
+ "io/fs"
+ "path/filepath"
+ "reflect"
+ "regexp"
+ "strings"
+)
+
+// Serialisation of Chroma rules to XML. The format is:
+//
+//
+//
+//
+// [<$EMITTER ...>]
+// [<$MUTATOR ...>]
+//
+//
+//
+//
+// eg. Include("String") would become:
+//
+//
+//
+//
+//
+// [null, null, {"kind": "include", "state": "String"}]
+//
+// eg. Rule{`\d+`, Text, nil} would become:
+//
+//
+//
+//
+//
+// eg. Rule{`"`, String, Push("String")}
+//
+//
+//
+//
+//
+//
+// eg. Rule{`(\w+)(\n)`, ByGroups(Keyword, Whitespace), nil},
+//
+//
+//
+//
+//
+var (
+ // ErrNotSerialisable is returned if a lexer contains Rules that cannot be serialised.
+ ErrNotSerialisable = fmt.Errorf("not serialisable")
+ emitterTemplates = func() map[string]SerialisableEmitter {
+ out := map[string]SerialisableEmitter{}
+ for _, emitter := range []SerialisableEmitter{
+ &byGroupsEmitter{},
+ &usingSelfEmitter{},
+ TokenType(0),
+ &usingEmitter{},
+ &usingByGroup{},
+ } {
+ out[emitter.EmitterKind()] = emitter
+ }
+ return out
+ }()
+ mutatorTemplates = func() map[string]SerialisableMutator {
+ out := map[string]SerialisableMutator{}
+ for _, mutator := range []SerialisableMutator{
+ &includeMutator{},
+ &combinedMutator{},
+ &multiMutator{},
+ &pushMutator{},
+ &popMutator{},
+ } {
+ out[mutator.MutatorKind()] = mutator
+ }
+ return out
+ }()
+)
+
+// fastUnmarshalConfig unmarshals only the Config from a serialised lexer.
+func fastUnmarshalConfig(from fs.FS, path string) (*Config, error) {
+ r, err := from.Open(path)
+ if err != nil {
+ return nil, err
+ }
+ defer r.Close()
+ dec := xml.NewDecoder(r)
+ for {
+ token, err := dec.Token()
+ if err != nil {
+ if errors.Is(err, io.EOF) {
+ return nil, fmt.Errorf("could not find element")
+ }
+ return nil, err
+ }
+ switch se := token.(type) {
+ case xml.StartElement:
+ if se.Name.Local != "config" {
+ break
+ }
+
+ var config Config
+ err = dec.DecodeElement(&config, &se)
+ if err != nil {
+ panic(err)
+ }
+ return &config, nil
+ }
+ }
+}
+
+// MustNewXMLLexer constructs a new RegexLexer from an XML file or panics.
+func MustNewXMLLexer(from fs.FS, path string) *RegexLexer {
+ lex, err := NewXMLLexer(from, path)
+ if err != nil {
+ panic(err)
+ }
+ return lex
+}
+
+// NewXMLLexer creates a new RegexLexer from a serialised RegexLexer.
+func NewXMLLexer(from fs.FS, path string) (*RegexLexer, error) {
+ config, err := fastUnmarshalConfig(from, path)
+ if err != nil {
+ return nil, err
+ }
+ for _, glob := range append(config.Filenames, config.AliasFilenames...) {
+ _, err := filepath.Match(glob, "")
+ if err != nil {
+ return nil, fmt.Errorf("%s: %q is not a valid glob: %w", config.Name, glob, err)
+ }
+ }
+ return &RegexLexer{
+ config: config,
+ fetchRulesFunc: func() (Rules, error) {
+ var lexer struct {
+ Config
+ Rules Rules `xml:"rules"`
+ }
+ // Try to open .xml fallback to .xml.gz
+ fr, err := from.Open(path)
+ if err != nil {
+ if errors.Is(err, fs.ErrNotExist) {
+ path += ".gz"
+ fr, err = from.Open(path)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ return nil, err
+ }
+ }
+ defer fr.Close()
+ var r io.Reader = fr
+ if strings.HasSuffix(path, ".gz") {
+ r, err = gzip.NewReader(r)
+ if err != nil {
+ return nil, fmt.Errorf("%s: %w", path, err)
+ }
+ }
+ err = xml.NewDecoder(r).Decode(&lexer)
+ if err != nil {
+ return nil, fmt.Errorf("%s: %w", path, err)
+ }
+ return lexer.Rules, nil
+ },
+ }, nil
+}
+
+// Marshal a RegexLexer to XML.
+func Marshal(l *RegexLexer) ([]byte, error) {
+ type lexer struct {
+ Config Config `xml:"config"`
+ Rules Rules `xml:"rules"`
+ }
+
+ rules, err := l.Rules()
+ if err != nil {
+ return nil, err
+ }
+ root := &lexer{
+ Config: *l.Config(),
+ Rules: rules,
+ }
+ data, err := xml.MarshalIndent(root, "", " ")
+ if err != nil {
+ return nil, err
+ }
+ re := regexp.MustCompile(`>[a-zA-Z]+>`)
+ data = re.ReplaceAll(data, []byte(`/>`))
+ return data, nil
+}
+
+// Unmarshal a RegexLexer from XML.
+func Unmarshal(data []byte) (*RegexLexer, error) {
+ type lexer struct {
+ Config Config `xml:"config"`
+ Rules Rules `xml:"rules"`
+ }
+ root := &lexer{}
+ err := xml.Unmarshal(data, root)
+ if err != nil {
+ return nil, fmt.Errorf("invalid Lexer XML: %w", err)
+ }
+ lex, err := NewLexer(&root.Config, func() Rules { return root.Rules })
+ if err != nil {
+ return nil, err
+ }
+ return lex, nil
+}
+
+func marshalMutator(e *xml.Encoder, mutator Mutator) error {
+ if mutator == nil {
+ return nil
+ }
+ smutator, ok := mutator.(SerialisableMutator)
+ if !ok {
+ return fmt.Errorf("unsupported mutator: %w", ErrNotSerialisable)
+ }
+ return e.EncodeElement(mutator, xml.StartElement{Name: xml.Name{Local: smutator.MutatorKind()}})
+}
+
+func unmarshalMutator(d *xml.Decoder, start xml.StartElement) (Mutator, error) {
+ kind := start.Name.Local
+ mutator, ok := mutatorTemplates[kind]
+ if !ok {
+ return nil, fmt.Errorf("unknown mutator %q: %w", kind, ErrNotSerialisable)
+ }
+ value, target := newFromTemplate(mutator)
+ if err := d.DecodeElement(target, &start); err != nil {
+ return nil, err
+ }
+ return value().(SerialisableMutator), nil
+}
+
+func marshalEmitter(e *xml.Encoder, emitter Emitter) error {
+ if emitter == nil {
+ return nil
+ }
+ semitter, ok := emitter.(SerialisableEmitter)
+ if !ok {
+ return fmt.Errorf("unsupported emitter %T: %w", emitter, ErrNotSerialisable)
+ }
+ return e.EncodeElement(emitter, xml.StartElement{
+ Name: xml.Name{Local: semitter.EmitterKind()},
+ })
+}
+
+func unmarshalEmitter(d *xml.Decoder, start xml.StartElement) (Emitter, error) {
+ kind := start.Name.Local
+ mutator, ok := emitterTemplates[kind]
+ if !ok {
+ return nil, fmt.Errorf("unknown emitter %q: %w", kind, ErrNotSerialisable)
+ }
+ value, target := newFromTemplate(mutator)
+ if err := d.DecodeElement(target, &start); err != nil {
+ return nil, err
+ }
+ return value().(SerialisableEmitter), nil
+}
+
+func (r Rule) MarshalXML(e *xml.Encoder, _ xml.StartElement) error {
+ start := xml.StartElement{
+ Name: xml.Name{Local: "rule"},
+ }
+ if r.Pattern != "" {
+ start.Attr = append(start.Attr, xml.Attr{
+ Name: xml.Name{Local: "pattern"},
+ Value: r.Pattern,
+ })
+ }
+ if err := e.EncodeToken(start); err != nil {
+ return err
+ }
+ if err := marshalEmitter(e, r.Type); err != nil {
+ return err
+ }
+ if err := marshalMutator(e, r.Mutator); err != nil {
+ return err
+ }
+ return e.EncodeToken(xml.EndElement{Name: start.Name})
+}
+
+func (r *Rule) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ for _, attr := range start.Attr {
+ if attr.Name.Local == "pattern" {
+ r.Pattern = attr.Value
+ break
+ }
+ }
+ for {
+ token, err := d.Token()
+ if err != nil {
+ return err
+ }
+ switch token := token.(type) {
+ case xml.StartElement:
+ mutator, err := unmarshalMutator(d, token)
+ if err != nil && !errors.Is(err, ErrNotSerialisable) {
+ return err
+ } else if err == nil {
+ if r.Mutator != nil {
+ return fmt.Errorf("duplicate mutator")
+ }
+ r.Mutator = mutator
+ continue
+ }
+ emitter, err := unmarshalEmitter(d, token)
+ if err != nil && !errors.Is(err, ErrNotSerialisable) { // nolint: gocritic
+ return err
+ } else if err == nil {
+ if r.Type != nil {
+ return fmt.Errorf("duplicate emitter")
+ }
+ r.Type = emitter
+ continue
+ } else {
+ return err
+ }
+
+ case xml.EndElement:
+ return nil
+ }
+ }
+}
+
+type xmlRuleState struct {
+ Name string `xml:"name,attr"`
+ Rules []Rule `xml:"rule"`
+}
+
+type xmlRules struct {
+ States []xmlRuleState `xml:"state"`
+}
+
+func (r Rules) MarshalXML(e *xml.Encoder, _ xml.StartElement) error {
+ xr := xmlRules{}
+ for state, rules := range r {
+ xr.States = append(xr.States, xmlRuleState{
+ Name: state,
+ Rules: rules,
+ })
+ }
+ return e.EncodeElement(xr, xml.StartElement{Name: xml.Name{Local: "rules"}})
+}
+
+func (r *Rules) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ xr := xmlRules{}
+ if err := d.DecodeElement(&xr, &start); err != nil {
+ return err
+ }
+ if *r == nil {
+ *r = Rules{}
+ }
+ for _, state := range xr.States {
+ (*r)[state.Name] = state.Rules
+ }
+ return nil
+}
+
+type xmlTokenType struct {
+ Type string `xml:"type,attr"`
+}
+
+func (t *TokenType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ el := xmlTokenType{}
+ if err := d.DecodeElement(&el, &start); err != nil {
+ return err
+ }
+ for tt, text := range _TokenType_map {
+ if text == el.Type {
+ *t = tt
+ return nil
+ }
+ }
+ return fmt.Errorf("unknown TokenType %q", el.Type)
+}
+
+func (t TokenType) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ start.Attr = append(start.Attr, xml.Attr{Name: xml.Name{Local: "type"}, Value: t.String()})
+ if err := e.EncodeToken(start); err != nil {
+ return err
+ }
+ return e.EncodeToken(xml.EndElement{Name: start.Name})
+}
+
+// This hijinks is a bit unfortunate but without it we can't deserialise into TokenType.
+func newFromTemplate(template interface{}) (value func() interface{}, target interface{}) {
+ t := reflect.TypeOf(template)
+ if t.Kind() == reflect.Ptr {
+ v := reflect.New(t.Elem())
+ return v.Interface, v.Interface()
+ }
+ v := reflect.New(t)
+ return func() interface{} { return v.Elem().Interface() }, v.Interface()
+}
+
+func (b *Emitters) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
+ for {
+ token, err := d.Token()
+ if err != nil {
+ return err
+ }
+ switch token := token.(type) {
+ case xml.StartElement:
+ emitter, err := unmarshalEmitter(d, token)
+ if err != nil {
+ return err
+ }
+ *b = append(*b, emitter)
+
+ case xml.EndElement:
+ return nil
+ }
+ }
+}
+
+func (b Emitters) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
+ if err := e.EncodeToken(start); err != nil {
+ return err
+ }
+ for _, m := range b {
+ if err := marshalEmitter(e, m); err != nil {
+ return err
+ }
+ }
+ return e.EncodeToken(xml.EndElement{Name: start.Name})
+}
diff --git a/serialise_test.go b/serialise_test.go
new file mode 100644
index 0000000..ea78df1
--- /dev/null
+++ b/serialise_test.go
@@ -0,0 +1,166 @@
+package chroma
+
+import (
+ "bytes"
+ "compress/gzip"
+ "encoding/xml"
+ "fmt"
+ "regexp"
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+func TestEmitterSerialisationRoundTrip(t *testing.T) {
+ tests := []struct {
+ name string
+ emitter Emitter
+ }{
+ {"ByGroups", ByGroups(Name, Using("Go"))},
+ {"UsingSelf", UsingSelf("root")},
+ {"Using", Using("Go")},
+ {"UsingByGroup", UsingByGroup(1, 2, Name)},
+ {"TokenType", Name},
+ }
+ for _, test := range tests {
+ // nolint: scopelint
+ t.Run(test.name, func(t *testing.T) {
+ data, err := xml.Marshal(test.emitter)
+ require.NoError(t, err)
+ t.Logf("%s", data)
+ value, target := newFromTemplate(test.emitter)
+ err = xml.Unmarshal(data, target)
+ require.NoError(t, err)
+ require.Equal(t, test.emitter, value())
+ })
+ }
+}
+
+func TestMutatorSerialisationRoundTrip(t *testing.T) {
+ tests := []struct {
+ name string
+ mutator Mutator
+ }{
+ {"Include", Include("string").Mutator},
+ {"Combined", Combined("a", "b", "c")},
+ {"Multi", Mutators(Include("string").Mutator, Push("quote"))},
+ {"Push", Push("include")},
+ {"Pop", Pop(1)},
+ }
+ for _, test := range tests {
+ // nolint: scopelint
+ t.Run(test.name, func(t *testing.T) {
+ data, err := xml.Marshal(test.mutator)
+ require.NoError(t, err)
+ t.Logf("%s", data)
+ value, target := newFromTemplate(test.mutator)
+ err = xml.Unmarshal(data, target)
+ require.NoError(t, err)
+ require.Equal(t, test.mutator, value())
+ })
+ }
+}
+
+func TestMarshal(t *testing.T) {
+ actual := MustNewLexer(&Config{
+ Name: "PkgConfig",
+ Aliases: []string{"pkgconfig"},
+ Filenames: []string{"*.pc"},
+ }, func() Rules {
+ return 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},
+ },
+ }
+ })
+ data, err := Marshal(actual)
+ require.NoError(t, err)
+ expected, err := Unmarshal(data)
+ require.NoError(t, err)
+ require.Equal(t, expected.Config(), actual.Config())
+ require.Equal(t, mustRules(t, expected), mustRules(t, actual))
+}
+
+func mustRules(t testing.TB, r *RegexLexer) Rules {
+ t.Helper()
+ rules, err := r.Rules()
+ require.NoError(t, err)
+ return rules
+}
+
+func TestRuleSerialisation(t *testing.T) {
+ tests := []Rule{
+ Include("String"),
+ {`\d+`, Text, nil},
+ {`"`, String, Push("String")},
+ }
+ for _, test := range tests {
+ data, err := xml.Marshal(test)
+ require.NoError(t, err)
+ t.Log(string(data))
+ actual := Rule{}
+ err = xml.Unmarshal(data, &actual)
+ require.NoError(t, err)
+ require.Equal(t, test, actual)
+ }
+}
+
+func TestRulesSerialisation(t *testing.T) {
+ expected := 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},
+ },
+ }
+ data, err := xml.MarshalIndent(expected, " ", " ")
+ require.NoError(t, err)
+ re := regexp.MustCompile(`>[a-zA-Z]+>`)
+ data = re.ReplaceAll(data, []byte(`/>`))
+ b := &bytes.Buffer{}
+ w := gzip.NewWriter(b)
+ fmt.Fprintln(w, string(data))
+ w.Close()
+ actual := Rules{}
+ err = xml.Unmarshal(data, &actual)
+ require.NoError(t, err)
+ require.Equal(t, expected, actual)
+}
diff --git a/styles/abap.go b/styles/abap.go
index b6d07fb..2807dc7 100644
--- a/styles/abap.go
+++ b/styles/abap.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Abap style.
diff --git a/styles/algol.go b/styles/algol.go
index 1e8a7b4..b38715e 100644
--- a/styles/algol.go
+++ b/styles/algol.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Algol style.
diff --git a/styles/algol_nu.go b/styles/algol_nu.go
index f8c6f17..487086d 100644
--- a/styles/algol_nu.go
+++ b/styles/algol_nu.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// AlgolNu style.
diff --git a/styles/api.go b/styles/api.go
index f3ce673..8c0dbe0 100644
--- a/styles/api.go
+++ b/styles/api.go
@@ -3,7 +3,7 @@ package styles
import (
"sort"
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Registry of Styles.
diff --git a/styles/arduino.go b/styles/arduino.go
index 9e48fb4..3099b7e 100644
--- a/styles/arduino.go
+++ b/styles/arduino.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Arduino style.
diff --git a/styles/autumn.go b/styles/autumn.go
index 3966372..df22500 100644
--- a/styles/autumn.go
+++ b/styles/autumn.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Autumn style.
diff --git a/styles/base16-snazzy.go b/styles/base16-snazzy.go
index 160c75b..731dba8 100644
--- a/styles/base16-snazzy.go
+++ b/styles/base16-snazzy.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Base16Snazzy style
diff --git a/styles/borland.go b/styles/borland.go
index 9c0fff6..4d192b1 100644
--- a/styles/borland.go
+++ b/styles/borland.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Borland style.
diff --git a/styles/bw.go b/styles/bw.go
index 3e800d5..2f41f20 100644
--- a/styles/bw.go
+++ b/styles/bw.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// BlackWhite style.
diff --git a/styles/colorful.go b/styles/colorful.go
index dc77c5b..69f0373 100644
--- a/styles/colorful.go
+++ b/styles/colorful.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Colorful style.
diff --git a/styles/doom-one.go b/styles/doom-one.go
index 6450455..8bca8aa 100644
--- a/styles/doom-one.go
+++ b/styles/doom-one.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Doom One style. Inspired by Atom One and Doom Emacs's Atom One theme
diff --git a/styles/doom-one2.go b/styles/doom-one2.go
index 4654173..080f6d7 100644
--- a/styles/doom-one2.go
+++ b/styles/doom-one2.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Doom One 2 style. Inspired by Atom One and Doom Emacs's Atom One theme
diff --git a/styles/dracula.go b/styles/dracula.go
index d1542f2..67fdfca 100644
--- a/styles/dracula.go
+++ b/styles/dracula.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Dracula Style
diff --git a/styles/emacs.go b/styles/emacs.go
index 4835abd..461f197 100644
--- a/styles/emacs.go
+++ b/styles/emacs.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Emacs style.
diff --git a/styles/friendly.go b/styles/friendly.go
index ad02341..f3b49c5 100644
--- a/styles/friendly.go
+++ b/styles/friendly.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Friendly style.
diff --git a/styles/fruity.go b/styles/fruity.go
index c2577fa..6ed99b7 100644
--- a/styles/fruity.go
+++ b/styles/fruity.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Fruity style.
diff --git a/styles/github.go b/styles/github.go
index 7ef2481..b1ef17f 100644
--- a/styles/github.go
+++ b/styles/github.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// GitHub style.
diff --git a/styles/gruvbox.go b/styles/gruvbox.go
index 406133d..44ccf9b 100644
--- a/styles/gruvbox.go
+++ b/styles/gruvbox.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Gruvbox style.
diff --git a/styles/hr_dark.go b/styles/hr_dark.go
index 10bb64f..74867f6 100644
--- a/styles/hr_dark.go
+++ b/styles/hr_dark.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Theme based on HackerRank Dark Editor theme
diff --git a/styles/hr_high_contrast.go b/styles/hr_high_contrast.go
index d198858..6bf2eb2 100644
--- a/styles/hr_high_contrast.go
+++ b/styles/hr_high_contrast.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Theme based on HackerRank High Contrast Editor Theme
diff --git a/styles/igor.go b/styles/igor.go
index 6a6d4cd..fef8eee 100644
--- a/styles/igor.go
+++ b/styles/igor.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Igor style.
diff --git a/styles/lovelace.go b/styles/lovelace.go
index 074cc08..9099920 100644
--- a/styles/lovelace.go
+++ b/styles/lovelace.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Lovelace style.
diff --git a/styles/manni.go b/styles/manni.go
index 9942e7d..c958176 100644
--- a/styles/manni.go
+++ b/styles/manni.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Manni style.
diff --git a/styles/monokai.go b/styles/monokai.go
index 2586795..85647a2 100644
--- a/styles/monokai.go
+++ b/styles/monokai.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Monokai style.
diff --git a/styles/monokailight.go b/styles/monokailight.go
index 61818a6..74af78e 100644
--- a/styles/monokailight.go
+++ b/styles/monokailight.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// MonokaiLight style.
diff --git a/styles/murphy.go b/styles/murphy.go
index 90e83c7..d0d6ae0 100644
--- a/styles/murphy.go
+++ b/styles/murphy.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Murphy style.
diff --git a/styles/native.go b/styles/native.go
index 9fae09a..2c6dfdb 100644
--- a/styles/native.go
+++ b/styles/native.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Native style.
diff --git a/styles/nord.go b/styles/nord.go
index 0fcbc5d..7763541 100644
--- a/styles/nord.go
+++ b/styles/nord.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
var (
diff --git a/styles/onesenterprise.go b/styles/onesenterprise.go
index 9048e38..7273b03 100644
--- a/styles/onesenterprise.go
+++ b/styles/onesenterprise.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// 1S:Designer color palette
diff --git a/styles/paraiso-dark.go b/styles/paraiso-dark.go
index c8cf473..d0c534a 100644
--- a/styles/paraiso-dark.go
+++ b/styles/paraiso-dark.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// ParaisoDark style.
diff --git a/styles/paraiso-light.go b/styles/paraiso-light.go
index b514dfa..4048b26 100644
--- a/styles/paraiso-light.go
+++ b/styles/paraiso-light.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// ParaisoLight style.
diff --git a/styles/pastie.go b/styles/pastie.go
index 9a68544..8e41b50 100644
--- a/styles/pastie.go
+++ b/styles/pastie.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Pastie style.
diff --git a/styles/perldoc.go b/styles/perldoc.go
index e1372fd..813b713 100644
--- a/styles/perldoc.go
+++ b/styles/perldoc.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Perldoc style.
diff --git a/styles/pygments.go b/styles/pygments.go
index 327033b..856e387 100644
--- a/styles/pygments.go
+++ b/styles/pygments.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Pygments default theme.
diff --git a/styles/rainbow_dash.go b/styles/rainbow_dash.go
index 37d66ca..b681eb1 100644
--- a/styles/rainbow_dash.go
+++ b/styles/rainbow_dash.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// RainbowDash style.
diff --git a/styles/rrt.go b/styles/rrt.go
index 2ccf2ca..6eda8c4 100644
--- a/styles/rrt.go
+++ b/styles/rrt.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Rrt style.
diff --git a/styles/solarized-dark.go b/styles/solarized-dark.go
index 2724df2..91ce4d9 100644
--- a/styles/solarized-dark.go
+++ b/styles/solarized-dark.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// SolarizedDark style.
diff --git a/styles/solarized-dark256.go b/styles/solarized-dark256.go
index a24ddc1..8e31392 100644
--- a/styles/solarized-dark256.go
+++ b/styles/solarized-dark256.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// SolarizedDark256 style.
diff --git a/styles/solarized-light.go b/styles/solarized-light.go
index b6d5234..517fd02 100644
--- a/styles/solarized-light.go
+++ b/styles/solarized-light.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// SolarizedLight style.
diff --git a/styles/swapoff.go b/styles/swapoff.go
index e4daae6..0cf7135 100644
--- a/styles/swapoff.go
+++ b/styles/swapoff.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// SwapOff theme.
diff --git a/styles/tango.go b/styles/tango.go
index ae1afe0..5608752 100644
--- a/styles/tango.go
+++ b/styles/tango.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Tango style.
diff --git a/styles/trac.go b/styles/trac.go
index 3b09c44..c149cd2 100644
--- a/styles/trac.go
+++ b/styles/trac.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Trac style.
diff --git a/styles/vim.go b/styles/vim.go
index 6296042..caa2e09 100644
--- a/styles/vim.go
+++ b/styles/vim.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Vim style.
diff --git a/styles/vs.go b/styles/vs.go
index acbcb91..c601a31 100644
--- a/styles/vs.go
+++ b/styles/vs.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// VisualStudio style.
diff --git a/styles/vulcan.go b/styles/vulcan.go
index 82ad1a1..4060422 100644
--- a/styles/vulcan.go
+++ b/styles/vulcan.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
var (
diff --git a/styles/witchhazel.go b/styles/witchhazel.go
index 4aea278..201e697 100644
--- a/styles/witchhazel.go
+++ b/styles/witchhazel.go
@@ -15,7 +15,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// WitchHazel Style
diff --git a/styles/xcode-dark.go b/styles/xcode-dark.go
index 9a9d757..80a2a83 100644
--- a/styles/xcode-dark.go
+++ b/styles/xcode-dark.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
var (
diff --git a/styles/xcode.go b/styles/xcode.go
index 115cf71..592c9e3 100644
--- a/styles/xcode.go
+++ b/styles/xcode.go
@@ -1,7 +1,7 @@
package styles
import (
- "github.com/alecthomas/chroma"
+ "github.com/alecthomas/chroma/v2"
)
// Xcode style.
diff --git a/types.go b/types.go
index 3f15be8..2ff8928 100644
--- a/types.go
+++ b/types.go
@@ -1,7 +1,6 @@
package chroma
import (
- "encoding/json"
"fmt"
)
@@ -12,22 +11,6 @@ import (
// It is also an Emitter, emitting a single token of itself
type TokenType int
-func (t TokenType) MarshalJSON() ([]byte, error) { return json.Marshal(t.String()) }
-func (t *TokenType) UnmarshalJSON(data []byte) error {
- key := ""
- err := json.Unmarshal(data, &key)
- if err != nil {
- return err
- }
- for tt, text := range _TokenType_map {
- if text == key {
- *t = tt
- return nil
- }
- }
- return fmt.Errorf("unknown TokenType %q", data)
-}
-
// Set of TokenTypes.
//
// Categories of types are grouped in ranges of 1000, while sub-categories are in ranges of 100. For
@@ -354,3 +337,16 @@ func (t TokenType) InSubCategory(other TokenType) bool {
func (t TokenType) Emit(groups []string, _ *LexerState) Iterator {
return Literator(Token{Type: t, Value: groups[0]})
}
+
+func (t TokenType) EmitterKind() string { return "token" }
+func (t TokenType) MarshalText() ([]byte, error) { return []byte(t.String()), nil }
+func (t *TokenType) UnmarshalText(data []byte) error {
+ key := string(data)
+ for tt, text := range _TokenType_map {
+ if text == key {
+ *t = tt
+ return nil
+ }
+ }
+ return fmt.Errorf("unknown TokenType %q", data)
+}