Server IP : 85.214.239.14 / Your IP : 3.145.58.153 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/share/augeas/lenses/dist/ |
Upload File : |
(* Augeas module for editing Java properties files Author: Craig Dunn <craig@craigdunn.org> Limitations: - doesn't support \ alone on a line - values are not unescaped - multi-line properties are broken down by line, and can't be replaced with a single line See format info: http://docs.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader) *) module Properties = (* Define some basic primitives *) let empty = Util.empty_generic_dos /[ \t]*[#!]?[ \t]*/ let eol = Util.doseol let hard_eol = del /\r?\n/ "\n" let sepch = del /([ \t]*(=|:)|[ \t])/ "=" let sepspc = del /[ \t]/ " " let sepch_ns = del /[ \t]*(=|:)/ "=" let sepch_opt = del /[ \t]*(=|:)?[ \t]*/ "=" let value_to_eol_ws = store /(:|=)[^\r\n]*[^ \t\r\n\\]/ let value_to_bs_ws = store /(:|=)[^\n]*[^\\\n]/ let value_to_eol = store /([^ \t\n:=][^\n]*[^ \t\r\n\\]|[^ \t\r\n\\:=])/ let value_to_bs = store /([^ \t\n:=][^\n]*[^\\\n]|[^ \t\n\\:=])/ let indent = Util.indent let backslash = del /[\\][ \t]*\n/ "\\\n" let opt_backslash = del /([\\][ \t]*\n)?/ "" let entry = /([^ \t\r\n:=!#\\]|[\\]:|[\\]=|[\\][\t ]|[\\][^\/\r\n])+/ let multi_line_entry = [ indent . value_to_bs? . backslash ] . [ indent . value_to_bs . backslash ] * . [ indent . value_to_eol . eol ] . value " < multi > " let multi_line_entry_ws = opt_backslash . [ indent . value_to_bs_ws . backslash ] + . [ indent . value_to_eol . eol ] . value " < multi_ws > " (* define comments and properties*) let bang_comment = [ label "!comment" . del /[ \t]*![ \t]*/ "! " . store /([^ \t\n].*[^ \t\r\n]|[^ \t\r\n])/ . eol ] let comment = ( Util.comment | bang_comment ) let property = [ indent . key entry . sepch . ( multi_line_entry | indent . value_to_eol . eol ) ] let property_ws = [ indent . key entry . sepch_ns . ( multi_line_entry_ws | indent . value_to_eol_ws . eol ) ] let empty_property = [ indent . key entry . sepch_opt . hard_eol ] let empty_key = [ sepch_ns . ( multi_line_entry | indent . value_to_eol . eol ) ] (* setup our lens and filter*) let lns = ( empty | comment | property_ws | property | empty_property | empty_key ) *