| Server IP : 43.141.49.92 / Your IP : 113.219.202.141 Web Server : Apache System : Linux VM-8-5-opencloudos 6.6.34-9.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 19 19:35:45 CST 2024 x86_64 User : www ( 1000) PHP Version : 8.1.27 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/source-highlight/ |
Upload File : |
# written by Valentin Gatien-Baron <valentin.gatien-baron@mlstate.com>, MLstate
# (licensed as GPL3 with permission from MLstate)
vardef IDENT = '([a-zA-Z_][a-zA-Z_0-9]*|`[^`]*`)'
vardef FUNCTION = $IDENT+'(?=\()'
vardef MODULE = '[A-Z][a-zA-Z_0-9]*(?=\.)'
# same as number.lang but with 0o and 0b also
# and without suffixes like unsigned or long long
vardef NUMBER =
'\<[+-]?((0[xXbBoO][[:xdigit:]]+)|(([[:digit:]]*\.)?
[[:digit:]]+([eE][+-]?[[:digit:]]+)?))\>'
#directives
preproc = '@[A-Za-z_]+'
number = $NUMBER
# weak coloration for strings
# we color some parts of the expressions inserted in strings
# at the first level only and it won't work if you put curly braces
# in your inserts
environment string delim "\"" "\"" escape "\\" begin
state string delim "{" "}" begin
function = $FUNCTION
number = $NUMBER
symbol = $MODULE
include "symbols.lang"
string delim "\"" "\"" escape "\\"
end
end
keyword = "and|as|db|do|else|if|match|then|type|with|begin|css|end|external|forall|import|package|parser|rec|server|val|xml_parser"
comment delim "/*" "*/" multiline nested
comment start "//"
# comment delim "<>" "</>" multiline nested
# #id
atom = '\#' + $IDENT
# bypasses
atom = '%%[^%]*%%'
# modules
symbol = $MODULE
# need to come before symbols so that ~ doesn't get colored
usertype = '~'+$IDENT
# FIXME: need to color also made up symbols, not the set predefined
# and defined a regexp SYMBOL, use it here and in string insertions above
include "symbols.lang"
# no idea what this is
cbracket = "{|}"
# function recognised as 'ident('
function = $FUNCTION
# bindings, recognised by 'ident ='
usertype = $IDENT+'(?=[[:blank:]]*=)'
# matches some stdlib types
# really ought to parse type expr in type def and in type annotations
type = '\<(?:int|bool|option|float|void|string|list|text|xhtml|xml)\>'