Use Go regex word boundaries

This commit is contained in:
Zachary Yedidia
2017-03-01 17:08:56 -05:00
parent 995a910f6a
commit 3c192c2fb5
27 changed files with 101 additions and 96 deletions

View File

@@ -3,20 +3,20 @@
syntax "cmake" "(CMakeLists\.txt|\.cmake)$"
color identifier.var "^[[:space:]]*[A-Z0-9_]+"
color preproc "^[[:space:]]*(include|include_directories|include_external_msproject)\>"
color preproc "^[[:space:]]*(include|include_directories|include_external_msproject)\b"
color statement "^[[:space:]]*\<((else|end)?if|else|(end)?while|(end)?foreach|break)\>"
color statement "\<(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\>[[:space:]]"
color statement "[[:space:]]\<(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\>[[:space:]]"
color statement "^[[:space:]]*\b((else|end)?if|else|(end)?while|(end)?foreach|break)\b"
color statement "\b(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\b[[:space:]]"
color statement "[[:space:]]\b(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\b[[:space:]]"
color special "^[[:space:]]*\<((end)?(function|macro)|return)"
color special "^[[:space:]]*\b((end)?(function|macro)|return)"
#String Color
color constant.string "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color constant.string "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
color preproc start="\$(\{|ENV\{)" end="\}"
color identifier.macro "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
color identifier.macro "\b(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\b"
color comment "^([[:space:]]*)?#.*"
color comment "[[:space:]]#.*"

View File

@@ -1,14 +1,14 @@
syntax "coffeescript" "\.coffee$"
header "^#!.*/(env +)?coffee"
color symbol.operator "[!&|=/*+-<>]|\<(and|or|is|isnt|not)\>"
color symbol.operator "[!&|=/*+-<>]|\b(and|or|is|isnt|not)\b"
color identifier.class "[A-Za-z_][A-Za-z0-9_]*:[[:space:]]*(->|\()" "->"
color symbol.brackets "[()]"
color statement "\<(for|of|continue|break|isnt|null|unless|this|else|if|return)\>"
color statement "\<(try|catch|finally|throw|new|delete|typeof|in|instanceof)\>"
color statement "\<(debugger|switch|while|do|class|extends|super)\>"
color statement "\<(undefined|then|unless|until|loop|of|by|when)\>"
color constant.bool "\<(true|false|yes|no|on|off)\>"
color statement "\b(for|of|continue|break|isnt|null|unless|this|else|if|return)\b"
color statement "\b(try|catch|finally|throw|new|delete|typeof|in|instanceof)\b"
color statement "\b(debugger|switch|while|do|class|extends|super)\b"
color statement "\b(undefined|then|unless|until|loop|of|by|when)\b"
color constant.bool "\b(true|false|yes|no|on|off)\b"
color identifier "@[A-Za-z0-9_]*"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "(^|[[:space:]])#([^{].*)?$"

View File

@@ -1,17 +1,18 @@
syntax "colortest" "ColorTest$"
color black "\<PLAIN\>"
color black "\bPLAIN\b"
color red "\<red\>"
color green "\<green\>"
color yellow "\<yellow\>"
color blue "\<blue\>"
color magenta "\<magenta\>"
color cyan "\<cyan\>"
color red "\bred\b"
color green "\bgreen\b"
color yellow "\byellow\b"
color blue "\bblue\b"
color magenta "\bmagenta\b"
color cyan "\bcyan\b"
color brightred "\bbrightred\b"
color brightgreen "\bbrightgreen\b"
color brightyellow "\bbrightyellow\b"
color brightblue "\bbrightblue\b"
color brightmagenta "\bbrightmagenta\b"
color brightcyan "\bbrightcyan\b"
color brightred "\<brightred\>"
color brightgreen "\<brightgreen\>"
color brightyellow "\<brightyellow\>"
color brightblue "\<brightblue\>"
color brightmagenta "\<brightmagenta\>"
color brightcyan "\<brightcyan\>"

View File

@@ -7,15 +7,15 @@ color identifier.class "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
color identifier.var "@[A-Za-z]+"
color identifier "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
color type "\<(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\>"
color statement "\<(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\>"
color statement "\<(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\>"
color type "\b(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\b"
color statement "\b(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\b"
color statement "\b(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\b"
# LINQ-only keywords (ones that cannot be used outside of a LINQ query - lots others can)
color statement "\<(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\>"
color special "\<(break|continue)\>"
color constant "\<(true|false)\>"
color statement "\b(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\b"
color special "\b(break|continue)\b"
color constant "\b(true|false)\b"
color symbol "[-+/*=<>?:!~%&|]"
color constant.number "\<([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\>"
color constant.number "\b([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\b"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color constant.specialChar "\\([btnfr]|'|\"|\\)"
color constant.specialChar "\\u[A-Fa-f0-9]{4}"

View File

@@ -8,12 +8,12 @@ color preproc "cdef cppclass [ 0-9A-Z_]+\(.*\):"
# Python Keyword Color
color statement "\<(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>"
color special "\<(continue|break|return)\>"
color statement "\b(and|as|assert|class|def|DEF|del|elif|ELIF|else|ELSE|except|exec|finally|for|from|global|if|IF|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\b"
color special "\b(continue|break|return)\b"
# Cython Keyword Color
color identifier.macro "\<(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\>"
color type "\<(bint|char|double|int|public|void|unsigned)\>"
color identifier.macro "\b(cdef|cimport|cpdef|cppclass|ctypedef|extern|include|namespace|property|struct)\b"
color type "\b(bint|char|double|int|public|void|unsigned)\b"
#Operator Color
color symbol "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"

View File

@@ -1,7 +1,7 @@
syntax "dot" "\.(dot|gv)$"
color type "\<(digraph|edge|graph|node|subgraph)\>"
color statement "\<(arrowhead|arrowsize|arrowtail|bgcolor|center|color|constraint|decorateP|dir|distortion|fillcolor|fontcolor|fontname|fontsize|headclip|headlabel|height|labelangle|labeldistance|labelfontcolor|labelfontname|labelfontsize|label|layers|layer|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|pagedir|page|peripheries|port_label_distance|rankdir|ranksep|rank|ratio|regular|rotate|samehead|sametail|shapefile|shape|sides|size|skew|style|tailclip|taillabel|URL|weight|width)\>"
color type "\b(digraph|edge|graph|node|subgraph)\b"
color statement "\b(arrowhead|arrowsize|arrowtail|bgcolor|center|color|constraint|decorateP|dir|distortion|fillcolor|fontcolor|fontname|fontsize|headclip|headlabel|height|labelangle|labeldistance|labelfontcolor|labelfontname|labelfontsize|label|layers|layer|margin|mclimit|minlen|name|nodesep|nslimit|ordering|orientation|pagedir|page|peripheries|port_label_distance|rankdir|ranksep|rank|ratio|regular|rotate|samehead|sametail|shapefile|shape|sides|size|skew|style|tailclip|taillabel|URL|weight|width)\b"
color symbol "=|->|--"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "(^|[[:space:]])//.*"

View File

@@ -8,10 +8,10 @@ syntax "erb" "\.erb$" "\.rhtml$"
color symbol.brackets start="<" end=">"
color default start="<%" end="%>"
color red "&[^;[[:space:]]]*;"
color statement "\<(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\>"
color identifier.var "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
color magenta "(?i)([ ]|^):[0-9A-Z_]+\>"
color identifier.macro "\<(__FILE__|__LINE__)\>"
color statement "\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b"
color identifier.var "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
color magenta "(?i)([ ]|^):[0-9A-Z_]+\b"
color identifier.macro "\b(__FILE__|__LINE__)\b"
color brightmagenta "!/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
color brightblue "`[^`]*`" "%x\{[^}]*\}"
color constant.string ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
@@ -22,3 +22,4 @@ color comment.bright "##[^{].*$" "##$"
color identifier.macro start="<<-?'?EOT'?" end="^EOT"
color todo "(XXX|TODO|FIXME|\?\?\?)"

View File

@@ -1,6 +1,6 @@
syntax "git-config" "git(config|modules)$|\.git/config$"
color constant.bool "\<(true|false)\>"
color constant.bool "\b(true|false)\b"
color statement "^[[:space:]]*[^=]*="
color constant "^[[:space:]]*\[.*\]$"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View File

@@ -1,13 +1,13 @@
syntax "glsl" "\.(frag|vert|fp|vp|glsl)$"
color identifier.class "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
color type "\<(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\>"
color identifier "\<gl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\>"
color statement "\<(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\>"
color special "\<(break|continue)\>"
color constant.bool "\<(true|false)\>"
color type "\b(void|bool|bvec2|bvec3|bvec4|int|ivec2|ivec3|ivec4|float|vec2|vec3|vec4|mat2|mat3|mat4|struct|sampler1D|sampler2D|sampler3D|samplerCUBE|sampler1DShadow|sampler2DShadow)\b"
color identifier "\bgl_(DepthRangeParameters|PointParameters|MaterialParameters|LightSourceParameters|LightModelParameters|LightModelProducts|LightProducts|FogParameters)\b"
color statement "\b(const|attribute|varying|uniform|in|out|inout|if|else|return|discard|while|for|do)\b"
color special "\b(break|continue)\b"
color constant.bool "\b(true|false)\b"
color symbol.operator "[-+/*=<>?:!~%&|^]"
color constant.number "\<([0-9]+|0x[0-9a-fA-F]*)\>"
color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b"
color comment "(^|[[:space:]])//.*"
color comment start="/\*" end="\*/"
color todo "TODO:?"

View File

@@ -1,8 +1,8 @@
syntax "inputrc" "inputrc$"
color constant.bool.false "\<(off|none)\>"
color constant.bool.true "\<on\>"
color preproc "\<set|\$include\>"
color constant.bool.false "\b(off|none)\b"
color constant.bool.true "\bon\b"
color preproc "\bset|\$include\b"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color constant.specialChar "\\.?"
color comment "(^|[[:space:]])#([^{].*)?$"

View File

@@ -1,8 +1,8 @@
syntax "keymap" "\.(k|key)?map$|Xmodmap$"
color statement "\<(add|clear|compose|keycode|keymaps|keysym|remove|string)\>"
color statement "\<(control|alt|shift)\>"
color constant.number "\<[0-9]+\>"
color statement "\b(add|clear|compose|keycode|keymaps|keysym|remove|string)\b"
color statement "\b(control|alt|shift)\b"
color constant.number "\b[0-9]+\b"
color symbol "="
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "^!.*$"

View File

@@ -10,7 +10,7 @@ color type "defun|define-syntax|define|defmacro|defmodule|export"
# Dirty base cases stolen from the generic lisp syntax
color constant "\ [A-Za-z][A-Za-z0-9_-]+\ "
color symbol.operator "\(([-+*/<>]|<=|>=)|'"
color constant.number "\<[0-9]+\>"
color constant.number "\b[0-9]+\b"
color constant.string "\"(\\.|[^"])*\""
color special "['|`][A-Za-z][A-Za-z0-9_-]+"
color constant.string "\\.?"

View File

@@ -1,8 +1,8 @@
syntax "makefile" "([Mm]akefile|\.ma?k)$"
header "^#!.*/(env +)?[bg]?make( |$)"
color preproc "\<(ifeq|ifdef|ifneq|ifndef|else|endif)\>"
color preproc "^(export|include|override)\>"
color preproc "\b(ifeq|ifdef|ifneq|ifndef|else|endif)\b"
color preproc "^(export|include|override)\b"
color symbol.operator "^[^:= ]+:"
color symbol.operator "[=,%]" "\+=|\?=|:=|&&|\|\|"
color statement "\$\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"

View File

@@ -1,7 +1,7 @@
syntax "mpd" "mpd\.conf$"
color statement "\<(user|group|bind_to_address|host|port|plugin|name|type)\>"
color statement "\<((music|playlist)_directory|(db|log|state|pid|sticker)_file)\>"
color statement "\b(user|group|bind_to_address|host|port|plugin|name|type)\b"
color statement "\b((music|playlist)_directory|(db|log|state|pid|sticker)_file)\b"
color special "^(input|audio_output|decoder)[[:space:]]*\{|\}"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "(^|[[:space:]])#([^{].*)?$"

View File

@@ -3,7 +3,7 @@ header "^(server|upstream)[a-z ]*\{$"
color preproc "\b(events|server|http|location|upstream)[[:space:]]*\{"
color statement "(^|[[:space:]{;])(access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth_basic|auth_basic_user_file|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|default_type|deny|directio|directio_alignment|disable_symlinks|empty_gif|env|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|log_format|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|port_in_redirect|postpone_output|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_read_timeout|proxy_redirect|proxy_send_timeout|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|working_directory|xml_entities|xslt_stylesheet|xslt_types)([[:space:]]|$)"
color constant.bool "\<(on|off)\>"
color constant.bool "\b(on|off)\b"
color identifier "\$[A-Za-z][A-Za-z0-9_]*"
color symbol "[*]"
color constant-string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View File

@@ -25,7 +25,7 @@ color symbol.operator "[.:;,+*|=!\%\[\]]" "<" ">" "/" "-" "&"
color constant.number "\b(-?)?[0-9]+\b" "\b\[0-9]+\.[0-9]+\b" "\b0x[0-9A-F]+\b"
color constant "@\[(\\.|[^\]])*\]" "@\{(\\.|[^\}])*\}" "@\((\\.|[^\)])*\)"
color constant "\b<(\\.[^\>])*\>\b"
color constant "\b<(\\.[^\b])*\b\b"
color constant "\b(nil|NULL|YES|NO|TRUE|true|FALSE|false|self)\b"
color constant "\bk[[:alnum]]*\b"
color constant.string "\"(\\.|[^\"])*\"" "@\"(\\.|[^\"])*\"" "'.'"

View File

@@ -3,8 +3,8 @@
syntax "perl" "\.p[lm]$"
header "^#!.*/(env +)?perl( |$)"
color type "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
color statement "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
color type "\b(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\b" "\b(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\b" "\b(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\b" "\b(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\b" "\b(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\b"
color statement "\b(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\b"
#TODO: This regex needs to be fixed.
color identifier (i) start="[$@%]" end="( |[^0-9A-Z_]|-)"
#ENDTODO.
@@ -13,3 +13,4 @@ color default "[sm]/.*/"
color preproc start="(^use| = new)" end=";"
color comment "#.*"
color identifier.macro start="<< 'STOP'" end="STOP"

View File

@@ -5,14 +5,15 @@
#This file probably needs cleanup!!
syntax "perl6" "\.p6$"
color type "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
color statement "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
color type "\b(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork)|get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join|keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek|seekdir|se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr|y|truncate|umask|un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\b"
color statement "\b(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\b"
# Perl 6 words
color special "\<(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\>"
color special "\b(has|is|class|role|given|when|BUILD|multi|returns|method|submethod|slurp|say|sub)\b"
color identifier start="[$@%]" end="( |\\W|-)"
color constant.string "".*"|qq\|.*\|"
color default "[sm]/.*/"
color preproc start="(^use| = new)" end=";"
color comment "#.*"
color identifier.macro start="<<EOSQL" end="EOSQL"

View File

@@ -1,6 +1,6 @@
syntax "po" "\.pot?$"
color preproc "\<(msgid|msgstr)\>"
color preproc "\b(msgid|msgstr)\b"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color special "\\.?"
color comment "(^|[[:space:]])#([^{].*)?$"

View File

@@ -13,9 +13,9 @@ color statement "\b(class|define|if|else|undef|inherits)\b"
color symbol "(=|-|~|>)"
## Constants
color identifier.var "(\$|@|@@)?\<[A-Z]+[0-9A-Z_a-z]*"
color identifier.var "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
## Ruby "symbols"
color symbol "([ ]|^):[0-9A-Z_]+\>"
color symbol "([ ]|^):[0-9A-Z_]+\b"
## Regular expressions
color constant "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
## Shell command expansion is in `backticks` or like %x{this}. These are

View File

@@ -1,12 +1,12 @@
syntax "rpmspec" "\.spec$" "\.rpmspec$"
color preproc "\<(Icon|ExclusiveOs|ExcludeOs):"
color preproc "\<(BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch):"
color preproc "\<(Conflicts|Obsoletes|Provides|Requires|Requires\(.*\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements):"
color preproc "\<(Epoch|Serial|Nosource|Nopatch):"
color preproc "\<(AutoReq|AutoProv|AutoReqProv):"
color preproc "\<(Copyright|License|Summary|Summary\(.*\)|Distribution|Vendor|Packager|Group|Source[0-9]*|Patch[0-9]*|BuildRoot|Prefix):"
color preproc "\<(Name|Version|Release|Url|URL):"
color preproc "\b(Icon|ExclusiveOs|ExcludeOs):"
color preproc "\b(BuildArch|BuildArchitectures|ExclusiveArch|ExcludeArch):"
color preproc "\b(Conflicts|Obsoletes|Provides|Requires|Requires\(.*\)|Enhances|Suggests|BuildConflicts|BuildRequires|Recommends|PreReq|Supplements):"
color preproc "\b(Epoch|Serial|Nosource|Nopatch):"
color preproc "\b(AutoReq|AutoProv|AutoReqProv):"
color preproc "\b(Copyright|License|Summary|Summary\(.*\)|Distribution|Vendor|Packager|Group|Source[0-9]*|Patch[0-9]*|BuildRoot|Prefix):"
color preproc "\b(Name|Version|Release|Url|URL):"
color preproc start="^(Source|Patch)" end=":"
color preproc "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)"
color preproc "(ifarch|ifnarch|ifos|ifnos)"

View File

@@ -1,11 +1,11 @@
## Here is an example for Scala.
##
syntax "scala" "\.scala$"
color type "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
color statement "\<(match|val|var|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
color statement "\<(def|object|case|trait|lazy|implicit|abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile|sealed)\>"
color type "\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\b"
color statement "\b(match|val|var|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\b"
color statement "\b(def|object|case|trait|lazy|implicit|abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile|sealed)\b"
color constant.string ""[^"]*""
color constant "\<(true|false|null)\>"
color constant "\b(true|false|null)\b"
color comment "//.*"
color comment start="/\*" end="\*/"
color comment.bright start="/\*\*" end="\*/"

View File

@@ -11,16 +11,17 @@ color default "salt:"
# Numbers, etc
color constant.number "/*[0-9]/*"
color constant "\<(True|False)\>"
color constant "\b(True|False)\b"
# Anything between two single quotes
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
# Matching keywords
color special "\<(grain|grains|compound|pcre|grain_pcre|list|pillar)\>"
color special "\b(grain|grains|compound|pcre|grain_pcre|list|pillar)\b"
# Comments
color comment "^#.*"
# Logic keywords
color statement "\<(if|elif|else|or|not|and|endif|end)\>"
color statement "\b(if|elif|else|or|not|and|endif|end)\b"

View File

@@ -6,7 +6,7 @@ color preproc "^\.include\>"
color symbol "="
color special "^\[(Unit|Install|Service|Socket)\]"
color identifier.class "\$MAINPID"
color constant.bool "\<(true|false)\>"
color constant.bool "\b(true|false)\b"
color comment "(^|[[:space:]])#([^{].*)?$"
color indent-char.whitespace "[[:space:]]+$"
color indent-char " + +| + +"

View File

@@ -2,7 +2,7 @@ syntax "tcl" "\.tcl$"
header "^#!.*/(env +)?tclsh( |$)"
## Standard Tcl [info commands]
color statement "\<(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|else|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\>"
color statement "\b(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|else|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\b"
## Basic Tcl sub commands
color statement "\b(array anymore|array donesearch|array exists|array get|array names|array nextelement|array set|array size|array startsearch|array statistics|array unset)\b"
color statement "\b(string bytelength|string compare|string equal|string first|string index|string is|string last|string length|string map|string match|string range|string repeat|string replace|string to|string tolower|string totitle|string toupper|string trim|string trimleft|string trimright|string will|string wordend|string wordstart)\b"

View File

@@ -1,14 +1,14 @@
syntax "vala" "\.vala$"
color type "\<(float|double|bool|char|int|uint|short|long|void|(un)?signed)\>"
color type "\b(float|double|bool|char|int|uint|short|long|void|(un)?signed)\b"
color identifier.class "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
color statement "\<(for|if|while|do|else|case|default|switch|try|throw|catch)\>"
color statement "\<(inline|typedef|struct|enum|union|extern|static|const)\>"
color statement "\<(operator|new|delete|return|null)\>"
color statement "\<(class|override|private|public|signal|this|weak)\>"
color special "\<(goto|break|continue)\>"
color constant.bool "\<(true|false)\>"
color constant.number "\<([0-9]+)\>"
color statement "\b(for|if|while|do|else|case|default|switch|try|throw|catch)\b"
color statement "\b(inline|typedef|struct|enum|union|extern|static|const)\b"
color statement "\b(operator|new|delete|return|null)\b"
color statement "\b(class|override|private|public|signal|this|weak)\b"
color special "\b(goto|break|continue)\b"
color constant.bool "\b(true|false)\b"
color constant.number "\b([0-9]+)\b"
color symbol.operator "[-+/*=<>?:!~%&|]" "->"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color comment "(^|[[:space:]])//.*"

View File

@@ -2,9 +2,9 @@ syntax "xresources" "X(defaults|resources)$"
color special "^[[:alnum:]]+\*"
color identifier.var "\*[[:alnum:]]+\:"
color constant.number "\<[0-9]+\>"
color constant.number "\b[0-9]+\b"
color symbol.operator "[*:=]"
color constant.bool "\<(true|false)\>"
color constant.bool "\b(true|false)\b"
color comment "(^|[[:space:]])#([^{].*)?$"
color indent-char.whitespace "[[:space:]]+$"
color indent-char " + +| + +"