jsmdcui 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -0
- package/LICENSE +22 -0
- package/README.md +285 -0
- package/package.json +17 -0
- package/project_structure.txt +35 -0
- package/runmd.mjs +240 -0
- package/runtime/colorschemes/atom-dark.micro +33 -0
- package/runtime/colorschemes/bubblegum.micro +31 -0
- package/runtime/colorschemes/cmc-16.micro +47 -0
- package/runtime/colorschemes/cmc-tc.micro +43 -0
- package/runtime/colorschemes/darcula.micro +34 -0
- package/runtime/colorschemes/default.micro +1 -0
- package/runtime/colorschemes/dracula-tc.micro +49 -0
- package/runtime/colorschemes/dukedark-tc.micro +38 -0
- package/runtime/colorschemes/dukelight-tc.micro +38 -0
- package/runtime/colorschemes/dukeubuntu-tc.micro +38 -0
- package/runtime/colorschemes/geany.micro +29 -0
- package/runtime/colorschemes/gotham.micro +29 -0
- package/runtime/colorschemes/gruvbox-tc.micro +29 -0
- package/runtime/colorschemes/gruvbox.micro +26 -0
- package/runtime/colorschemes/material-tc.micro +36 -0
- package/runtime/colorschemes/monokai-dark.micro +28 -0
- package/runtime/colorschemes/monokai.micro +34 -0
- package/runtime/colorschemes/one-dark.micro +39 -0
- package/runtime/colorschemes/railscast.micro +37 -0
- package/runtime/colorschemes/simple.micro +33 -0
- package/runtime/colorschemes/solarized-tc.micro +31 -0
- package/runtime/colorschemes/solarized.micro +30 -0
- package/runtime/colorschemes/sunny-day.micro +29 -0
- package/runtime/colorschemes/twilight.micro +40 -0
- package/runtime/colorschemes/zenburn.micro +30 -0
- package/runtime/help/actions.md +161 -0
- package/runtime/help/cdp.md +119 -0
- package/runtime/help/colors.md +421 -0
- package/runtime/help/commands.md +161 -0
- package/runtime/help/copypaste.md +149 -0
- package/runtime/help/defaultkeys.md +148 -0
- package/runtime/help/help.md +285 -0
- package/runtime/help/keybindings.md +355 -0
- package/runtime/help/linter.md +90 -0
- package/runtime/help/options.md +709 -0
- package/runtime/help/plugins.md +544 -0
- package/runtime/help/tutorial.md +112 -0
- package/runtime/jsplugins/cdp/cdp-server.js +1161 -0
- package/runtime/jsplugins/cdp/cdp.js +192 -0
- package/runtime/jsplugins/chapter/chapter.js +108 -0
- package/runtime/jsplugins/diff/diff.js +46 -0
- package/runtime/jsplugins/example/example.js +110 -0
- package/runtime/jsplugins/linter/linter.js +281 -0
- package/runtime/plugins/autoclose/autoclose.lua +75 -0
- package/runtime/plugins/ftoptions/ftoptions.lua +17 -0
- package/runtime/plugins/literate/README.md +5 -0
- package/runtime/plugins/literate/literate.lua +55 -0
- package/runtime/plugins/status/help/status.md +21 -0
- package/runtime/plugins/status/status.lua +62 -0
- package/runtime/syntax/LICENSE +22 -0
- package/runtime/syntax/PowerShell.yaml +128 -0
- package/runtime/syntax/README.md +63 -0
- package/runtime/syntax/ada.yaml +43 -0
- package/runtime/syntax/apacheconf.yaml +59 -0
- package/runtime/syntax/arduino.yaml +101 -0
- package/runtime/syntax/asciidoc.yaml +51 -0
- package/runtime/syntax/asm.yaml +123 -0
- package/runtime/syntax/ats.yaml +99 -0
- package/runtime/syntax/awk.yaml +44 -0
- package/runtime/syntax/b.yaml +87 -0
- package/runtime/syntax/bat.yaml +57 -0
- package/runtime/syntax/c.yaml +60 -0
- package/runtime/syntax/caddyfile.yaml +23 -0
- package/runtime/syntax/cake.yaml +7 -0
- package/runtime/syntax/clojure.yaml +38 -0
- package/runtime/syntax/cmake.yaml +42 -0
- package/runtime/syntax/coffeescript.yaml +56 -0
- package/runtime/syntax/colortest.yaml +19 -0
- package/runtime/syntax/conky.yaml +17 -0
- package/runtime/syntax/cpp.yaml +91 -0
- package/runtime/syntax/crontab.yaml +36 -0
- package/runtime/syntax/crystal.yaml +72 -0
- package/runtime/syntax/csharp.yaml +52 -0
- package/runtime/syntax/css.yaml +44 -0
- package/runtime/syntax/csx.yaml +8 -0
- package/runtime/syntax/cuda.yaml +68 -0
- package/runtime/syntax/cython.yaml +52 -0
- package/runtime/syntax/d.yaml +121 -0
- package/runtime/syntax/dart.yaml +46 -0
- package/runtime/syntax/default.yaml +10 -0
- package/runtime/syntax/dockerfile.yaml +36 -0
- package/runtime/syntax/dot.yaml +29 -0
- package/runtime/syntax/elixir.yaml +30 -0
- package/runtime/syntax/elm.yaml +38 -0
- package/runtime/syntax/erb.yaml +42 -0
- package/runtime/syntax/erlang.yaml +45 -0
- package/runtime/syntax/fish.yaml +48 -0
- package/runtime/syntax/forth.yaml +34 -0
- package/runtime/syntax/fortran.yaml +64 -0
- package/runtime/syntax/freebsd-kernel.yaml +14 -0
- package/runtime/syntax/fsharp.yaml +48 -0
- package/runtime/syntax/gdscript.yaml +61 -0
- package/runtime/syntax/gemini.yaml +19 -0
- package/runtime/syntax/gentoo-ebuild.yaml +48 -0
- package/runtime/syntax/gentoo-etc-portage.yaml +23 -0
- package/runtime/syntax/git-commit.yaml +35 -0
- package/runtime/syntax/git-config.yaml +14 -0
- package/runtime/syntax/git-rebase-todo.yaml +19 -0
- package/runtime/syntax/gleam.yaml +69 -0
- package/runtime/syntax/glsl.yaml +26 -0
- package/runtime/syntax/gnuplot.yaml +15 -0
- package/runtime/syntax/go.yaml +62 -0
- package/runtime/syntax/godoc.yaml +17 -0
- package/runtime/syntax/golo.yaml +73 -0
- package/runtime/syntax/gomod.yaml +31 -0
- package/runtime/syntax/graphql.yaml +47 -0
- package/runtime/syntax/groff.yaml +30 -0
- package/runtime/syntax/groovy.yaml +111 -0
- package/runtime/syntax/haml.yaml +16 -0
- package/runtime/syntax/hare.yaml +52 -0
- package/runtime/syntax/haskell.yaml +52 -0
- package/runtime/syntax/hc.yaml +52 -0
- package/runtime/syntax/html.yaml +70 -0
- package/runtime/syntax/html4.yaml +25 -0
- package/runtime/syntax/html5.yaml +25 -0
- package/runtime/syntax/ini.yaml +23 -0
- package/runtime/syntax/inputrc.yaml +14 -0
- package/runtime/syntax/java.yaml +37 -0
- package/runtime/syntax/javascript.yaml +124 -0
- package/runtime/syntax/jinja2.yaml +19 -0
- package/runtime/syntax/json.yaml +39 -0
- package/runtime/syntax/jsonnet.yaml +92 -0
- package/runtime/syntax/julia.yaml +57 -0
- package/runtime/syntax/justfile.yaml +40 -0
- package/runtime/syntax/keymap.yaml +27 -0
- package/runtime/syntax/kickstart.yaml +16 -0
- package/runtime/syntax/kotlin.yaml +66 -0
- package/runtime/syntax/kvlang.yaml +67 -0
- package/runtime/syntax/ledger.yaml +14 -0
- package/runtime/syntax/lfe.yaml +17 -0
- package/runtime/syntax/lilypond.yaml +26 -0
- package/runtime/syntax/lisp.yaml +17 -0
- package/runtime/syntax/log.yaml +92 -0
- package/runtime/syntax/lua.yaml +111 -0
- package/runtime/syntax/mail.yaml +25 -0
- package/runtime/syntax/makefile.yaml +38 -0
- package/runtime/syntax/man.yaml +12 -0
- package/runtime/syntax/markdown.yaml +49 -0
- package/runtime/syntax/mc.yaml +23 -0
- package/runtime/syntax/meson.yaml +51 -0
- package/runtime/syntax/micro.yaml +34 -0
- package/runtime/syntax/mpdconf.yaml +13 -0
- package/runtime/syntax/msbuild.yaml +6 -0
- package/runtime/syntax/nanorc.yaml +16 -0
- package/runtime/syntax/nftables.yaml +30 -0
- package/runtime/syntax/nginx.yaml +22 -0
- package/runtime/syntax/nim.yaml +27 -0
- package/runtime/syntax/nix.yaml +32 -0
- package/runtime/syntax/nu.yaml +114 -0
- package/runtime/syntax/objc.yaml +60 -0
- package/runtime/syntax/ocaml.yaml +43 -0
- package/runtime/syntax/octave.yaml +83 -0
- package/runtime/syntax/odin.yaml +64 -0
- package/runtime/syntax/pascal.yaml +45 -0
- package/runtime/syntax/patch.yaml +14 -0
- package/runtime/syntax/peg.yaml +16 -0
- package/runtime/syntax/perl.yaml +58 -0
- package/runtime/syntax/php.yaml +60 -0
- package/runtime/syntax/pkg-config.yaml +12 -0
- package/runtime/syntax/po.yaml +12 -0
- package/runtime/syntax/pony.yaml +37 -0
- package/runtime/syntax/pov.yaml +21 -0
- package/runtime/syntax/privoxy-action.yaml +14 -0
- package/runtime/syntax/privoxy-config.yaml +10 -0
- package/runtime/syntax/privoxy-filter.yaml +12 -0
- package/runtime/syntax/proto.yaml +40 -0
- package/runtime/syntax/prql.yaml +84 -0
- package/runtime/syntax/puppet.yaml +22 -0
- package/runtime/syntax/python2.yaml +60 -0
- package/runtime/syntax/python3.yaml +80 -0
- package/runtime/syntax/r.yaml +32 -0
- package/runtime/syntax/raku.yaml +42 -0
- package/runtime/syntax/reST.yaml +18 -0
- package/runtime/syntax/renpy.yaml +15 -0
- package/runtime/syntax/rpmspec.yaml +43 -0
- package/runtime/syntax/ruby.yaml +73 -0
- package/runtime/syntax/rust.yaml +78 -0
- package/runtime/syntax/sage.yaml +60 -0
- package/runtime/syntax/scad.yaml +53 -0
- package/runtime/syntax/scala.yaml +33 -0
- package/runtime/syntax/sed.yaml +13 -0
- package/runtime/syntax/sh.yaml +69 -0
- package/runtime/syntax/sls.yaml +15 -0
- package/runtime/syntax/smalltalk.yaml +55 -0
- package/runtime/syntax/solidity.yaml +41 -0
- package/runtime/syntax/sql.yaml +35 -0
- package/runtime/syntax/stata.yaml +67 -0
- package/runtime/syntax/svelte.yaml +27 -0
- package/runtime/syntax/swift.yaml +103 -0
- package/runtime/syntax/systemd.yaml +16 -0
- package/runtime/syntax/tcl.yaml +18 -0
- package/runtime/syntax/terraform.yaml +87 -0
- package/runtime/syntax/tex.yaml +32 -0
- package/runtime/syntax/toml.yaml +56 -0
- package/runtime/syntax/twig.yaml +55 -0
- package/runtime/syntax/typescript.yaml +49 -0
- package/runtime/syntax/v.yaml +80 -0
- package/runtime/syntax/vala.yaml +26 -0
- package/runtime/syntax/verilog.yaml +60 -0
- package/runtime/syntax/vhdl.yaml +37 -0
- package/runtime/syntax/vi.yaml +31 -0
- package/runtime/syntax/vue.yaml +64 -0
- package/runtime/syntax/xml.yaml +37 -0
- package/runtime/syntax/xresources.yaml +14 -0
- package/runtime/syntax/yaml.yaml +34 -0
- package/runtime/syntax/yum.yaml +12 -0
- package/runtime/syntax/zig.yaml +52 -0
- package/runtime/syntax/zscript.yaml +72 -0
- package/runtime/syntax/zsh.yaml +52 -0
- package/single-exe/README.md +80 -0
- package/single-exe/assetsHelper.js +90 -0
- package/single-exe/assetsLoader.mjs +85 -0
- package/single-exe/compiled.js +149 -0
- package/single-exe/entry.mjs +9 -0
- package/single-exe/packAssets.sh +7 -0
- package/src/buffer/backup.js +160 -0
- package/src/buffer/buffer.js +126 -0
- package/src/buffer/fixed3-codec.js +140 -0
- package/src/buffer/loc.js +38 -0
- package/src/buffer/message.js +29 -0
- package/src/config/clean.js +172 -0
- package/src/config/colorscheme.js +99 -0
- package/src/config/config.js +122 -0
- package/src/config/defaults.js +109 -0
- package/src/cui/rpc.mjs +259 -0
- package/src/cui/server.mjs +116 -0
- package/src/display/ansi-style.js +60 -0
- package/src/highlight/highlighter.js +243 -0
- package/src/highlight/parser.js +225 -0
- package/src/index.js +8009 -0
- package/src/lua/engine.js +71 -0
- package/src/platform/archive.js +50 -0
- package/src/platform/clipboard.js +278 -0
- package/src/platform/commands.js +137 -0
- package/src/plugins/js-bridge.js +983 -0
- package/src/plugins/manager.js +674 -0
- package/src/runtime/assets.js +90 -0
- package/src/runtime/compiled.js +25 -0
- package/src/runtime/encodings.js +10 -0
- package/src/runtime/registry.js +134 -0
- package/src/screen/cell-buffer.js +81 -0
- package/src/screen/events.js +263 -0
- package/src/screen/screen.js +142 -0
- package/src/screen/vt100.js +571 -0
- package/src/shell/shell.js +70 -0
- package/testapp.md +55 -0
- package/tests/backup.test.js +133 -0
- package/tests/cmphex3b64.js +95 -0
- package/tests/pty-demo.js +492 -0
- package/tests/wv-client.js +96 -0
- package/tui +5 -0
- package/wui +5 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Syntax Files
|
|
2
|
+
|
|
3
|
+
Here are micro's syntax files.
|
|
4
|
+
|
|
5
|
+
Each yaml file specifies how to detect the filetype based on file extension or header (first line of the line).
|
|
6
|
+
In addition, a signature can be provided to help resolving ambiguities when multiple matching filetypes are detected.
|
|
7
|
+
Then there are patterns and regions linked to highlight groups which tell micro how to highlight that filetype.
|
|
8
|
+
|
|
9
|
+
You can read more about how to write syntax files (and colorschemes) in the [colors](../help/colors.md) documentation.
|
|
10
|
+
|
|
11
|
+
# Legacy '.micro' filetype
|
|
12
|
+
|
|
13
|
+
Micro used to use the `.micro` filetype for syntax files which is no longer supported. If you have `.micro`
|
|
14
|
+
syntax files that you would like to convert to the new filetype, you can use the [`syntax_converter.go`](./syntax_converter.go) program (also located in this directory):
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
$ go run syntax_converter.go c.micro > c.yaml
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Most of the syntax files here have been converted using that tool.
|
|
21
|
+
|
|
22
|
+
Note that the tool isn't perfect and though it is unlikely, you may run into some small issues that you will have to fix manually
|
|
23
|
+
(about 4 files from this directory had issues after being converted).
|
|
24
|
+
|
|
25
|
+
# Micro syntax highlighting files
|
|
26
|
+
|
|
27
|
+
These are the syntax highlighting files for micro. To install them, just
|
|
28
|
+
put all the syntax files in `~/.config/micro/syntax`.
|
|
29
|
+
|
|
30
|
+
They are taken from Nano, specifically from [this repository](https://github.com/scopatz/nanorc).
|
|
31
|
+
Micro syntax files are almost identical to Nano's, except for some key differences:
|
|
32
|
+
|
|
33
|
+
* Micro does not use `icolor`. Instead, for a case insensitive match, use the case insensitive flag (`i`) in the regular expression
|
|
34
|
+
* For example, `icolor green ".*"` would become `color green "(?i).*"`
|
|
35
|
+
|
|
36
|
+
# Using with colorschemes
|
|
37
|
+
|
|
38
|
+
Not all of these files have been converted to use micro's colorscheme feature. Most of them just hardcode the colors, which can be problematic depending on the colorscheme you use.
|
|
39
|
+
|
|
40
|
+
Here is a list of the files that have been converted to properly use colorschemes:
|
|
41
|
+
|
|
42
|
+
* vi
|
|
43
|
+
* go
|
|
44
|
+
* c
|
|
45
|
+
* d
|
|
46
|
+
* markdown
|
|
47
|
+
* html
|
|
48
|
+
* lua
|
|
49
|
+
* swift
|
|
50
|
+
* rust
|
|
51
|
+
* java
|
|
52
|
+
* javascript
|
|
53
|
+
* pascal
|
|
54
|
+
* python
|
|
55
|
+
* ruby
|
|
56
|
+
* sh
|
|
57
|
+
* git
|
|
58
|
+
* tex
|
|
59
|
+
* solidity
|
|
60
|
+
|
|
61
|
+
# License
|
|
62
|
+
|
|
63
|
+
See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
filetype: ada
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "(\\.ads$|\\.adb$|\\.ada$)"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# Operators
|
|
8
|
+
- symbol.operator: ([.:;,+*|=!?\\%]|<|>|/|-|&)
|
|
9
|
+
- symbol.brackets: "[(){}]|\\[|\\]"
|
|
10
|
+
# keyword.reserved
|
|
11
|
+
- statement.reserved: \b(abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case)\b
|
|
12
|
+
- statement.reserved: \b(constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function)\b
|
|
13
|
+
- statement.reserved: \b(generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding)\b
|
|
14
|
+
- statement.reserved: \b(package|pragma|private|procedure|protected|raise|range|record|rem|renames|return|requeue)\b
|
|
15
|
+
- statement.reserved: \b(reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until)\b
|
|
16
|
+
- statement.reserved: \b(use|when|while|with|xor)\b
|
|
17
|
+
|
|
18
|
+
# Constant
|
|
19
|
+
- constant.bool: \b(TRUE|FALSE)
|
|
20
|
+
- constant.number: ([0-9]+)
|
|
21
|
+
|
|
22
|
+
# Storage Types
|
|
23
|
+
- type.storage: \b(INTEGER|NATURAL|POSITIVE|FLOAT|CHARACTER|STRING)\b
|
|
24
|
+
- type.storage: \b(LONG_INTEGER|SHORT_INTEGER|LONG_FLOAT|SHORT_FLOAT)\b
|
|
25
|
+
|
|
26
|
+
#Character
|
|
27
|
+
- constant.string.char: \'.\'
|
|
28
|
+
|
|
29
|
+
# String
|
|
30
|
+
- constant.string:
|
|
31
|
+
start: \"
|
|
32
|
+
end: \"
|
|
33
|
+
skip: \\.
|
|
34
|
+
rules:
|
|
35
|
+
- constant.specialChar: (\\0|\\\\|\\t|\\n|\\r|\\"|\\')
|
|
36
|
+
- constant.interpolation: \\\([[:graph:]]*\)
|
|
37
|
+
- constant.unicode: \\u\{[[:xdigit:]]+}
|
|
38
|
+
|
|
39
|
+
# Line Comment
|
|
40
|
+
- comment.line: "--.*"
|
|
41
|
+
|
|
42
|
+
# Todo
|
|
43
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
filetype: apacheconf
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "httpd\\.conf|mime\\.types|vhosts\\.d\\\\*|\\.htaccess"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)"
|
|
8
|
+
- identifier: "(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)"
|
|
9
|
+
- identifier: "(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)"
|
|
10
|
+
- identifier: "(Anonymous_VerifyEmail|AssignUserID|AuthAuthoritative|AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm)"
|
|
11
|
+
- identifier: "(AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)"
|
|
12
|
+
- identifier: "(AuthGroupFile|AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases)"
|
|
13
|
+
- identifier: "(AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl|AuthName|AuthType|AuthUserFile)"
|
|
14
|
+
- identifier: "(BrowserMatch|BrowserMatchNoCase|BS2000Account|BufferedLogs|CacheDefaultExpire|CacheDirLength|CacheDirLevels|CacheDisable|CacheEnable|CacheExpiryCheck)"
|
|
15
|
+
- identifier: "(CacheFile|CacheForceCompletion|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheIgnoreCacheControl|CacheIgnoreHeaders)"
|
|
16
|
+
- identifier: "(CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire|CacheMaxFileSize|CacheMinFileSize|CacheNegotiatedDocs|CacheRoot|CacheSize|CacheTimeMargin)"
|
|
17
|
+
- identifier: "(CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckSpelling|ChildPerUserID|ContentDigest|CookieDomain|CookieExpires|CookieLog|CookieName)"
|
|
18
|
+
- identifier: "(CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultType)"
|
|
19
|
+
- identifier: "(DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize|Deny|Directory|DirectoryIndex|DirectoryMatch|DirectorySlash)"
|
|
20
|
+
- identifier: "(DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|Example|ExpiresActive|ExpiresByType)"
|
|
21
|
+
- identifier: "(ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FileETag|Files|FilesMatch|ForceLanguagePriority|ForceType|ForensicLog|Group|Header)"
|
|
22
|
+
- identifier: "(HeaderName|HostnameLookups|IdentityCheck|IfDefine|IfModule|IfVersion|ImapBase|ImapDefault|ImapMenu|Include|IndexIgnore|IndexOptions|IndexOrderDefault)"
|
|
23
|
+
- identifier: "(ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer|KeepAlive|KeepAliveTimeout)"
|
|
24
|
+
- identifier: "(LanguagePriority|LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize)"
|
|
25
|
+
- identifier: "(LDAPTrustedCA|LDAPTrustedCAType|Limit|LimitExcept|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine)"
|
|
26
|
+
- identifier: "(LimitXMLRequestBody|Listen|ListenBackLog|LoadFile|LoadModule|Location|LocationMatch|LockFile|LogFormat|LogLevel|MaxClients|MaxKeepAliveRequests)"
|
|
27
|
+
- identifier: "(MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MCacheMaxObjectCount|MCacheMaxObjectSize)"
|
|
28
|
+
- identifier: "(MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads)"
|
|
29
|
+
- identifier: "(MMapFile|ModMimeUsePathInfo|MultiviewsMatch|NameVirtualHost|NoProxy|NumServers|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|PassEnv|PidFile)"
|
|
30
|
+
- identifier: "(ProtocolEcho|Proxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyIOBufferSize|ProxyMatch|ProxyMaxForwards|ProxyPass|ProxyPassReverse)"
|
|
31
|
+
- identifier: "(ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia|ReadmeName|Redirect|RedirectMatch)"
|
|
32
|
+
- identifier: "(RedirectPermanent|RedirectTemp|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader)"
|
|
33
|
+
- identifier: "(Require|RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule|RLimitCPU|RLimitMEM|RLimitNPROC)"
|
|
34
|
+
- identifier: "(Satisfy|ScoreBoardFile|Script|ScriptAlias|ScriptAliasMatch|ScriptInterpreterSource|ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock|SecureListen)"
|
|
35
|
+
- identifier: "(SendBufferSize|ServerAdmin|ServerAlias|ServerLimit|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetEnv|SetEnvIf|SetEnvIfNoCase|SetHandler)"
|
|
36
|
+
- identifier: "(SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSLCACertificateFile|SSLCACertificatePath)"
|
|
37
|
+
- identifier: "(SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions)"
|
|
38
|
+
- identifier: "(SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite)"
|
|
39
|
+
- identifier: "(SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire)"
|
|
40
|
+
- identifier: "(SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth|StartServers|StartThreads|SuexecUserGroup|ThreadLimit)"
|
|
41
|
+
- identifier: "(ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnsetEnv|UseCanonicalName|User|UserDir|VirtualDocumentRoot)"
|
|
42
|
+
- identifier: "(VirtualDocumentRootIP|VirtualHost|VirtualScriptAlias|VirtualScriptAliasIP|Win32DisableAcceptEx|XBitHack)"
|
|
43
|
+
- symbol.tag: "<[^>]+>"
|
|
44
|
+
- identifier: "</?[A-Za-z]+"
|
|
45
|
+
- identifier: "(<|</|>)"
|
|
46
|
+
|
|
47
|
+
- constant.string:
|
|
48
|
+
start: "\""
|
|
49
|
+
end: "\""
|
|
50
|
+
skip: "\\\\."
|
|
51
|
+
rules:
|
|
52
|
+
- constant.specialChar: "\\\\."
|
|
53
|
+
|
|
54
|
+
- comment:
|
|
55
|
+
start: "#"
|
|
56
|
+
end: "$"
|
|
57
|
+
rules:
|
|
58
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
59
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
filetype: ino
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.ino$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
|
|
8
|
+
|
|
9
|
+
## Sized (u)int types
|
|
10
|
+
- type: "\\b((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\\b"
|
|
11
|
+
|
|
12
|
+
## Constants
|
|
13
|
+
- constant: "(?i)\\b(HIGH|LOW|INPUT|OUTPUT)\\b"
|
|
14
|
+
|
|
15
|
+
## Serial Print
|
|
16
|
+
- constant: "(?i)\\b(DEC|BIN|HEX|OCT|BYTE)\\b"
|
|
17
|
+
|
|
18
|
+
## PI Constants
|
|
19
|
+
- constant: "(?i)\\b(PI|HALF_PI|TWO_PI)\\b"
|
|
20
|
+
|
|
21
|
+
## ShiftOut
|
|
22
|
+
- constant: "(?i)\\b(LSBFIRST|MSBFIRST)\\b"
|
|
23
|
+
|
|
24
|
+
## Attach Interrupt
|
|
25
|
+
- constant: "(?i)\\b(CHANGE|FALLING|RISING)\\b"
|
|
26
|
+
|
|
27
|
+
## Analog Reference
|
|
28
|
+
- constant: "(?i)\\b(DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56)\\b"
|
|
29
|
+
|
|
30
|
+
## === FUNCTIONS === ##
|
|
31
|
+
|
|
32
|
+
## Data Types
|
|
33
|
+
- type: "\\b(boolean|byte|char|float|int|long|word)\\b"
|
|
34
|
+
|
|
35
|
+
## Control Structions
|
|
36
|
+
- statement: "\\b(case|class|default|do|double|else|false|for|if|new|null|private|protected|public|short|signed|static|String|switch|this|throw|try|true|unsigned|void|while)\\b"
|
|
37
|
+
- statement: "\\b(goto|continue|break|return)\\b"
|
|
38
|
+
|
|
39
|
+
## Math
|
|
40
|
+
- identifier: "\\b(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan)\\b"
|
|
41
|
+
|
|
42
|
+
## Bits & Bytes
|
|
43
|
+
- identifier: "\\b(bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte)\\b"
|
|
44
|
+
|
|
45
|
+
## Analog I/O
|
|
46
|
+
- identifier: "\\b(analogReference|analogRead|analogWrite)\\b"
|
|
47
|
+
|
|
48
|
+
## External Interrupts
|
|
49
|
+
- identifier: "\\b(attachInterrupt|detachInterrupt)\\b"
|
|
50
|
+
|
|
51
|
+
## Time
|
|
52
|
+
- identifier: "\\b(delay|delayMicroseconds|millis|micros)\\b"
|
|
53
|
+
|
|
54
|
+
## Digital I/O
|
|
55
|
+
- identifier: "\\b(pinMode|digitalWrite|digitalRead)\\b"
|
|
56
|
+
|
|
57
|
+
## Interrupts
|
|
58
|
+
- identifier: "\\b(interrupts|noInterrupts)\\b"
|
|
59
|
+
|
|
60
|
+
## Advanced I/O
|
|
61
|
+
- identifier: "\\b(noTone|pulseIn|shiftIn|shiftOut|tone)\\b"
|
|
62
|
+
|
|
63
|
+
## Serial
|
|
64
|
+
- identifier: "\\b(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\\b"
|
|
65
|
+
|
|
66
|
+
## Structure
|
|
67
|
+
- identifier: "\\b(setup|loop)\\b"
|
|
68
|
+
|
|
69
|
+
##
|
|
70
|
+
- statement: "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
|
|
71
|
+
|
|
72
|
+
## GCC builtins
|
|
73
|
+
- constant: "(__attribute__[[:space:]]*\\(\\([^)]*\\)\\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__)"
|
|
74
|
+
|
|
75
|
+
- constant.string:
|
|
76
|
+
start: "\""
|
|
77
|
+
end: "\""
|
|
78
|
+
skip: "\\\\."
|
|
79
|
+
rules:
|
|
80
|
+
- constant.specialChar: "\\\\."
|
|
81
|
+
|
|
82
|
+
- constant.string:
|
|
83
|
+
start: "'"
|
|
84
|
+
end: "'"
|
|
85
|
+
skip: "\\\\."
|
|
86
|
+
rules:
|
|
87
|
+
- preproc: "..+"
|
|
88
|
+
- constant.specialChar: "\\\\."
|
|
89
|
+
|
|
90
|
+
- comment:
|
|
91
|
+
start: "//"
|
|
92
|
+
end: "$"
|
|
93
|
+
rules:
|
|
94
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
95
|
+
|
|
96
|
+
- comment:
|
|
97
|
+
start: "/\\*"
|
|
98
|
+
end: "\\*/"
|
|
99
|
+
rules:
|
|
100
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
101
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
filetype: asciidoc
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(asc|asciidoc|adoc)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# main header
|
|
8
|
+
- preproc: "^====+$"
|
|
9
|
+
# h1
|
|
10
|
+
- statement: "^==[[:space:]].*$"
|
|
11
|
+
- statement: "^----+$"
|
|
12
|
+
# h2
|
|
13
|
+
- symbol: "^===[[:space:]].*$"
|
|
14
|
+
- symbol: "^~~~~+$"
|
|
15
|
+
# h4
|
|
16
|
+
- type: "^====[[:space:]].*$"
|
|
17
|
+
- type: "^\\^\\^\\^\\^+$"
|
|
18
|
+
# h5
|
|
19
|
+
- constant: "^=====[[:space:]].*$"
|
|
20
|
+
- constant: "^\\+\\+\\+\\++$"
|
|
21
|
+
|
|
22
|
+
# attributes
|
|
23
|
+
- type.keyword: ":.*:"
|
|
24
|
+
- identifier.macro: "\\{[a-z0-9]*\\}"
|
|
25
|
+
- identifier: "\\\\\\{[a-z0-9]*\\}"
|
|
26
|
+
- identifier: "\\+\\+\\+\\{[a-z0-9]*\\}\\+\\+\\+"
|
|
27
|
+
|
|
28
|
+
# Paragraph Title
|
|
29
|
+
- statement: "^\\..*$"
|
|
30
|
+
|
|
31
|
+
# source
|
|
32
|
+
- identifier: "^\\[(source,.+|NOTE|TIP|IMPORTANT|WARNING|CAUTION)\\]"
|
|
33
|
+
|
|
34
|
+
# Other markup
|
|
35
|
+
- constant.string: ".*[[:space:]]\\+$"
|
|
36
|
+
- constant.string: "_[^_]+_"
|
|
37
|
+
- constant.string: "\\*[^\\*]+\\*"
|
|
38
|
+
- constant.string: "\\+[^\\+]+\\+"
|
|
39
|
+
- constant.string: "`[^`]+`"
|
|
40
|
+
- constant.string: "\\^[^\\^]+\\^"
|
|
41
|
+
- constant.string: "~[^~]+~"
|
|
42
|
+
- constant.string: "'[^']+'"
|
|
43
|
+
|
|
44
|
+
- constant: "`{1,2}[^']+'{1,2}"
|
|
45
|
+
|
|
46
|
+
# bullets
|
|
47
|
+
- symbol: "^[[:space:]]*[\\*\\.-]{1,5}[[:space:]]"
|
|
48
|
+
|
|
49
|
+
# anchors
|
|
50
|
+
- "bold default": "\\[\\[.*\\]\\]"
|
|
51
|
+
- "bold default": "<<.*>>"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
filetype: asm
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(S|s|asm)$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
# This file is made mainly for NASM assembly
|
|
8
|
+
|
|
9
|
+
## Instructions
|
|
10
|
+
# x86
|
|
11
|
+
- statement: "\\b(?i)(mov|aaa|aad|aam|aas|adc|add|and|call|cbw|clc|cld|cli|cmc|cmp|cmpsb|cmpsw|cwd|daa|das|dec|div|esc|hlt|idiv|imul|in|inc|int|into|iret|ja|jae|jb|jbe|jc|je|jg|jge|jl|jle|jna|jnae|jnb|jnbe|jnc|jne|jng|jnge|jnl|jnle|jno|jnp|jns|jnz|jo|jp|jpe|jpo|js|jz|jcxz|jmp|lahf|lds|lea|les|lock|lodsb|lodsw|loop|loope|loopne|loopnz|loopz|movsb|movsw|mul|neg|nop|or|pop|popf|push|pushf|rcl|rcr|rep|repe|repne|repnz|repz|ret|retn|retf|rol|ror|sahf|sal|sar|sbb|scasb|scasw|shl|shr|stc|std|sti|stosb|stosw|sub|test|wait|xchg|xlat|xor)(?-i)\\b"
|
|
12
|
+
- statement: "\\b(?i)(bound|enter|ins|leave|outs|popa|pusha)(?-i)\\b"
|
|
13
|
+
- statement: "\\b(?i)(arpl|clts|lar|lgdt|lidt|lldt|lmsw|loadall|lsl|ltr|sgdt|sidt|sldt|smsw|str|verr|verw)(?-i)\\b"
|
|
14
|
+
- statement: "\\b(?i)(bsf|bsr|bt|btc|btr|bts|cdq|cmpsd|cwde|insd|iret|iretd|iretf|jecxz|lfs|lgs|lss|lodsd|loopw|loopew|loopnew|loopnzw|loopzw|loopd|looped|loopned|loopnzd|loopzd|cr|tr|dr|movsd|movsx|movzx|outsd|popad|popfd|pushad|pushfd|scasd|seta|setae|setb|setbe|setc|sete|setg|setge|setl|setle|setna|setnae|setnb|setnbe|setnc|setne|setng|setnge|setnl|setnle|setno|setnp|setns|setnz|seto|setp|setpe|setpo|sets|setz|shdl|shrd|stosd)(?-i)\\b"
|
|
15
|
+
- statement: "\\b(?i)(bswap|cmpxcgh|invd|invlpg|wbinvd|xadd)(?-i)\\b"
|
|
16
|
+
- statement: "\\b(?i)(cpuid|cmpxchg8b|rdmsr|rdtsc|wrmsr|rsm)(?-i)\\b"
|
|
17
|
+
- statement: "\\b(?i)(rdpmc)(?-i)\\b"
|
|
18
|
+
- statement: "\\b(?i)(syscall|sysret)(?-i)\\b"
|
|
19
|
+
- statement: "\\b(?i)(cmova|cmovae|cmovb|cmovbe|cmovc|cmove|cmovg|cmovge|cmovl|cmovle|cmovna|cmovnae|cmovnb|cmovnbe|cmovnc|cmovne|cmovng|cmovnge|cmovnle|cmovno|cmovpn|cmovns|cmovnz|cmovo|cmovp|cmovpe|cmovpo|cmovs|cmovz|sysenter|sysexit|ud2)(?-i)\\b"
|
|
20
|
+
- statement: "\\b(?i)(maskmovq|movntps|movntq|prefetch0|prefetch1|prefetch2|prefetchnta|sfence)(?-i)\\b"
|
|
21
|
+
- statement: "\\b(?i)(clflush|lfence|maskmovdqu|mfence|movntdq|movnti|movntpd|pause)(?-i)\\b"
|
|
22
|
+
- statement: "\\b(?i)(monitor|mwait)(?-i)\\b"
|
|
23
|
+
- statement: "\\b(?i)(cdqe|cqo|cmpsq|cmpxchg16b|iretq|jrcxz|lodsq|movsdx|popfq|pushfq|rdtscp|scasq|stosq|swapgs)(?-i)\\b"
|
|
24
|
+
- statement: "\\b(?i)(clgi|invlpga|skinit|stgi|vmload|vmmcall|vmrun|vmsave)(?-i)\\b"
|
|
25
|
+
- statement: "\\b(?i)(vmptrdl|vmptrst|vmclear|vmread|vmwrite|vmcall|vmlaunch|vmresume|vmxoff|vmxon)(?-i)\\b"
|
|
26
|
+
- statement: "\\b(?i)(lzcnt|popcnt)(?-i)\\b"
|
|
27
|
+
- statement: "\\b(?i)(bextr|blcfill|blci|blcic|blcmask|blcs|blsfill|blsic|t1mskc|tzmsk)(?-i)\\b"
|
|
28
|
+
|
|
29
|
+
# x87
|
|
30
|
+
- statement: "\\b(?i)(f2xm1|fabs|fadd|faddp|fbld|fbstp|fchs|fclex|fcom|fcomp|fcompp|fdecstp|fdisi|fdiv|fvidp|fdivr|fdivrp|feni|ffree|fiadd|ficom|ficomp|fidiv|fidivr|fild|fimul|fincstp|finit|fist|fistp|fisub|fisubr|fld|fld1|fldcw|fldenv|fldenvw|fldl2e|fldl2t|fldlg2|fldln2|fldpi|fldz|fmul|fmulp|fnclex|fndisi|fneni|fninit|fnop|fnsave|fnsavenew|fnstcw|fnstenv|fnstenvw|fnstsw|fpatan|fprem|fptan|frndint|frstor|frstorw|fsave|fsavew|fscale|fsqrt|fst|fstcw|fstenv|fstenvw|fstp|fstpsw|fsub|fsubp|fsubr|fsubrp|ftst|fwait|fxam|fxch|fxtract|fyl2x|fyl2xp1)(?-i)\\b"
|
|
31
|
+
- statement: "\\b(?i)(fsetpm)(?-i)\\b"
|
|
32
|
+
- statement: "\\b(?i)(fcos|fldenvd|fsaved|fstenvd|fprem1|frstord|fsin|fsincos|fstenvd|fucom|fucomp|fucompp)(?-i)\\b"
|
|
33
|
+
- statement: "\\b(?i)(fcmovb|fcmovbe|fcmove|fcmove|fcmovnb|fcmovnbe|fcmovne|fcmovnu|fcmovu)(?-i)\\b"
|
|
34
|
+
- statement: "\\b(?i)(fcomi|fcomip|fucomi|fucomip)(?-i)\\b"
|
|
35
|
+
- statement: "\\b(?i)(fxrstor|fxsave)(?-i)\\b"
|
|
36
|
+
- statement: "\\b(?i)(fisttp)(?-i)\\b"
|
|
37
|
+
- statement: "\\b(?i)(ffreep)(?-i)\\b"
|
|
38
|
+
|
|
39
|
+
# SIMD
|
|
40
|
+
- statement: "\\b(?i)(emms|movd|movq|packssdw|packsswb|packuswb|paddb|paddw|paddd|paddsb|paddsw|paddusb|paddusw|pand|pandn|por|pxor|pcmpeqb|pcmpeqw|pcmpeqd|pcmpgtb|pcmpgtw|pcmpgtd|pmaddwd|pmulhw|pmullw|psllw|pslld|psllq|psrad|psraw|psrlw|psrld|psrlq|psubb|psubw|psubd|psubsb|psubsw|psubusb|punpckhbw|punpckhwd|punpckhdq|punkcklbw|punpckldq|punpcklwd)(?-i)\\b"
|
|
41
|
+
- statement: "\\b(?i)(paveb|paddsiw|pmagw|pdistib|psubsiw|pmwzb|pmulhrw|pmvnzb|pmvlzb|pmvgezb|pmulhriw|pmachriw)(?-i)\\b"
|
|
42
|
+
- statement: "\\b(?i)(femms|pavgusb|pf2id|pfacc|pfadd|pfcmpeq|pfcmpge|pfcmpgt|pfmax|pfmin|pfmul|pfrcp|pfrcpit1|pfrcpit2|pfrsqit1|pfrsqrt|pfsub|pfsubr|pi2fd|pmulhrw|prefetch|prefetchw)(?-i)\\b"
|
|
43
|
+
- statement: "\\b(?i)(pf2iw|pfnacc|pfpnacc|pi2fw|pswapd)(?-i)\\b"
|
|
44
|
+
- statement: "\\b(?i)(pfrsqrtv|pfrcpv)(?-i)\\b"
|
|
45
|
+
- statement: "\\b(?i)(addps|addss|cmpps|cmpss|comiss|cvtpi2ps|cvtps2pi|cvtsi2ss|cvtss2si|cvttps2pi|cvttss2si|divps|divss|ldmxcsr|maxps|maxss|minps|minss|movaps|movhlps|movhps|movlhps|movlps|movmskps|movntps|movss|movups|mulps|mulss|rcpps|rcpss|rsqrtps|rsqrtss|shufps|sqrtps|sqrtss|stmxcsr|subps|subss|ucomiss|unpckhps|unpcklps)(?-i)\\b"
|
|
46
|
+
- statement: "\\b(?i)(andnps|andps|orps|pavgb|pavgw|pextrw|pinsrw|pmaxsw|pmaxub|pminsw|pminub|pmovmskb|pmulhuw|psadbw|pshufw|xorps)(?-i)\\b"
|
|
47
|
+
- statement: "\\b(?i)(movups|movss|movlps|movhlps|movlps|unpcklps|unpckhps|movhps|movlhps|prefetchnta|prefetch0|prefetch1|prefetch2|nop|movaps|cvtpi2ps|cvtsi2ss|cvtps2pi|cvttss2si|cvtps2pi|cvtss2si|ucomiss|comiss|sqrtps|sqrtss|rsqrtps|rsqrtss|rcpps|andps|orps|xorps|addps|addss|mulps|mulss|subps|subss|minps|minss|divps|divss|maxps|maxss|pshufw|ldmxcsr|stmxcsr|sfence|cmpps|cmpss|pinsrw|pextrw|shufps|pmovmskb|pminub|pmaxub|pavgb|pavgw|pmulhuw|movntq|pminsw|pmaxsw|psadbw|maskmovq)(?-i)\\b"
|
|
48
|
+
- statement: "\\b(?i)(addpd|addsd|addnpd|cmppd|cmpsd)(?-i)\\b"
|
|
49
|
+
- statement: "\\b(?i)(addpd|addsd|andnpd|andpd|cmppd|cmpsd|comisd|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtps2dq|cvtps2pd|cvtsd2si|cvtsd2ss|cvtsi2sd|cvtss2sd|cvttpd2dq|cvttpd2pi|cvttps2dq|cvttsd2si|divpd|divsd|maxpd|maxsd|minpd|minsd|movapd|movhpd|movlpd|movmskpd|movsd|movupd|mulpd|mulsd|orpd|shufpd|sqrtpd|sqrtsd|subpd|subsd|ucomisd|unpckhpd|unpcklpd|xorpd)(?-i)\\b"
|
|
50
|
+
- statement: "\\b(?i)(movdq2q|movdqa|movdqu|movq2dq|paddq|psubq|pmuludq|pshufhw|pshuflw|pshufd|pslldq|psrldq|punpckhqdq|punpcklqdq)(?-i)\\b"
|
|
51
|
+
- statement: "\\b(?i)(addsubpd|addsubps|haddpd|haddps|hsubpd|hsubps|movddup|movshdup|movsldu)(?-i)\\b"
|
|
52
|
+
- statement: "\\b(?i)(lddqu)(?-i)\\b"
|
|
53
|
+
- statement: "\\b(?i)(psignw|psignd|psignb|pshufb|pmulhrsw|pmaddubsw|phsubw|phsubsw|phsubd|phaddw|phaddsw|phaddd|palignr|pabsw|pabsd|pabsb)(?-i)\\b"
|
|
54
|
+
- statement: "\\b(?i)(dpps|dppd|blendps|blendpd|blendvps|blendvpd|roundps|roundss|roundpd|roundsd|insertps|extractps)(?-i)\\b"
|
|
55
|
+
- statement: "\\b(?i)(mpsadbw|phminposuw|pmulld|pmuldq|pblendvb|pblendw|pminsb|pmaxsb|pminuw|pmaxuw|pminud|pmaxud|pminsd|pmaxsd|pinsrb|pinsrd/pinsrq|pextrb|pextrw|pextrd/pextrq|pmovsxbw|pmovzxbw|pmovsxbd|pmovzxbd|pmovsxbq|pmovzxbq|pmovsxwd|pmovzxwd|pmovsxwq|pmovzxwq|pmovsxdq|pmovzxdq|ptest|pcmpeqq|packusdw|movntdqa)(?-i)\\b"
|
|
56
|
+
- statement: "\\b(?i)(extrq|insertq|movntsd|movntss)(?-i)\\b"
|
|
57
|
+
- statement: "\\b(?i)(crc32|pcmpestri|pcmpestrm|pcmpistri|pcmpistrm|pcmpgtq)(?-i)\\b"
|
|
58
|
+
- statement: "\\b(?i)(vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfmsubss|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubps|vfnmsubsd|vfnmsubss)(?-i)\\b"
|
|
59
|
+
|
|
60
|
+
# Crypto
|
|
61
|
+
- statement: "\\b(?i)(aesenc|aesenclast|aesdec|aesdeclast|aeskeygenassist|aesimc)(?-i)\\b"
|
|
62
|
+
- statement: "\\b(?i)(sha1rnds4|sha1nexte|sha1msg1|sha1msg2|sha256rnds2|sha256msg1|sha256msg2)(?-i)\\b"
|
|
63
|
+
|
|
64
|
+
# Undocumented
|
|
65
|
+
- statement: "\\b(?i)(aam|aad|salc|icebp|loadall|loadalld|ud1)(?-i)\\b"
|
|
66
|
+
|
|
67
|
+
## Registers
|
|
68
|
+
- identifier: "\\b(?i)(al|ah|bl|bh|cl|ch|dl|dh|bpl|sil|r8b|r9b|r10b|r11b|dil|spl|r12b|r13b|r14b|r15)(?-i)\\b"
|
|
69
|
+
- identifier: "\\b(?i)(cw|sw|tw|fp_ds|fp_opc|fp_ip|fp_dp|fp_cs|cs|ss|ds|es|fs|gs|gdtr|idtr|tr|ldtr|ax|bx|cx|dx|bp|si|r8w|r9w|r10w|r11w|di|sp|r12w|r13w|r14w|r15w|ip)(?-i)\\b"
|
|
70
|
+
- identifier: "\\b(?i)(fp_dp|fp_ip|eax|ebx|ecx|edx|ebp|esi|r8d|r9d|r10d|r11d|edi|esp|r12d|r13d|r14d|r15d|eip|eflags|mxcsr)(?-i)\\b"
|
|
71
|
+
- identifier: "\\b(?i)(mm0|mm1|mm2|mm3|mm4|mm5|mm6|mm7|rax|rbx|rcx|rdx|rbp|rsi|r8|r9|r10|r11|rdi|rsp|r12|r13|r14|r15|rip|rflags|cr0|cr1|cr2|cr3|cr4|cr5|cr6|cr7|cr8|cr9|cr10|cr11|cr12|cr13|cr14|cr15|msw|dr0|dr1|dr2|dr3|r4|dr5|dr6|dr7|dr8|dr9|dr10|dr11|dr12|dr13|dr14|dr15)(?-i)\\b"
|
|
72
|
+
- identifier: "\\b(?i)(st0|st1|st2|st3|st4|st5|st6|st7)(?-i)\\b"
|
|
73
|
+
- identifier: "\\b(?i)(xmm0|xmm1|xmm2|xmm3|xmm4|xmm5|xmm6|xmm7|xmm8|xmm9|xmm10|xmm11|xmm12|xmm13|xmm14|xmm15)(?-i)\\b"
|
|
74
|
+
- identifier: "\\b(?i)(ymm0|ymm1|ymm2|ymm3|ymm4|ymm5|ymm6|ymm7|ymm8|ymm9|ymm10|ymm11|ymm12|ymm13|ymm14|ymm15)(?-i)\\b"
|
|
75
|
+
- identifier: "\\b(?i)(zmm0|zmm1|zmm2|zmm3|zmm4|zmm5|zmm6|zmm7|zmm8|zmm9|zmm10|zmm11|zmm12|zmm13|zmm14|zmm15|zmm16|zmm17|zmm18|zmm19|zmm20|zmm21|zmm22|zmm23|zmm24|zmm25|zmm26|zmm27|zmm28|zmm29|zmm30|zmm31)(?-i)\\b"
|
|
76
|
+
|
|
77
|
+
## Constants
|
|
78
|
+
# Number - it works
|
|
79
|
+
- constant.number: "\\b(|h|A|0x)+[0-9]+(|h|A)+\\b"
|
|
80
|
+
- constant.number: "\\b0x[0-9 a-f A-F]+\\b"
|
|
81
|
+
|
|
82
|
+
## Preprocessor (NASM)
|
|
83
|
+
- preproc: "%+(\\+|\\?|\\?\\?|)[a-z A-Z 0-9]+"
|
|
84
|
+
- preproc: "%\\[[. a-z A-Z 0-9]*\\]"
|
|
85
|
+
|
|
86
|
+
## Other
|
|
87
|
+
- statement: "\\b(?i)(extern|global|section|segment|_start|\\.text|\\.data|\\.bss)(?-i)\\b"
|
|
88
|
+
- statement: "\\b(?i)(db|dw|dd|dq|dt|ddq|do)(?-i)\\b"
|
|
89
|
+
- identifier: "[a-z A-Z 0-9 _]+:"
|
|
90
|
+
|
|
91
|
+
- constant.string:
|
|
92
|
+
start: "\""
|
|
93
|
+
end: "\""
|
|
94
|
+
skip: "\\\\."
|
|
95
|
+
rules:
|
|
96
|
+
- constant.specialChar: "\\\\."
|
|
97
|
+
|
|
98
|
+
- constant.string:
|
|
99
|
+
start: "'"
|
|
100
|
+
end: "'"
|
|
101
|
+
skip: "\\\\."
|
|
102
|
+
rules:
|
|
103
|
+
- constant.specialChar: "\\\\."
|
|
104
|
+
|
|
105
|
+
- comment:
|
|
106
|
+
start: ";"
|
|
107
|
+
end: "$"
|
|
108
|
+
rules:
|
|
109
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
110
|
+
|
|
111
|
+
## C-like comments (supported by some assemblers)
|
|
112
|
+
|
|
113
|
+
- comment:
|
|
114
|
+
start: "//"
|
|
115
|
+
end: "$"
|
|
116
|
+
rules:
|
|
117
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
118
|
+
|
|
119
|
+
- comment:
|
|
120
|
+
start: "/\\*"
|
|
121
|
+
end: "\\*/"
|
|
122
|
+
rules:
|
|
123
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
filetype: ATS
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.(d|h|s)ats$"
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- default: \b[[:alnum:]]+[^0-9A-Za-z]
|
|
8
|
+
|
|
9
|
+
# Operators
|
|
10
|
+
- symbol.operator: "[.:;+`|~<>?='\\&]|/|%|-|,|!|\\*|@|\\#"
|
|
11
|
+
- symbol.operator: \^
|
|
12
|
+
|
|
13
|
+
# Types, abstract types and some predefined sorts
|
|
14
|
+
- type: \b(addr|age?z|bool|char|cls|schar|uchar|double|ldouble|eff|exn|float|int(ptr)?|lincloptr|uint)\b
|
|
15
|
+
- type: \b(lint|ulint|llint|ullint|nat|ptr|real|ref|size_t|ssize_t|sint|usint|string|tkind|viewt|v?t0p|vt|void)\b
|
|
16
|
+
- type: \b(prop|t[@0]ype|type|viewt[@0]ype|viewtype|vt[@0]ype|vtype|view)\b
|
|
17
|
+
- type: \b(prop[+-]|t[@0]ype[+-]|type[+-]|viewt[@0]ype[+-]|viewtype[+-]|vt[@0]ype[+-]|vtype[+-]|view[+-])
|
|
18
|
+
|
|
19
|
+
# Statements
|
|
20
|
+
- statement: \b(abstype|abst|absprop|absviewt|absvt(ype)?|absview|and|andalso|as|(re)?assume|begin|(pr)?case|s?case)\b
|
|
21
|
+
- statement: \b(classdec|dataprop|data(v|view)?type|dataview|datasort|do|dynload|else|end|exception|extype|extva(r|l)|s?if)\b
|
|
22
|
+
- statement: \b(ifcase|import|for|in|infix(l|r)?|let|local|macrodef|macdef|not|of|op|or|orelse|overload|(pre|post|non)fix)\b
|
|
23
|
+
- statement: \b(propdef|rec|sortdef|stacst|stadef|staload|stavar|sta(tic)?|symelim|symintr|tkindef|then|try|viewdef|v?typedef)\b
|
|
24
|
+
- statement: \b(viewtypedef|(pr)?va(l|r)|when|where|while|with|withtype|withprop|withv(iew)?type|withview)\b
|
|
25
|
+
- statement: \b(abst[@0]ype|absviewt[@0]?ype|absvt[@0]ype|abstbox|abstflat|absvtbox|absvtflat|absimpl|absreimpl|abs)\b
|
|
26
|
+
- statement: \b(case[+-]|(pr)?va(l|r)[+-]|for\*|while\*)
|
|
27
|
+
|
|
28
|
+
# Numbers
|
|
29
|
+
- constant.number: \b[0-9.]+([eE][+-]?[0-9]+)?[fFlL]?\b
|
|
30
|
+
- constant.number: \b0[xX][0-9A-Fa-f]*(\.[0-9A-Fa-f]*)?[pP][+-]?[0-9]+[fFlL]?\b
|
|
31
|
+
- constant.number: \b([0-9]+|0[xX][0-9A-Fa-f]+)[lLuU]*\b
|
|
32
|
+
|
|
33
|
+
# Function-related keywords, special functions and namespaces. Not really identifiers
|
|
34
|
+
- identifier: \b(fix|(pr)?fu?n|fnx|castfn|praxi|extern|lam|llam|(pr)?implement|(pr)?implmnt)\b
|
|
35
|
+
- identifier: \b(fix@|fold@|free@|lam@|llam@|addr@|view@|ref@|fn\*)
|
|
36
|
+
- identifier: \$\w*\b
|
|
37
|
+
|
|
38
|
+
# Other keywords, function effects...
|
|
39
|
+
- special: (\$(arrpsz|arrptrsize|break|continue|d2ctype|delay|effmask_(ntm|exn|ref|wrt|all)))\b
|
|
40
|
+
- special: (\$(effmask|extern|extype_struct|extype|extkind|extval|extfcall|extmcall|ldelay|literal))\b
|
|
41
|
+
- special: (\$(li?st_vt|li?st_t|li?st|myfilename|myfunction|mylocation|raise|rec(ord)?_vt))\b
|
|
42
|
+
- special: (\$(rec(ord)?_t|rec(ord)?|showtype|solver_assert|solver_verify|tempenver))\b
|
|
43
|
+
- special: (\$(tup(le)?_vt|tup(le)?_t|tup(le)?|tyrep|vararg|vcopyenv_vt|vcopyenv_v))\b
|
|
44
|
+
- special: \!(wrt|exnref|exnwrt|exn|refwrt|ref|all|ntm|laz)\b
|
|
45
|
+
- special: \b(fun(0|1)|(lin)?cloptr(0|1)?|cloref(0|1)?|clo(0|1)?|lin|prf)\b
|
|
46
|
+
- special: \b(f?print(ln)?!|prerr(ln)?!|tupz!)
|
|
47
|
+
|
|
48
|
+
# Some C macros and other ATS macros
|
|
49
|
+
- preproc: ^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|warning|error|assert)\b
|
|
50
|
+
- preproc: ^[[:space:]]*#[[:space:]]*(codegen2|codegen3|elifdef|elifndef|prerr|print|require|then|staload|dynload)\b
|
|
51
|
+
|
|
52
|
+
# Boolean values
|
|
53
|
+
- constant.bool: \b(true|false|null)\b
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# The "%{ ... %}" block inserts foreign code into ATS at compile-time
|
|
57
|
+
# Code inside of it is generally C or JavaScript
|
|
58
|
+
- default:
|
|
59
|
+
start: "%{[#^$]?"
|
|
60
|
+
end: "%}"
|
|
61
|
+
skip: "\\."
|
|
62
|
+
limit-group: symbol.operator
|
|
63
|
+
rules:
|
|
64
|
+
- include: "c"
|
|
65
|
+
- include: "javascript"
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# Strings and chars
|
|
69
|
+
- constant.string: \"[^"]*\"
|
|
70
|
+
- constant.string: \'[^']*\'
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Comments
|
|
74
|
+
# "////" comments everything until it reaches EOF
|
|
75
|
+
- comment.block:
|
|
76
|
+
start: ////
|
|
77
|
+
end: $a
|
|
78
|
+
rules:
|
|
79
|
+
- todo: (TODO|XXX|FIXME)
|
|
80
|
+
|
|
81
|
+
- comment.line:
|
|
82
|
+
start: //
|
|
83
|
+
end: $
|
|
84
|
+
rules:
|
|
85
|
+
- todo: (TODO|XXX|FIXME)
|
|
86
|
+
|
|
87
|
+
# ML-like block comment
|
|
88
|
+
- comment.block:
|
|
89
|
+
start: \(\*
|
|
90
|
+
end: \*\)
|
|
91
|
+
rules:
|
|
92
|
+
- todo: (TODO|XXX|FIXME)
|
|
93
|
+
|
|
94
|
+
# C-like block comment
|
|
95
|
+
- comment.block:
|
|
96
|
+
start: /\*
|
|
97
|
+
end: \*\/
|
|
98
|
+
rules:
|
|
99
|
+
- todo: (TODO|XXX|FIXME)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
filetype: awk
|
|
2
|
+
|
|
3
|
+
detect:
|
|
4
|
+
filename: "\\.awk$"
|
|
5
|
+
header: "^#!.*bin/(env +)?awk( |$)"
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- preproc: "\\$[A-Za-z0-9_!@#$*?\\-]+"
|
|
9
|
+
- preproc: "\\b(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\\b"
|
|
10
|
+
- preproc: "\\b(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\\b"
|
|
11
|
+
- preproc: "\\b(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\\b"
|
|
12
|
+
- identifier.class: "\\b(function|extension|BEGIN|END)\\b"
|
|
13
|
+
- symbol.operator: "[\\-+*/%^|!=&<>?;:]|\\\\|\\[|\\]"
|
|
14
|
+
- statement: "\\b(for|if|while|do|else|in|delete|exit)\\b"
|
|
15
|
+
- special: "\\b(break|continue|return)\\b"
|
|
16
|
+
- statement: "\\b(close|getline|next|nextfile|print|printf|system|fflush)\\b"
|
|
17
|
+
- statement: "\\b(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\\b"
|
|
18
|
+
- statement: "\\b(asort|asorti|gensub|gsub|index|length|match)\\b"
|
|
19
|
+
- statement: "\\b(split|sprintf|strtonum|sub|substr|tolower|toupper)\\b"
|
|
20
|
+
- statement: "\\b(mktime|strftime|systime)\\b"
|
|
21
|
+
- statement: "\\b(and|compl|lshift|or|rshift|xor)\\b"
|
|
22
|
+
- statement: "\\b(bindtextdomain|dcgettext|dcngettext)\\b"
|
|
23
|
+
- special: "/.*[^\\\\]/"
|
|
24
|
+
|
|
25
|
+
- constant.string:
|
|
26
|
+
start: "\""
|
|
27
|
+
end: "\""
|
|
28
|
+
skip: "\\\\."
|
|
29
|
+
rules:
|
|
30
|
+
- constant.specialChar: "\\\\."
|
|
31
|
+
|
|
32
|
+
- constant.string:
|
|
33
|
+
start: "'"
|
|
34
|
+
end: "'"
|
|
35
|
+
skip: "\\\\."
|
|
36
|
+
rules:
|
|
37
|
+
- constant.specialChar: "\\\\."
|
|
38
|
+
|
|
39
|
+
- comment:
|
|
40
|
+
start: "#"
|
|
41
|
+
end: "$"
|
|
42
|
+
rules:
|
|
43
|
+
- todo: "(TODO|XXX|FIXME):?"
|
|
44
|
+
|