diff options
-rw-r--r-- | lib/coderay/scanners/php.rb | 231 | ||||
-rw-r--r-- | test/scanners/php/pleac.expected.raydebug | 650 | ||||
-rw-r--r-- | test/scanners/php/test.expected.raydebug | 368 |
3 files changed, 635 insertions, 614 deletions
diff --git a/lib/coderay/scanners/php.rb b/lib/coderay/scanners/php.rb index 39e8eb4..11338e8 100644 --- a/lib/coderay/scanners/php.rb +++ b/lib/coderay/scanners/php.rb @@ -8,48 +8,46 @@ class Regexp end module CodeRay module Scanners - + load :html # TODO: Complete rewrite. This scanner is buggy. class PHP < Scanner - + register_for :php file_extension 'php' - + def setup @html_scanner = CodeRay.scanner :html, :tokens => @tokens, :keep_tokens => true, :keep_state => true end - + def reset_instance super @html_scanner.reset end - + module Words # according to http://www.php.net/manual/en/reserved.keywords.php KEYWORDS = %w[ - abstract and array as break case catch class clone - const continue declare default do else elseif - enddeclare endfor endforeach endif endswitch endwhile - extends final for foreach function global goto if implements - interface instanceof namespace new or - private protected public static switch throw try use var - while xor + abstract and array as break case catch class clone const continue declare default do else elseif + enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global + goto if implements interface instanceof namespace new or private protected public static switch + throw try use var while xor cfunction old_function - null true false ] + TYPES = %w[ int integer float double bool boolean string array object resource ] + LANGUAGE_CONSTRUCTS = %w[ die echo empty exit eval include include_once isset list require require_once return print unset ] - TYPES = %w[ int float ] + CLASSES = %w[ Directory stdClass __PHP_Incomplete_Class exception php_user_filter Closure ] # according to http://php.net/quickref.php on 2009-04-21; - # all functions with _ excluded (module functions) + # all functions with _ excluded (module functions) and selected additional functions BUILTIN_FUNCTIONS = %w[ abs acos acosh addcslashes addslashes aggregate array arsort ascii2ebcdic asin asinh asort assert atan atan2 atanh basename bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub bin2hex bindec @@ -81,7 +79,14 @@ module Scanners strstr strtok strtolower strtotime strtoupper strtr strval substr symlink syslog system tan tanh tempnam textdomain time tmpfile touch trim uasort ucfirst ucwords uksort umask uniqid unixtojd unlink unpack unserialize unset urldecode urlencode usleep usort vfprintf virtual vprintf vsprintf wordwrap - ] + %w[ + array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc + array_diff_key array_diff_uassoc array_diff_ukey array_fill array_fill_keys array_filter array_flip + array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey + array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad + array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift + array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect + array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk + array_walk_recursive assert_options base_convert base64_decode base64_encode chunk_split class_exists class_implements class_parents count_chars debug_backtrace debug_print_backtrace debug_zval_dump @@ -97,6 +102,10 @@ module Scanners halt_compiler headers_list headers_sent highlight_file highlight_string html_entity_decode htmlspecialchars_decode in_array include_once inclued_get_data + is_a is_array is_binary is_bool is_buffer is_callable is_dir is_double is_executable is_file is_finite + is_float is_infinite is_int is_integer is_link is_long is_nan is_null is_numeric is_object is_readable + is_real is_resource is_scalar is_soap_fault is_string is_subclass_of is_unicode is_uploaded_file + is_writable is_writeable locale_get_default locale_set_default number_format override_function parse_str parse_url php_check_syntax php_ini_loaded_file php_ini_scanned_files php_logo_guid php_sapi_name @@ -114,36 +123,55 @@ module Scanners utf8_decode utf8_encode var_dump var_export version_compare zend_logo_guid zend_thread_id zend_version - ] + %w[ - array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc - array_diff_key array_diff_uassoc array_diff_ukey array_fill array_fill_keys array_filter array_flip - array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey - array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad - array_pop array_product array_push array_rand array_reduce array_reverse array_search array_shift - array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect - array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk - array_walk_recursive - ] + %w[ - is_a is_array is_binary is_bool is_buffer is_callable is_dir is_double is_executable is_file is_finite - is_float is_infinite is_int is_integer is_link is_long is_nan is_null is_numeric is_object is_readable - is_real is_resource is_scalar is_soap_fault is_string is_subclass_of is_unicode is_uploaded_file - is_writable is_writeable ] - # TODO: more built-in PHP functions? - # TODO: more predefined constants? - SPECIAL_CONSTANTS = %w[ + EXCEPTIONS = %w[ + E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING + E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_DEPRECATED E_USER_DEPRECATED E_ALL E_STRICT + ] + + CONSTANTS = %w[ + null true false self parent __LINE__ __DIR__ __FILE__ __LINE__ __CLASS__ __NAMESPACE__ __METHOD__ __FUNCTION__ + PHP_VERSION PHP_MAJOR_VERSION PHP_MINOR_VERSION PHP_RELEASE_VERSION PHP_VERSION_ID PHP_EXTRA_VERSION PHP_ZTS + PHP_DEBUG PHP_MAXPATHLEN PHP_OS PHP_SAPI PHP_EOL PHP_INT_MAX PHP_INT_SIZE DEFAULT_INCLUDE_PATH + PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_PREFIX PHP_BINDIR PHP_LIBDIR PHP_DATADIR + PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_CONFIG_FILE_SCAN_DIR PHP_SHLIB_SUFFIX + PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END + __COMPILER_HALT_OFFSET__ + EXTR_OVERWRITE EXTR_SKIP EXTR_PREFIX_SAME EXTR_PREFIX_ALL EXTR_PREFIX_INVALID EXTR_PREFIX_IF_EXISTS + EXTR_IF_EXISTS SORT_ASC SORT_DESC SORT_REGULAR SORT_NUMERIC SORT_STRING CASE_LOWER CASE_UPPER COUNT_NORMAL + COUNT_RECURSIVE ASSERT_ACTIVE ASSERT_CALLBACK ASSERT_BAIL ASSERT_WARNING ASSERT_QUIET_EVAL CONNECTION_ABORTED + CONNECTION_NORMAL CONNECTION_TIMEOUT INI_USER INI_PERDIR INI_SYSTEM INI_ALL M_E M_LOG2E M_LOG10E M_LN2 M_LN10 + M_PI M_PI_2 M_PI_4 M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2 CRYPT_SALT_LENGTH CRYPT_STD_DES CRYPT_EXT_DES + CRYPT_MD5 CRYPT_BLOWFISH DIRECTORY_SEPARATOR SEEK_SET SEEK_CUR SEEK_END LOCK_SH LOCK_EX LOCK_UN LOCK_NB + HTML_SPECIALCHARS HTML_ENTITIES ENT_COMPAT ENT_QUOTES ENT_NOQUOTES INFO_GENERAL INFO_CREDITS + INFO_CONFIGURATION INFO_MODULES INFO_ENVIRONMENT INFO_VARIABLES INFO_LICENSE INFO_ALL CREDITS_GROUP + CREDITS_GENERAL CREDITS_SAPI CREDITS_MODULES CREDITS_DOCS CREDITS_FULLPAGE CREDITS_QA CREDITS_ALL STR_PAD_LEFT + STR_PAD_RIGHT STR_PAD_BOTH PATHINFO_DIRNAME PATHINFO_BASENAME PATHINFO_EXTENSION PATH_SEPARATOR CHAR_MAX + LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_ALL LC_MESSAGES ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5 + ABDAY_6 ABDAY_7 DAY_1 DAY_2 DAY_3 DAY_4 DAY_5 DAY_6 DAY_7 ABMON_1 ABMON_2 ABMON_3 ABMON_4 ABMON_5 ABMON_6 + ABMON_7 ABMON_8 ABMON_9 ABMON_10 ABMON_11 ABMON_12 MON_1 MON_2 MON_3 MON_4 MON_5 MON_6 MON_7 MON_8 MON_9 + MON_10 MON_11 MON_12 AM_STR PM_STR D_T_FMT D_FMT T_FMT T_FMT_AMPM ERA ERA_YEAR ERA_D_T_FMT ERA_D_FMT ERA_T_FMT + ALT_DIGITS INT_CURR_SYMBOL CURRENCY_SYMBOL CRNCYSTR MON_DECIMAL_POINT MON_THOUSANDS_SEP MON_GROUPING + POSITIVE_SIGN NEGATIVE_SIGN INT_FRAC_DIGITS FRAC_DIGITS P_CS_PRECEDES P_SEP_BY_SPACE N_CS_PRECEDES + N_SEP_BY_SPACE P_SIGN_POSN N_SIGN_POSN DECIMAL_POINT RADIXCHAR THOUSANDS_SEP THOUSEP GROUPING YESEXPR NOEXPR + YESSTR NOSTR CODESET LOG_EMERG LOG_ALERT LOG_CRIT LOG_ERR LOG_WARNING LOG_NOTICE LOG_INFO LOG_DEBUG LOG_KERN + LOG_USER LOG_MAIL LOG_DAEMON LOG_AUTH LOG_SYSLOG LOG_LPR LOG_NEWS LOG_UUCP LOG_CRON LOG_AUTHPRIV LOG_LOCAL0 + LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 LOG_PID LOG_CONS LOG_ODELAY + LOG_NDELAY LOG_NOWAIT LOG_PERROR ] - IdentKinds = CaseIgnoringWordList.new(:ident, true). + IDENT_KIND = CaseIgnoringWordList.new(:ident, true). add(KEYWORDS, :reserved). add(TYPES, :pre_type). - add(LANGUAGE_CONSTRUCTS, :predefined). + add(LANGUAGE_CONSTRUCTS, :reserved). add(BUILTIN_FUNCTIONS, :predefined). - add(SPECIAL_CONSTANTS, :pre_constant) + add(CLASSES, :pre_constant). + add(EXCEPTIONS, :exception). + add(CONSTANTS, :pre_constant) end module RE @@ -166,41 +194,29 @@ module Scanners IChar = /[a-z0-9_\x80-\xFF]/i IStart = /[a-z_\x80-\xFF]/i Identifier = /#{IStart}#{IChar}*/ - Variable = /\$#{Identifier}/ + VARIABLE = /\$#{Identifier}/ - Typecasts = build_alternatives %w! - float double real int integer bool boolean string array object null - !.map{|s| "(#{s})"} - OneLineComment1 = %r!//.*?(?=#{PHP_END}|$)! - OneLineComment2 = %r!#.*?(?=#{PHP_END}|$)! - OneLineComment = OneLineComment1 | OneLineComment2 - HereDoc = /<<</ + Identifier - binops = %w! - + - * / << >> & | ^ . % - ! - - ComparisionOperator = build_alternatives %w$ - === !== == != <= >= - $ - IncDecOperator = build_alternatives %w! ++ -- ! - - BinaryOperator = build_alternatives binops - AssignOperator = build_alternatives binops.map {|s| "${s}=" } - LogicalOperator = build_alternatives %w! and or xor not ! - ObjectOperator = build_alternatives %w! -> :: ! - OtherOperator = build_alternatives %w$ => = ? : [ ] ( ) ; , ~ ! @ > <$ - - Operator = ComparisionOperator | IncDecOperator | LogicalOperator | - ObjectOperator | AssignOperator | BinaryOperator | OtherOperator + OPERATOR = / + \.(?!\d)=? | # dot that is not decimal point, string concatenation + && | \|\| | # logic + :: | -> | => | # scope, member, dictionary + \+\+ | -- | # increment, decrement + [,;?:()\[\]{}] | # simple delimiters + [-+*\/%&|^]=? | # ordinary math, binary logic, assignment shortcuts + [~@$] | # whatever + [=!]=?=? | <> | # comparison and assignment + <<=? | >>=? | [<>]=? # comparison and shift + /x Integer = /0x[0-9a-fA-F]/ | /\d+/ - Float = /(?:\d+\.\d*|\d*\.\d+)(?:e[+-]\d+)?/ + Float = /(?:\d+\.\d*|\d*\.\d+)(?:e[-+]?\d+)?|\d+e[-+]?\d+/i end def scan_tokens tokens, options + states = [:initial] if match?(RE::PHP_START) || # starts with <? (match?(/\s*<(?i:\w|\?xml)/) && exist?(RE::PHP_START)) # starts with HTML tag and contains <? @@ -209,6 +225,7 @@ module Scanners states << :php end # heredocdelim = nil + delimiter = nil until eos? @@ -230,25 +247,24 @@ module Scanners when :php if scan RE::PHP_END kind = :inline_delimiter - states.pop + states = [:initial] elsif scan(/\s+/) kind = :space - elsif scan(/\/\*/) + elsif scan(/ \/\* (?: .*? \*\/ | .* ) /mx) kind = :comment - states.push :mlcomment - elsif scan RE::OneLineComment + elsif scan(%r!(?://|#).*?(?=#{RE::PHP_END}|$)!o) kind = :comment elsif match = scan(RE::Identifier) - kind = Words::IdentKinds[match] + kind = Words::IDENT_KIND[match] if kind == :ident && check(/:(?!:)/) #&& tokens[-2][0] == 'case' -# match << scan(/:/) kind = :label - elsif kind == :ident and match =~ /^[A-Z]/ + elsif kind == :ident && match =~ /^[A-Z]/ kind = :constant + # TODO: function and class definitions end elsif scan RE::Float @@ -262,8 +278,9 @@ module Scanners kind = :delimiter states.push :sqstring - elsif scan(/"/) + elsif match = scan(/["`]/) tokens << [:open, :string] + delimiter = match kind = :delimiter states.push :dqstring @@ -274,7 +291,7 @@ module Scanners # kind = :delimiter # states.push :heredocstring - elsif scan RE::Variable + elsif scan RE::VARIABLE kind = :local_variable elsif scan(/\{/) @@ -282,14 +299,22 @@ module Scanners states.push :php elsif scan(/\}/) - if states.length == 1 + if states.size == 1 kind = :error else - kind = :operator states.pop + if states.last.is_a?(::Array) + delimiter = states.last[1] + states[-1] = states.last[0] + tokens << [matched, :delimiter] + tokens << [:close, :inline] + next + else + kind = :operator + end end - elsif scan RE::Operator + elsif scan(/#{RE::OPERATOR}/o) kind = :operator else @@ -298,48 +323,44 @@ module Scanners end - when :mlcomment - if scan(/(?:[^\n\r\f*]|\*(?!\/))+/) - kind = :comment - - elsif scan(/\*\//) - kind = :comment - states.pop - - elsif scan(/[\r\n\f]+/) - kind = :space - end - when :sqstring if scan(/[^'\\]+/) kind = :content - elsif scan(/\\./m) - kind = :content - elsif scan(/\\/) - kind = :error elsif scan(/'/) tokens << [matched, :delimiter] tokens << [:close, :string] + delimiter = nil states.pop next + elsif scan(/\\[\\'\n]/) + kind = :char + elsif scan(/\\./m) + kind = :content + elsif scan(/\\/) + kind = :error end when :dqstring - # TODO: $foo[bar] kind of stuff - if scan(/[^"${\\]+/) + if scan(delimiter == '"' ? /[^"${\\]+/ : /[^`${\\]+/) kind = :content - elsif scan(/\\x[0-9a-fA-F]{2}/) - kind = :char - elsif scan(/\\\d{3}/) + elsif scan(delimiter == '"' ? /"/ : /`/) + tokens << [matched, :delimiter] + tokens << [:close, :string] + delimiter = nil + states.pop + next + elsif scan(/\\(?:x[0-9a-fA-F]{2}|\d{3})/) kind = :char - elsif scan(/\\["\\abcfnrtyv]/) + elsif scan(delimiter == '"' ? /\\["\\\nfnrtv]/ : /\\[`\\\nfnrtv]/) kind = :char elsif scan(/\\./m) kind = :content elsif scan(/\\/) kind = :error - elsif match = scan(/#{RE::Variable}/o) + elsif match = scan(/#{RE::VARIABLE}/o) kind = :local_variable + # $foo[bar] and $foo->bar kind of stuff + # TODO: highlight tokens separately! if check(/\[#{RE::Identifier}\]/o) match << scan(/\[#{RE::Identifier}\]/o) elsif check(/\[/) @@ -347,24 +368,24 @@ module Scanners kind = :error elsif check(/->#{RE::Identifier}/o) match << scan(/->#{RE::Identifier}/o) + elsif check(/->/) + match << scan(/->/) + kind = :error end - elsif scan(/\{/) + elsif match = scan(/\{/) if check(/\$/) - kind = :operator + kind = :delimiter + states[-1] = [states.last, delimiter] + delimiter = nil states.push :php + tokens << [:open, :inline] else kind = :string end - match = '{' elsif scan(/\$\{#{RE::Identifier}\}/o) kind = :local_variable elsif scan(/\$/) kind = :content - elsif scan(/"/) - tokens << [matched, :delimiter] - tokens << [:close, :string] - states.pop - next end else raise_inspect 'Unknown state!', tokens, states diff --git a/test/scanners/php/pleac.expected.raydebug b/test/scanners/php/pleac.expected.raydebug index 48f1a75..c900ba0 100644 --- a/test/scanners/php/pleac.expected.raydebug +++ b/test/scanners/php/pleac.expected.raydebug @@ -12,7 +12,7 @@ comment(# @@SKIP@@ http://php.net/) comment(# @@PLEAC@@_1.0) comment(#-----------------------------) local_variable($string) operator(=) string<delimiter(')content(\\n)delimiter(')>operator(;) comment(# two characters, \\ and an n) -local_variable($string) operator(=) string<delimiter(')content(Jon )content(\\')content(Maddog)content(\\')content( Orwant)delimiter(')>operator(;) comment(# literal single quotes) +local_variable($string) operator(=) string<delimiter(')content(Jon )char(\\')content(Maddog)char(\\')content( Orwant)delimiter(')>operator(;) comment(# literal single quotes) local_variable($string) operator(=) string<delimiter(')content(Jon "Maddog" Orwant)delimiter(')>operator(;) comment(# literal double quotes) comment(#-----------------------------) local_variable($string) operator(=) string<delimiter(")char(\\n)delimiter(")>operator(;) comment(# a "newline" character) @@ -104,11 +104,11 @@ reserved(function) ident(cut2fmt)operator(()operator(\)) operator({) local_variable($template) operator(=) string<delimiter(')delimiter(')>operator(;) local_variable($lastpos) operator(=) integer(1)operator(;) reserved(foreach)operator(()local_variable($positions) reserved(as) local_variable($place)operator(\)) operator({) - local_variable($template) operator(.)operator(=) string<delimiter(")content(A)delimiter(")> operator(.) operator(()local_variable($place) operator(-) local_variable($lastpos)operator(\)) operator(.) string<delimiter(")content( )delimiter(")>operator(;) + local_variable($template) operator(.=) string<delimiter(")content(A)delimiter(")> operator(.) operator(()local_variable($place) operator(-) local_variable($lastpos)operator(\)) operator(.) string<delimiter(")content( )delimiter(")>operator(;) local_variable($lastpos) operator(=) local_variable($place)operator(;) operator(}) - local_variable($template) operator(.)operator(=) string<delimiter(")content(A*)delimiter(")>operator(;) - predefined(return) local_variable($template)operator(;) + local_variable($template) operator(.=) string<delimiter(")content(A*)delimiter(")>operator(;) + reserved(return) local_variable($template)operator(;) operator(}) local_variable($fmt) operator(=) ident(cut2fmt)operator(()integer(8)operator(,) integer(14)operator(,) integer(20)operator(,) integer(26)operator(,) integer(30)operator(\))operator(;) @@ -122,16 +122,16 @@ comment(# use $b if $b is true, else $c) local_variable($a) operator(=) local_variable($b)operator(?)local_variable($b)operator(:)local_variable($c)operator(;) comment(# set $x to $y unless $x is already true) -local_variable($x) operator(|)operator(|) local_variable($x)operator(=)local_variable($y)operator(;) +local_variable($x) operator(||) local_variable($x)operator(=)local_variable($y)operator(;) comment(#-----------------------------) comment(# use $b if $b is defined, else $c) local_variable($a) operator(=) predefined(defined)operator(()local_variable($b)operator(\)) operator(?) local_variable($b) operator(:) local_variable($c)operator(;) comment(#-----------------------------) -local_variable($foo) operator(=) local_variable($bar) operator(|)operator(|) local_variable($foo) operator(=) string<delimiter(")content(DEFAULT VALUE)delimiter(")>operator(;) +local_variable($foo) operator(=) local_variable($bar) operator(||) local_variable($foo) operator(=) string<delimiter(")content(DEFAULT VALUE)delimiter(")>operator(;) comment(#-----------------------------) -local_variable($dir) operator(=) predefined(array_shift)operator(()local_variable($_SERVER)operator([)string<delimiter(')content(argv)delimiter(')>operator(])operator(\)) operator(|)operator(|) local_variable($dir) operator(=) string<delimiter(")content(/tmp)delimiter(")>operator(;) +local_variable($dir) operator(=) predefined(array_shift)operator(()local_variable($_SERVER)operator([)string<delimiter(')content(argv)delimiter(')>operator(])operator(\)) operator(||) local_variable($dir) operator(=) string<delimiter(")content(/tmp)delimiter(")>operator(;) comment(#-----------------------------) -local_variable($dir) operator(=) local_variable($_SERVER)operator([)string<delimiter(')content(argv)delimiter(')>operator(])operator([)integer(0)operator(]) operator(|)operator(|) local_variable($dir) operator(=) string<delimiter(")content(/tmp)delimiter(")>operator(;) +local_variable($dir) operator(=) local_variable($_SERVER)operator([)string<delimiter(')content(argv)delimiter(')>operator(])operator([)integer(0)operator(]) operator(||) local_variable($dir) operator(=) string<delimiter(")content(/tmp)delimiter(")>operator(;) comment(#-----------------------------) local_variable($dir) operator(=) predefined(defined)operator(()local_variable($_SERVER)operator([)string<delimiter(')content(argv)delimiter(')>operator(])operator([)integer(0)operator(])operator(\)) operator(?) predefined(array_shift)operator(()local_variable($_SERVER)operator([)string<delimiter(')content(argv)delimiter(')>operator(])operator(\)) operator(:) string<delimiter(")content(/tmp)delimiter(")>operator(;) comment(#-----------------------------) @@ -141,14 +141,14 @@ local_variable($count)operator([)local_variable($shell)operator(?)local_variable comment(#-----------------------------) comment(# find the user name on Unix systems) local_variable($user) operator(=) local_variable($_ENV)operator([)string<delimiter(')content(USER)delimiter(')>operator(]) - operator(|)operator(|) local_variable($user) operator(=) local_variable($_ENV)operator([)string<delimiter(')content(LOGNAME)delimiter(')>operator(]) - operator(|)operator(|) local_variable($user) operator(=) ident(posix_getlogin)operator(()operator(\)) - operator(|)operator(|) local_variable($user) operator(=) ident(posix_getpwuid)operator(()ident(posix_getuid)operator(()operator(\))operator(\))operator([)integer(0)operator(]) - operator(|)operator(|) local_variable($user) operator(=) string<delimiter(")content(Unknown uid number )content($)content(<)delimiter(")>operator(;) + operator(||) local_variable($user) operator(=) local_variable($_ENV)operator([)string<delimiter(')content(LOGNAME)delimiter(')>operator(]) + operator(||) local_variable($user) operator(=) ident(posix_getlogin)operator(()operator(\)) + operator(||) local_variable($user) operator(=) ident(posix_getpwuid)operator(()ident(posix_getuid)operator(()operator(\))operator(\))operator([)integer(0)operator(]) + operator(||) local_variable($user) operator(=) string<delimiter(")content(Unknown uid number )content($)content(<)delimiter(")>operator(;) comment(#-----------------------------) -local_variable($starting_point) operator(|)operator(|) local_variable($starting_point) operator(=) string<delimiter(")content(Greenwich)delimiter(")>operator(;) +local_variable($starting_point) operator(||) local_variable($starting_point) operator(=) string<delimiter(")content(Greenwich)delimiter(")>operator(;) comment(#-----------------------------) -predefined(count)operator(()local_variable($a)operator(\)) operator(|)operator(|) local_variable($a) operator(=) local_variable($b)operator(;) comment(# copy only if empty) +predefined(count)operator(()local_variable($a)operator(\)) operator(||) local_variable($a) operator(=) local_variable($b)operator(;) comment(# copy only if empty) local_variable($a) operator(=) predefined(count)operator(()local_variable($b)operator(\)) operator(?) local_variable($b) operator(:) local_variable($c)operator(;) comment(# assign @b if nonempty, else @c) comment(#-----------------------------) @@ -237,7 +237,7 @@ ident(unique) ident(chars) label(are)operator(:) ident(adelnpy) comment(#-----------------------------) local_variable($sum) operator(=) integer(0)operator(;) reserved(foreach) operator(()predefined(unpack)operator(()string<delimiter(")content(C*)delimiter(")>operator(,) local_variable($string)operator(\)) reserved(as) local_variable($byteval)operator(\)) operator({) - local_variable($sum) operator(+)operator(=) local_variable($byteval)operator(;) + local_variable($sum) operator(+=) local_variable($byteval)operator(;) operator(}) predefined(print) string<delimiter(")content(sum is )local_variable($sum)char(\\n)delimiter(")>operator(;) comment(// prints "1248" if $string was "an apple a day") @@ -249,9 +249,9 @@ comment(// sum - compute 16-bit checksum of all input files) local_variable($handle) operator(=) operator(@)predefined(fopen)operator(()local_variable($argv)operator([)integer(1)operator(])operator(,) string<delimiter(')content(r)delimiter(')>operator(\))operator(;) local_variable($checksum) operator(=) integer(0)operator(;) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($handle)operator(\))operator(\)) operator({) - local_variable($checksum) operator(+)operator(=) operator(()predefined(array_sum)operator(()predefined(unpack)operator(()string<delimiter(")content(C*)delimiter(")>operator(,) predefined(fgets)operator(()local_variable($handle)operator(\))operator(\))operator(\))operator(\))operator(;) + local_variable($checksum) operator(+=) operator(()predefined(array_sum)operator(()predefined(unpack)operator(()string<delimiter(")content(C*)delimiter(")>operator(,) predefined(fgets)operator(()local_variable($handle)operator(\))operator(\))operator(\))operator(\))operator(;) operator(}) -local_variable($checksum) operator(%)operator(=) predefined(pow)operator(()integer(2)operator(,)integer(16)operator(\)) operator(-) integer(1)operator(;) +local_variable($checksum) operator(%=) predefined(pow)operator(()integer(2)operator(,)integer(16)operator(\)) operator(-) integer(1)operator(;) predefined(print) string<delimiter(")local_variable($checksum)char(\\n)delimiter(")>operator(;) comment(# @@INCLUDE@@ include/php/slowcat.php) @@ -296,7 +296,7 @@ local_variable($text) operator(=) predefined(preg_replace)operator(()string<deli comment(#-----------------------------) comment(# expand variables in $text, but put an error message in) comment(# if the variable isn't defined) -local_variable($text) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/)content(\\$)content(()content(\\w)content(+\)/e)delimiter(')>operator(,)string<delimiter(')content(isset($$1\)?$$1:)content(\\')content([NO VARIABLE: $$1])content(\\')delimiter(')>operator(,) local_variable($text)operator(\))operator(;) +local_variable($text) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/)content(\\$)content(()content(\\w)content(+\)/e)delimiter(')>operator(,)string<delimiter(')content(isset($$1\)?$$1:)char(\\')content([NO VARIABLE: $$1])char(\\')delimiter(')>operator(,) local_variable($text)operator(\))operator(;) comment(#-----------------------------) comment(// As PHP arrays are used as hashes too, separation of section 4) @@ -372,25 +372,25 @@ comment(#-----------------------------) comment(# @@PLEAC@@_1.13) comment(#-----------------------------) comment(//backslash) -local_variable($var) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/([CHARLIST]\)/)delimiter(')>operator(,) string<delimiter(')content(\\\\)content(\\$)content(1)delimiter(')>operator(,) local_variable($var)operator(\))operator(;) +local_variable($var) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/([CHARLIST]\)/)delimiter(')>operator(,) string<delimiter(')char(\\\\)content(\\$)content(1)delimiter(')>operator(,) local_variable($var)operator(\))operator(;) comment(// double) local_variable($var) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/([CHARLIST]\)/)delimiter(')>operator(,) string<delimiter(')content($1$1)delimiter(')>operator(,) local_variable($var)operator(\))operator(;) comment(#-----------------------------) local_variable($var) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/%/)delimiter(')>operator(,) string<delimiter(')content(%%)delimiter(')>operator(,) local_variable($var)operator(\))operator(;) comment(#-----------------------------) -local_variable($string) operator(=) string<delimiter(')content(Mom said, "Don)content(\\')content(t do that.")delimiter(')>operator(;) -local_variable($string) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/([)content(\\')content("]\)/)delimiter(')>operator(,) string<delimiter(')content(\\\\)content(\\$)content(1)delimiter(')>operator(,) local_variable($string)operator(\))operator(;) +local_variable($string) operator(=) string<delimiter(')content(Mom said, "Don)char(\\')content(t do that.")delimiter(')>operator(;) +local_variable($string) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/([)char(\\')content("]\)/)delimiter(')>operator(,) string<delimiter(')char(\\\\)content(\\$)content(1)delimiter(')>operator(,) local_variable($string)operator(\))operator(;) comment(// in PHP you can also use the addslashes(\) function) comment(#-----------------------------) -local_variable($string) operator(=) string<delimiter(')content(Mom said, "Don)content(\\')content(t do that.")delimiter(')>operator(;) -local_variable($string) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/([)content(\\')content("]\)/)delimiter(')>operator(,) string<delimiter(')content($1$1)delimiter(')>operator(,) local_variable($string)operator(\))operator(;) +local_variable($string) operator(=) string<delimiter(')content(Mom said, "Don)char(\\')content(t do that.")delimiter(')>operator(;) +local_variable($string) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/([)char(\\')content("]\)/)delimiter(')>operator(,) string<delimiter(')content($1$1)delimiter(')>operator(,) local_variable($string)operator(\))operator(;) comment(#-----------------------------) -local_variable($string) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/([^A-Z]\)/)delimiter(')>operator(,) string<delimiter(')content(\\\\)content(\\$)content(1)delimiter(')>operator(,) local_variable($string)operator(\))operator(;) +local_variable($string) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/([^A-Z]\)/)delimiter(')>operator(,) string<delimiter(')char(\\\\)content(\\$)content(1)delimiter(')>operator(,) local_variable($string)operator(\))operator(;) comment(#-----------------------------) comment(// PHP does not have the \\Q and \\E string metacharacters) local_variable($string) operator(=) string<delimiter(")content(this is)char(\\\\)content( a)char(\\\\)content( test)char(\\\\)content(!)delimiter(")>operator(;) comment(// PHP's quotemeta(\) function is not the same as perl's quotemeta(\) function) -local_variable($string) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/()content(\\W)content(\)/)delimiter(')>operator(,) string<delimiter(')content(\\\\)content(\\$)content(1)delimiter(')>operator(,) string<delimiter(')content(is a test!)delimiter(')>operator(\))operator(;) +local_variable($string) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/()content(\\W)content(\)/)delimiter(')>operator(,) string<delimiter(')char(\\\\)content(\\$)content(1)delimiter(')>operator(,) string<delimiter(')content(is a test!)delimiter(')>operator(\))operator(;) comment(#-----------------------------) comment(# @@PLEAC@@_1.14) @@ -412,7 +412,7 @@ comment(// 2. collapse internal whitespace to single space each) reserved(function) ident(sub_trim)operator(()local_variable($string)operator(\)) operator({) local_variable($string) operator(=) predefined(trim)operator(()local_variable($string)operator(\))operator(;) local_variable($string) operator(=) predefined(preg_replace)operator(()string<delimiter(')content(/)content(\\s)content(+/)delimiter(')>operator(,) string<delimiter(')content( )delimiter(')>operator(,) local_variable($string)operator(\))operator(;) - predefined(return) local_variable($string)operator(;) + reserved(return) local_variable($string)operator(;) operator(}) comment(#-----------------------------) @@ -438,7 +438,7 @@ reserved(function) ident(getpwent)operator(()operator(\)) operator({) local_variable($cols) operator(=) predefined(explode)operator(()string<delimiter(")content(:)delimiter(")>operator(,) local_variable($line)operator(\))operator(;) local_variable($pwents)operator([)local_variable($cols)operator([)integer(0)operator(])operator(]) operator(=) local_variable($cols)operator([)integer(4)operator(])operator(;) operator(}) - predefined(return) local_variable($pwents)operator(;) + reserved(return) local_variable($pwents)operator(;) operator(}) predefined(print) string<delimiter(")content(Lookup user: )delimiter(")>operator(;) @@ -447,11 +447,11 @@ reserved(if) operator(()predefined(empty)operator(()local_variable($user)operato local_variable($name_code) operator(=) predefined(soundex)operator(()local_variable($user)operator(\))operator(;) local_variable($pwents) operator(=) ident(getpwent)operator(()operator(\))operator(;) reserved(foreach)operator(()local_variable($pwents) reserved(as) local_variable($username) operator(=>) local_variable($fullname)operator(\)) operator({) - predefined(preg_match)operator(()string<delimiter(")content(/()content(\\w)content(+\)[^,]*)char(\\b)content(()content(\\w)content(+\)/)delimiter(")>operator(,) local_variable($fullname)operator(,) local_variable($matches)operator(\))operator(;) + predefined(preg_match)operator(()string<delimiter(")content(/()content(\\w)content(+\)[^,]*)content(\\b)content(()content(\\w)content(+\)/)delimiter(")>operator(,) local_variable($fullname)operator(,) local_variable($matches)operator(\))operator(;) predefined(list)operator(()operator(,) local_variable($firstname)operator(,) local_variable($lastname)operator(\)) operator(=) local_variable($matches)operator(;) - reserved(if) operator(()local_variable($name_code) operator(==) predefined(soundex)operator(()local_variable($username)operator(\)) operator(|)operator(|) - local_variable($name_code) operator(==) predefined(soundex)operator(()local_variable($lastname)operator(\)) operator(|)operator(|) + reserved(if) operator(()local_variable($name_code) operator(==) predefined(soundex)operator(()local_variable($username)operator(\)) operator(||) + local_variable($name_code) operator(==) predefined(soundex)operator(()local_variable($lastname)operator(\)) operator(||) local_variable($name_code) operator(==) predefined(soundex)operator(()local_variable($firstname)operator(\))operator(\)) operator({) predefined(printf)operator(()string<delimiter(")content(%s: %s %s)char(\\n)delimiter(")>operator(,) local_variable($username)operator(,) local_variable($firstname)operator(,) local_variable($lastname)operator(\))operator(;) @@ -489,19 +489,19 @@ comment(// * Regexes, as shown below) local_variable($s) operator(=) string<delimiter(')content(12.345)delimiter(')>operator(;) -predefined(preg_match)operator(()string<delimiter(')content(/)content(\\D)content(/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(&)operator(&) predefined(die)operator(()string<delimiter(")content(has nondigits)char(\\n)delimiter(")>operator(\))operator(;) -predefined(preg_match)operator(()string<delimiter(')content(/^)content(\\d)content(+$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(not a natural number)char(\\n)delimiter(")>operator(\))operator(;) -predefined(preg_match)operator(()string<delimiter(')content(/^-?)content(\\d)content(+$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(not an integer)char(\\n)delimiter(")>operator(\))operator(;) -predefined(preg_match)operator(()string<delimiter(')content(/^[+-]?)content(\\d)content(+$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(not an integer)char(\\n)delimiter(")>operator(\))operator(;) -predefined(preg_match)operator(()string<delimiter(')content(/^-?)content(\\d)content(+)content(\\.)content(?)content(\\d)content(*$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(not a decimal)char(\\n)delimiter(")>operator(\))operator(;) -predefined(preg_match)operator(()string<delimiter(')content(/^-?(?:)content(\\d)content(+(?:)content(\\.)content(\\d)content(*\)?|)content(\\.)content(\\d)content(+\)$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(not a decimal)char(\\n)delimiter(")>operator(\))operator(;) -predefined(preg_match)operator(()string<delimiter(')content(/^([+-]?\)(?=)content(\\d)content(|)content(\\.)content(\\d)content(\))content(\\d)content(*()content(\\.)content(\\d)content(*\)?([Ee]([+-]?)content(\\d)content(+\)\)?$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(not a C float)char(\\n)delimiter(")>operator(\))operator(;) +predefined(preg_match)operator(()string<delimiter(')content(/)content(\\D)content(/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(&&) predefined(die)operator(()string<delimiter(")content(has nondigits)char(\\n)delimiter(")>operator(\))operator(;) +predefined(preg_match)operator(()string<delimiter(')content(/^)content(\\d)content(+$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(not a natural number)char(\\n)delimiter(")>operator(\))operator(;) +predefined(preg_match)operator(()string<delimiter(')content(/^-?)content(\\d)content(+$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(not an integer)char(\\n)delimiter(")>operator(\))operator(;) +predefined(preg_match)operator(()string<delimiter(')content(/^[+-]?)content(\\d)content(+$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(not an integer)char(\\n)delimiter(")>operator(\))operator(;) +predefined(preg_match)operator(()string<delimiter(')content(/^-?)content(\\d)content(+)content(\\.)content(?)content(\\d)content(*$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(not a decimal)char(\\n)delimiter(")>operator(\))operator(;) +predefined(preg_match)operator(()string<delimiter(')content(/^-?(?:)content(\\d)content(+(?:)content(\\.)content(\\d)content(*\)?|)content(\\.)content(\\d)content(+\)$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(not a decimal)char(\\n)delimiter(")>operator(\))operator(;) +predefined(preg_match)operator(()string<delimiter(')content(/^([+-]?\)(?=)content(\\d)content(|)content(\\.)content(\\d)content(\))content(\\d)content(*()content(\\.)content(\\d)content(*\)?([Ee]([+-]?)content(\\d)content(+\)\)?$/)delimiter(')>operator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(not a C float)char(\\n)delimiter(")>operator(\))operator(;) comment(// ----------------------------) reserved(function) ident(getnum)operator(()local_variable($s)operator(\)) operator({) - predefined(sscanf)operator(()local_variable($s)operator(,) string<delimiter(")content(%D)delimiter(")>operator(,) local_variable($number)operator(\))operator(;) predefined(return) predefined(isset)operator(()local_variable($number)operator(\)) operator(?) local_variable($number) operator(:) integer(0)operator(;) + predefined(sscanf)operator(()local_variable($s)operator(,) string<delimiter(")content(%D)delimiter(")>operator(,) local_variable($number)operator(\))operator(;) reserved(return) predefined(isset)operator(()local_variable($number)operator(\)) operator(?) local_variable($number) operator(:) integer(0)operator(;) operator(}) predefined(echo) ident(getnum)operator(()integer(123)operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) comment(// ok) @@ -562,10 +562,10 @@ local_variable($rounded) operator(=) predefined(sprintf)operator(()local_variabl comment(// ------------) local_variable($a) operator(=) float(0.255)operator(;) local_variable($b) operator(=) predefined(round)operator(()local_variable($a)operator(,) integer(2)operator(\))operator(;) -predefined(echo) string<delimiter(")content(Unrounded: )operator({)local_variable($a)operator(})char(\\n)content(Rounded: )operator({)local_variable($b)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")content(Unrounded: )inline<delimiter({)local_variable($a)delimiter(})>char(\\n)content(Rounded: )inline<delimiter({)local_variable($b)delimiter(})>char(\\n)delimiter(")>operator(;) local_variable($a) operator(=) float(0.255)operator(;) local_variable($b) operator(=) predefined(sprintf)operator(()string<delimiter(')content(%.2f)delimiter(')>operator(,) local_variable($a)operator(\))operator(;) -predefined(echo) string<delimiter(")content(Unrounded: )operator({)local_variable($a)operator(})char(\\n)content(Rounded: )operator({)local_variable($b)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")content(Unrounded: )inline<delimiter({)local_variable($a)delimiter(})>char(\\n)content(Rounded: )inline<delimiter({)local_variable($b)delimiter(})>char(\\n)delimiter(")>operator(;) local_variable($a) operator(=) float(0.255)operator(;) predefined(printf)operator(()string<delimiter(")content(Unrounded: %.f)char(\\n)content(Rounded: %.2f)char(\\n)delimiter(")>operator(,) local_variable($a)operator(,) local_variable($a)operator(\))operator(;) @@ -602,16 +602,16 @@ operator({) operator(;) comment(// ...) operator(}) -reserved(for) operator(()local_variable($i) operator(=) local_variable($X)operator(;) local_variable($i) operator(<=) local_variable($Y)operator(;) local_variable($i) operator(+)operator(=) integer(7)operator(\)) +reserved(for) operator(()local_variable($i) operator(=) local_variable($X)operator(;) local_variable($i) operator(<=) local_variable($Y)operator(;) local_variable($i) operator(+=) integer(7)operator(\)) operator({) operator(;) comment(// ...) operator(}) comment(// ----------------------------) -predefined(echo) string<delimiter(')content(Infancy is:)delimiter(')>operator(;) reserved(foreach)operator(()predefined(range)operator(()integer(0)operator(,) integer(2)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) string<delimiter(")content( )operator({)local_variable($i)operator(})char(\\n)delimiter(")>operator(;) -predefined(echo) string<delimiter(')content(Toddling is:)delimiter(')>operator(;) reserved(foreach)operator(()predefined(range)operator(()integer(3)operator(,) integer(4)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) string<delimiter(")content( )operator({)local_variable($i)operator(})char(\\n)delimiter(")>operator(;) -predefined(echo) string<delimiter(')content(Childhood is:)delimiter(')>operator(;) reserved(foreach)operator(()predefined(range)operator(()integer(5)operator(,) integer(12)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) string<delimiter(")content( )operator({)local_variable($i)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(')content(Infancy is:)delimiter(')>operator(;) reserved(foreach)operator(()predefined(range)operator(()integer(0)operator(,) integer(2)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) string<delimiter(")content( )inline<delimiter({)local_variable($i)delimiter(})>char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(')content(Toddling is:)delimiter(')>operator(;) reserved(foreach)operator(()predefined(range)operator(()integer(3)operator(,) integer(4)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) string<delimiter(")content( )inline<delimiter({)local_variable($i)delimiter(})>char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(')content(Childhood is:)delimiter(')>operator(;) reserved(foreach)operator(()predefined(range)operator(()integer(5)operator(,) integer(12)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) string<delimiter(")content( )inline<delimiter({)local_variable($i)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// @@PLEAC@@_2.6) comment(// PHP offers no native support for Roman Numerals. However, a 'Numbers_Roman' class) @@ -645,8 +645,8 @@ comment(// ----------------------------) reserved(function) ident(make_password)operator(()local_variable($chars)operator(,) local_variable($reqlen)operator(\)) operator({) local_variable($len) operator(=) predefined(strlen)operator(()local_variable($chars)operator(\))operator(;) - reserved(for) operator(()local_variable($i) operator(=) integer(0)operator(;) local_variable($i) operator(<) local_variable($reqlen)operator(;) local_variable($i)operator(++)operator(\)) local_variable($password) operator(.)operator(=) predefined(substr)operator(()local_variable($chars)operator(,) predefined(rand)operator(()integer(0)operator(,) local_variable($len)operator(\))operator(,) integer(1)operator(\))operator(;) - predefined(return) local_variable($password)operator(;) + reserved(for) operator(()local_variable($i) operator(=) integer(0)operator(;) local_variable($i) operator(<) local_variable($reqlen)operator(;) local_variable($i)operator(++)operator(\)) local_variable($password) operator(.=) predefined(substr)operator(()local_variable($chars)operator(,) predefined(rand)operator(()integer(0)operator(,) local_variable($len)operator(\))operator(,) integer(1)operator(\))operator(;) + reserved(return) local_variable($password)operator(;) operator(}) local_variable($chars) operator(=) string<delimiter(')content(ABCDEfghijKLMNOpqrstUVWXYz)delimiter(')>operator(;) local_variable($reqlen) operator(=) integer(8)operator(;) @@ -658,7 +658,7 @@ comment(// PHP sports a large number of C Standard Library routines including th comment(// function, used to re-seed the RNG used with calls to the 'rand' function. Thus,) comment(// as per Perl example:) -reserved(while) operator(()reserved(TRUE)operator(\)) +reserved(while) operator(()pre_constant(TRUE)operator(\)) operator({) local_variable($seed) operator(=) operator(()pre_type(int)operator(\)) predefined(fgets)operator(()constant(STDIN)operator(\))operator(;) reserved(if) operator(()operator(!)predefined(empty)operator(()local_variable($seed)operator(\))operator(\)) reserved(break)operator(;) @@ -687,7 +687,7 @@ comment(// approximate the generation of a 'truly random value') local_variable($truly_random_value) operator(=) ident(mt_rand)operator(()operator(\))operator(;) comment(// @@PLEAC@@_2.10) -reserved(function) ident(random)operator(()operator(\)) operator({) predefined(return) operator(()pre_type(float)operator(\)) predefined(rand)operator(()operator(\)) operator(/) operator(()pre_type(float)operator(\)) predefined(getrandmax)operator(()operator(\))operator(;) operator(}) +reserved(function) ident(random)operator(()operator(\)) operator({) reserved(return) operator(()pre_type(float)operator(\)) predefined(rand)operator(()operator(\)) operator(/) operator(()pre_type(float)operator(\)) predefined(getrandmax)operator(()operator(\))operator(;) operator(}) reserved(function) ident(gaussian_rand)operator(()operator(\)) operator({) @@ -701,7 +701,7 @@ operator({) local_variable($w) operator(=) predefined(sqrt)operator(()operator(()operator(-)float(2.0) operator(*) predefined(log)operator(()local_variable($w)operator(\))operator(\)) operator(/) local_variable($w)operator(\))operator(;) local_variable($g2) operator(=) local_variable($u1) operator(*) local_variable($w)operator(;) local_variable($g1) operator(=) local_variable($u2) operator(*) local_variable($w)operator(;) - predefined(return) local_variable($g1)operator(;) + reserved(return) local_variable($g1)operator(;) operator(}) comment(// ------------) @@ -714,8 +714,8 @@ predefined(printf)operator(()string<delimiter(")content(You have been hired at: comment(// @@PLEAC@@_2.11) comment(// 'deg2rad' and 'rad2deg' are actually PHP built-ins, but here is how you might implement) operator(/) ident(them) reserved(if) ident(needed) -reserved(function) ident(deg2rad_)operator(()local_variable($deg)operator(\)) operator({) predefined(return) operator(()local_variable($deg) operator(/) float(180.0)operator(\)) operator(*) constant(M_PI)operator(;) operator(}) -reserved(function) ident(rad2deg_)operator(()local_variable($rad)operator(\)) operator({) predefined(return) operator(()local_variable($rad) operator(/) constant(M_PI)operator(\)) operator(*) float(180.0)operator(;) operator(}) +reserved(function) ident(deg2rad_)operator(()local_variable($deg)operator(\)) operator({) reserved(return) operator(()local_variable($deg) operator(/) float(180.0)operator(\)) operator(*) pre_constant(M_PI)operator(;) operator(}) +reserved(function) ident(rad2deg_)operator(()local_variable($rad)operator(\)) operator({) reserved(return) operator(()local_variable($rad) operator(/) pre_constant(M_PI)operator(\)) operator(*) float(180.0)operator(;) operator(}) comment(// ------------) @@ -724,7 +724,7 @@ predefined(printf)operator(()string<delimiter(")content(%f)char(\\n)delimiter(") comment(// ----------------------------) -reserved(function) ident(degree_sin)operator(()local_variable($deg)operator(\)) operator({) predefined(return) predefined(sin)operator(()predefined(deg2rad)operator(()local_variable($deg)operator(\))operator(\))operator(;) operator(}) +reserved(function) ident(degree_sin)operator(()local_variable($deg)operator(\)) operator({) reserved(return) predefined(sin)operator(()predefined(deg2rad)operator(()local_variable($deg)operator(\))operator(\))operator(;) operator(}) comment(// ------------) @@ -734,7 +734,7 @@ predefined(printf)operator(()string<delimiter(")content(%f)char(\\n)delimiter(") predefined(printf)operator(()string<delimiter(")content(%f)char(\\n)delimiter(")>operator(,) ident(degree_sin)operator(()float(380.0)operator(\))operator(\))operator(;) comment(// @@PLEAC@@_2.12) -reserved(function) ident(my_tan)operator(()local_variable($theta)operator(\)) operator({) predefined(return) predefined(sin)operator(()local_variable($theta)operator(\)) operator(/) predefined(cos)operator(()local_variable($theta)operator(\))operator(;) operator(}) +reserved(function) ident(my_tan)operator(()local_variable($theta)operator(\)) operator({) reserved(return) predefined(sin)operator(()local_variable($theta)operator(\)) operator(/) predefined(cos)operator(()local_variable($theta)operator(\))operator(;) operator(}) comment(// ------------) @@ -751,7 +751,7 @@ local_variable($log_10) operator(=) predefined(log10)operator(()local_variable($ comment(// ----------------------------) -reserved(function) ident(log_base)operator(()local_variable($base)operator(,) local_variable($value)operator(\)) operator({) predefined(return) predefined(log)operator(()local_variable($value)operator(\)) operator(/) predefined(log)operator(()local_variable($base)operator(\))operator(;) operator(}) +reserved(function) ident(log_base)operator(()local_variable($base)operator(,) local_variable($value)operator(\)) operator({) reserved(return) predefined(log)operator(()local_variable($value)operator(\)) operator(/) predefined(log)operator(()local_variable($base)operator(\))operator(;) operator(}) comment(// ------------) @@ -844,7 +844,7 @@ comment(// @@PLEAC@@_2.17) comment(// PHP offers the 'number_format' built-in function to, among many other format tasks, ) comment(// commify numbers. Perl-compatible [as well as extended] regexes are also available) -reserved(function) ident(commify_series)operator(()local_variable($s)operator(\)) operator({) predefined(return) predefined(number_format)operator(()local_variable($s)operator(,) integer(0)operator(,) string<delimiter(')delimiter(')>operator(,) string<delimiter(')content(,)delimiter(')>operator(\))operator(;) operator(}) +reserved(function) ident(commify_series)operator(()local_variable($s)operator(\)) operator({) reserved(return) predefined(number_format)operator(()local_variable($s)operator(,) integer(0)operator(,) string<delimiter(')delimiter(')>operator(,) string<delimiter(')content(,)delimiter(')>operator(\))operator(;) operator(}) comment(// ------------) @@ -856,7 +856,7 @@ comment(// ----------------------------) reserved(function) ident(commify)operator(()local_variable($s)operator(\)) operator({) - predefined(return) predefined(strrev)operator(()predefined(preg_replace)operator(()string<delimiter(')content(/()content(\\d)content(\\d)content(\\d)content(\)(?=)content(\\d)content(\)(?!)content(\\d)content(*)content(\\.)content(\)/)delimiter(')>operator(,) string<delimiter(')content(${1},)delimiter(')>operator(,) predefined(strrev)operator(()local_variable($s)operator(\))operator(\))operator(\))operator(;) + reserved(return) predefined(strrev)operator(()predefined(preg_replace)operator(()string<delimiter(')content(/()content(\\d)content(\\d)content(\\d)content(\)(?=)content(\\d)content(\)(?!)content(\\d)content(*)content(\\.)content(\)/)delimiter(')>operator(,) string<delimiter(')content(${1},)delimiter(')>operator(,) predefined(strrev)operator(()local_variable($s)operator(\))operator(\))operator(\))operator(;) operator(}) comment(// ------------) @@ -868,7 +868,7 @@ predefined(echo) ident(commify)operator(()predefined(sprintf)operator(()string<d comment(// @@PLEAC@@_2.18) reserved(function) ident(pluralise)operator(()local_variable($value)operator(,) local_variable($root)operator(,) local_variable($singular)operator(=)string<delimiter(')delimiter(')> operator(,) local_variable($plural)operator(=)string<delimiter(')content(s)delimiter(')>operator(\)) operator({) - predefined(return) local_variable($root) operator(.) operator(()operator(()local_variable($value) operator(>) integer(1)operator(\)) operator(?) local_variable($plural) operator(:) local_variable($singular)operator(\))operator(;) + reserved(return) local_variable($root) operator(.) operator(()operator(()local_variable($value) operator(>) integer(1)operator(\)) operator(?) local_variable($plural) operator(:) local_variable($singular)operator(\))operator(;) operator(}) comment(// ------------) @@ -894,7 +894,7 @@ operator({) reserved(foreach)operator(()local_variable($s2p) reserved(as) local_variable($s) operator(=>) local_variable($p)operator(\)) operator({) - reserved(if) operator(()predefined(preg_match)operator(()local_variable($s)operator(,) local_variable($singular)operator(\))operator(\)) predefined(return) predefined(preg_replace)operator(()local_variable($s)operator(,) local_variable($p)operator(,) local_variable($singular)operator(\))operator(;) + reserved(if) operator(()predefined(preg_match)operator(()local_variable($s)operator(,) local_variable($singular)operator(\))operator(\)) reserved(return) predefined(preg_replace)operator(()local_variable($s)operator(,) local_variable($p)operator(,) local_variable($singular)operator(\))operator(;) operator(}) operator(}) @@ -948,16 +948,16 @@ operator({) reserved(foreach) operator(()predefined(func_get_args)operator(()operator(\)) reserved(as) local_variable($arg)operator(\)) operator({) local_variable($kv) operator(=) predefined(explode)operator(()string<delimiter(')content(=)delimiter(')>operator(,) local_variable($arg)operator(\))operator(;) - local_variable($delta) operator(+)operator(=) local_variable($kv)operator([)integer(1)operator(]) operator(*) local_variable($tbl)operator([)predefined(strtolower)operator(()predefined(substr)operator(()local_variable($kv)operator([)integer(0)operator(])operator(,) integer(0)operator(,) integer(3)operator(\))operator(\))operator(])operator(;) + local_variable($delta) operator(+=) local_variable($kv)operator([)integer(1)operator(]) operator(*) local_variable($tbl)operator([)predefined(strtolower)operator(()predefined(substr)operator(()local_variable($kv)operator([)integer(0)operator(])operator(,) integer(0)operator(,) integer(3)operator(\))operator(\))operator(])operator(;) operator(}) - predefined(return) local_variable($delta)operator(;) + reserved(return) local_variable($delta)operator(;) operator(}) reserved(function) ident(dateInterval)operator(()local_variable($intvltype)operator(,) local_variable($timevalue)operator(\)) operator({) reserved(static) local_variable($tbl) operator(=) predefined(array)operator(()string<delimiter(')content(sec)delimiter(')> operator(=>) integer(1)operator(,) string<delimiter(')content(min)delimiter(')> operator(=>) integer(60)operator(,) string<delimiter(')content(hou)delimiter(')> operator(=>) integer(3600)operator(,) string<delimiter(')content(day)delimiter(')> operator(=>) integer(86400)operator(,) string<delimiter(')content(wee)delimiter(')> operator(=>) integer(604800)operator(\))operator(;) - predefined(return) operator(()pre_type(int)operator(\)) predefined(round)operator(()local_variable($timevalue) operator(/) local_variable($tbl)operator([)predefined(strtolower)operator(()predefined(substr)operator(()local_variable($intvltype)operator(,) integer(0)operator(,) integer(3)operator(\))operator(\))operator(])operator(\))operator(;) + reserved(return) operator(()pre_type(int)operator(\)) predefined(round)operator(()local_variable($timevalue) operator(/) local_variable($tbl)operator([)predefined(strtolower)operator(()predefined(substr)operator(()local_variable($intvltype)operator(,) integer(0)operator(,) integer(3)operator(\))operator(\))operator(])operator(\))operator(;) operator(}) comment(// ----------------------------) @@ -970,7 +970,7 @@ comment(// Extract indexed, and associative arrays, respectively, from 'localtim local_variable($today) operator(=) predefined(localtime)operator(()operator(\))operator(;) predefined(printf)operator(()string<delimiter(")content(Today is day %d of the current year)char(\\n)delimiter(")>operator(,) local_variable($today)operator([)integer(7)operator(])operator(\))operator(;) -local_variable($today) operator(=) predefined(localtime)operator(()predefined(time)operator(()operator(\))operator(,) reserved(TRUE)operator(\))operator(;) +local_variable($today) operator(=) predefined(localtime)operator(()predefined(time)operator(()operator(\))operator(,) pre_constant(TRUE)operator(\))operator(;) predefined(printf)operator(()string<delimiter(")content(Today is day %d of the current year)char(\\n)delimiter(")>operator(,) local_variable($today)operator([)string<delimiter(')content(tm_yday)delimiter(')>operator(])operator(\))operator(;) comment(// @@PLEAC@@_3.1) @@ -986,14 +986,14 @@ local_variable($year) operator(=) local_variable($today)operator([)string<delimi comment(// Either do this to use interpolation:) local_variable($sep) operator(=) constant(SEP)operator(;) -predefined(echo) string<delimiter(")content(Current date is: )operator({)local_variable($year)operator(})operator({)local_variable($sep)operator(})operator({)local_variable($month)operator(})operator({)local_variable($sep)operator(})operator({)local_variable($day)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")content(Current date is: )inline<delimiter({)local_variable($year)delimiter(})>inline<delimiter({)local_variable($sep)delimiter(})>inline<delimiter({)local_variable($month)delimiter(})>inline<delimiter({)local_variable($sep)delimiter(})>inline<delimiter({)local_variable($day)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// or simply concatenate:) predefined(echo) string<delimiter(')content(Current date is: )delimiter(')> operator(.) local_variable($year) operator(.) constant(SEP) operator(.) local_variable($month) operator(.) constant(SEP) operator(.) local_variable($day) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) comment(// ------------) -local_variable($today) operator(=) predefined(localtime)operator(()predefined(time)operator(()operator(\))operator(,) reserved(TRUE)operator(\))operator(;) +local_variable($today) operator(=) predefined(localtime)operator(()predefined(time)operator(()operator(\))operator(,) pre_constant(TRUE)operator(\))operator(;) local_variable($day) operator(=) local_variable($today)operator([)string<delimiter(')content(tm_mday)delimiter(')>operator(])operator(;) local_variable($month) operator(=) local_variable($today)operator([)string<delimiter(')content(tm_mon)delimiter(')>operator(]) operator(+) integer(1)operator(;) @@ -1007,7 +1007,7 @@ local_variable($format) operator(=) string<delimiter(')content(Y)delimiter(')> o local_variable($today) operator(=) predefined(date)operator(()local_variable($format)operator(\))operator(;) -predefined(echo) string<delimiter(")content(Current date is: )operator({)local_variable($today)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")content(Current date is: )inline<delimiter({)local_variable($today)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// ------------) @@ -1015,7 +1015,7 @@ local_variable($sep) operator(=) constant(SEP)operator(;) local_variable($today) operator(=) predefined(strftime)operator(()string<delimiter(")content(%Y)local_variable($sep)content(%m)local_variable($sep)content(%d)delimiter(")>operator(\))operator(;) -predefined(echo) string<delimiter(")content(Current date is: )operator({)local_variable($today)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")content(Current date is: )inline<delimiter({)local_variable($today)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// @@PLEAC@@_3.2) local_variable($timestamp) operator(=) predefined(mktime)operator(()local_variable($hour)operator(,) local_variable($min)operator(,) local_variable($sec)operator(,) local_variable($month)operator(,) local_variable($day)operator(,) local_variable($year)operator(\))operator(;) @@ -1089,7 +1089,7 @@ local_variable($hr) operator(=) integer(3)operator(;) local_variable($min) opera local_variable($yroff) operator(=) integer(0)operator(;) local_variable($monoff) operator(=) integer(0)operator(;) local_variable($dayoff) operator(=) integer(55)operator(;) local_variable($hroff) operator(=) integer(2)operator(;) local_variable($minoff) operator(=) integer(17)operator(;) local_variable($secoff) operator(=) integer(5)operator(;) comment(// Base date) -local_variable($birthtime) operator(=) predefined(mktime)operator(()local_variable($hr)operator(,) local_variable($min)operator(,) local_variable($sec)operator(,) local_variable($mon)operator(,) local_variable($day)operator(,) local_variable($year)operator(,) reserved(TRUE)operator(\))operator(;) +local_variable($birthtime) operator(=) predefined(mktime)operator(()local_variable($hr)operator(,) local_variable($min)operator(,) local_variable($sec)operator(,) local_variable($mon)operator(,) local_variable($day)operator(,) local_variable($year)operator(,) pre_constant(TRUE)operator(\))operator(;) local_variable($year) operator(=) predefined(date)operator(()string<delimiter(')content(Y)delimiter(')>operator(,) local_variable($birthtime)operator(\)) operator(+) local_variable($yroff)operator(;) local_variable($mon) operator(=) predefined(date)operator(()string<delimiter(')content(m)delimiter(')>operator(,) local_variable($birthtime)operator(\)) operator(+) local_variable($monoff)operator(;) @@ -1100,7 +1100,7 @@ local_variable($min) operator(=) predefined(date)operator(()string<delimiter(')c local_variable($sec) operator(=) predefined(date)operator(()string<delimiter(')content(s)delimiter(')>operator(,) local_variable($birthtime)operator(\)) operator(+) local_variable($secoff)operator(;) comment(// Offset date) -local_variable($then) operator(=) predefined(mktime)operator(()local_variable($hr)operator(,) local_variable($min)operator(,) local_variable($sec)operator(,) local_variable($mon)operator(,) local_variable($day)operator(,) local_variable($year)operator(,) reserved(TRUE)operator(\))operator(;) +local_variable($then) operator(=) predefined(mktime)operator(()local_variable($hr)operator(,) local_variable($min)operator(,) local_variable($sec)operator(,) local_variable($mon)operator(,) local_variable($day)operator(,) local_variable($year)operator(,) pre_constant(TRUE)operator(\))operator(;) predefined(printf)operator(()string<delimiter(")content(Birthtime is: %s)char(\\n)content(then is: %s)char(\\n)delimiter(")>operator(,) predefined(date)operator(()constant(DATE_RFC1123)operator(,) local_variable($birthtime)operator(\))operator(,) predefined(date)operator(()constant(DATE_RFC1123)operator(,) local_variable($then)operator(\))operator(\))operator(;) @@ -1142,8 +1142,8 @@ local_variable($bree) operator(=) predefined(strtotime)operator(()string<delimit local_variable($nat) operator(=) predefined(strtotime)operator(()string<delimiter(')content(18 Jan 1973, 3:45:50)delimiter(')>operator(\))operator(;) comment(// ... or, with daylight saving adjustment) -local_variable($bree) operator(=) predefined(mktime)operator(()integer(4)operator(,) integer(35)operator(,) integer(25)operator(,) integer(6)operator(,) integer(16)operator(,) integer(1981)operator(,) reserved(TRUE)operator(\))operator(;) -local_variable($nat) operator(=) predefined(mktime)operator(()integer(3)operator(,) integer(45)operator(,) integer(50)operator(,) integer(1)operator(,) integer(18)operator(,) integer(1973)operator(,) reserved(TRUE)operator(\))operator(;) +local_variable($bree) operator(=) predefined(mktime)operator(()integer(4)operator(,) integer(35)operator(,) integer(25)operator(,) integer(6)operator(,) integer(16)operator(,) integer(1981)operator(,) pre_constant(TRUE)operator(\))operator(;) +local_variable($nat) operator(=) predefined(mktime)operator(()integer(3)operator(,) integer(45)operator(,) integer(50)operator(,) integer(1)operator(,) integer(18)operator(,) integer(1973)operator(,) pre_constant(TRUE)operator(\))operator(;) local_variable($difference) operator(=) local_variable($bree) operator(-) local_variable($nat)operator(;) @@ -1193,7 +1193,7 @@ local_variable($weeknumber) operator(=) predefined(strftime)operator(()string<de comment(// Interpolate ...) local_variable($sep) operator(=) constant(SEP)operator(;) -predefined(echo) string<delimiter(")operator({)local_variable($month)operator(})operator({)local_variable($sep)operator(})operator({)local_variable($day)operator(})operator({)local_variable($sep)operator(})operator({)local_variable($year)operator(})content( was a )operator({)local_variable($date)operator([)string<delimiter(')content(weekday)delimiter(')>operator(])operator(})content( in week )operator({)local_variable($weeknumber)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")inline<delimiter({)local_variable($month)delimiter(})>inline<delimiter({)local_variable($sep)delimiter(})>inline<delimiter({)local_variable($day)delimiter(})>inline<delimiter({)local_variable($sep)delimiter(})>inline<delimiter({)local_variable($year)delimiter(})>content( was a )inline<delimiter({)local_variable($date)operator([)string<delimiter(')content(weekday)delimiter(')>operator(])delimiter(})>content( in week )inline<delimiter({)local_variable($weeknumber)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// ... or, concatenate) predefined(echo) local_variable($month) operator(.) constant(SEP) operator(.) local_variable($day) operator(.) constant(SEP) operator(.) local_variable($year) operator(.) string<delimiter(')content( was a )delimiter(')> operator(.) local_variable($date)operator([)string<delimiter(')content(weekday)delimiter(')>operator(]) @@ -1231,7 +1231,7 @@ operator({) operator(}) reserved(else) operator({) - predefined(echo) string<delimiter(")content(Date string parse not complete; failed components: )operator({)local_variable($darr)operator([)string<delimiter(')content(unparsed)delimiter(')>operator(])operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")content(Date string parse not complete; failed components: )inline<delimiter({)local_variable($darr)operator([)string<delimiter(')content(unparsed)delimiter(')>operator(])delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) operator(}) reserved(else) @@ -1264,22 +1264,22 @@ predefined(strftime)operator(()string<delimiter(')content(%Y/%m/%d)delimiter(')> comment(// ----------------------------) comment(// 'mktime' creates a local time timestamp) -local_variable($t) operator(=) predefined(strftime)operator(()string<delimiter(')content(%a %b %e %H:%M:%S %z %Y)delimiter(')>operator(,) predefined(mktime)operator(()integer(3)operator(,) integer(45)operator(,) integer(50)operator(,) integer(1)operator(,) integer(18)operator(,) integer(73)operator(,) reserved(TRUE)operator(\))operator(\))operator(;) -predefined(echo) string<delimiter(")operator({)local_variable($t)operator(})char(\\n)delimiter(")>operator(;) +local_variable($t) operator(=) predefined(strftime)operator(()string<delimiter(')content(%a %b %e %H:%M:%S %z %Y)delimiter(')>operator(,) predefined(mktime)operator(()integer(3)operator(,) integer(45)operator(,) integer(50)operator(,) integer(1)operator(,) integer(18)operator(,) integer(73)operator(,) pre_constant(TRUE)operator(\))operator(\))operator(;) +predefined(echo) string<delimiter(")inline<delimiter({)local_variable($t)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// 'gmmktime' creates a GMT time timestamp) local_variable($t) operator(=) predefined(strftime)operator(()string<delimiter(')content(%a %b %e %H:%M:%S %z %Y)delimiter(')>operator(,) predefined(gmmktime)operator(()integer(3)operator(,) integer(45)operator(,) integer(50)operator(,) integer(1)operator(,) integer(18)operator(,) integer(73)operator(\))operator(\))operator(;) -predefined(echo) string<delimiter(")operator({)local_variable($t)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")inline<delimiter({)local_variable($t)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// ----------------------------) comment(// 'strtotime' parses a textual date expression, and generates a timestamp ) local_variable($t) operator(=) predefined(strftime)operator(()string<delimiter(')content(%A %D)delimiter(')>operator(,) predefined(strtotime)operator(()string<delimiter(')content(18 Jan 1973, 3:45:50)delimiter(')>operator(\))operator(\))operator(;) -predefined(echo) string<delimiter(")operator({)local_variable($t)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")inline<delimiter({)local_variable($t)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// This should generate output identical to previous example) -local_variable($t) operator(=) predefined(strftime)operator(()string<delimiter(')content(%A %D)delimiter(')>operator(,) predefined(mktime)operator(()integer(3)operator(,) integer(45)operator(,) integer(50)operator(,) integer(1)operator(,) integer(18)operator(,) integer(73)operator(,) reserved(TRUE)operator(\))operator(\))operator(;) -predefined(echo) string<delimiter(")operator({)local_variable($t)operator(})char(\\n)delimiter(")>operator(;) +local_variable($t) operator(=) predefined(strftime)operator(()string<delimiter(')content(%A %D)delimiter(')>operator(,) predefined(mktime)operator(()integer(3)operator(,) integer(45)operator(,) integer(50)operator(,) integer(1)operator(,) integer(18)operator(,) integer(73)operator(,) pre_constant(TRUE)operator(\))operator(\))operator(;) +predefined(echo) string<delimiter(")inline<delimiter({)local_variable($t)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// @@PLEAC@@_3.9) comment(// PHP 5 and above can use the built-in, 'microtime'. Crude implementation for ealier versions:) @@ -1309,7 +1309,7 @@ operator({) predefined(sort)operator(()local_variable($arr)operator(\))operator(;) local_variable($elapsed) operator(=) predefined(microtime)operator(()operator(\)) operator(-) local_variable($begin)operator(;) - local_variable($total_time) operator(+)operator(=) local_variable($elapsed)operator(;) + local_variable($total_time) operator(+=) local_variable($elapsed)operator(;) operator(}) predefined(printf)operator(()string<delimiter(")content(On average, sorting %d random numbers takes %.5f seconds)char(\\n)delimiter(")>operator(,) constant(SIZE)operator(,) local_variable($total_time) operator(/) operator(()pre_type(float)operator(\)) constant(NUMBER_OF_TIMES)operator(\))operator(;) @@ -1366,7 +1366,7 @@ comment(// ------------) local_variable($name) operator(=) string<delimiter(')content(Gandalf)delimiter(')>operator(;) -local_variable($banner) operator(=) string<delimiter(")content(Speak )operator({)local_variable($name)operator(})content(, and enter!)delimiter(")>operator(;) +local_variable($banner) operator(=) string<delimiter(")content(Speak )inline<delimiter({)local_variable($name)delimiter(})>content(, and enter!)delimiter(")>operator(;) local_variable($banner) operator(=) string<delimiter(')content(Speak )delimiter(')> operator(.) predefined(escapeshellarg)operator(()local_variable($name)operator(\)) operator(.) string<delimiter(')content( and welcome!)delimiter(')>operator(;) @@ -1374,11 +1374,11 @@ comment(// ------------) local_variable($his_host) operator(=) string<delimiter(')content(www.perl.com)delimiter(')>operator(;) -local_variable($host_info) operator(=) error(`)ident(nslookup) local_variable($his_host)error(`)operator(;) +local_variable($host_info) operator(=) string<delimiter(`)content(nslookup )local_variable($his_host)delimiter(`)>operator(;) -local_variable($cmd) operator(=) string<delimiter(')content(ps )delimiter(')> operator(.) ident(posix_getpid)operator(()operator(\))operator(;) local_variable($perl_info) operator(=) error(`)local_variable($cmd)error(`)operator(;) +local_variable($cmd) operator(=) string<delimiter(')content(ps )delimiter(')> operator(.) ident(posix_getpid)operator(()operator(\))operator(;) local_variable($perl_info) operator(=) string<delimiter(`)local_variable($cmd)delimiter(`)>operator(;) -local_variable($shell_info) operator(=) error(`)ident(ps) error($)error($)error(`)operator(;) +local_variable($shell_info) operator(=) string<delimiter(`)content(ps )content($)content($)delimiter(`)>operator(;) comment(// ------------) @@ -1409,11 +1409,11 @@ reserved(function) ident(commify_series)operator(()local_variable($list)operator operator({) local_variable($n) operator(=) predefined(str_word_count)operator(()local_variable($list)operator(\))operator(;) local_variable($series) operator(=) predefined(str_word_count)operator(()local_variable($list)operator(,) integer(1)operator(\))operator(;) - reserved(if) operator(()local_variable($n) operator(==) integer(0)operator(\)) predefined(return) reserved(NULL)operator(;) - reserved(if) operator(()local_variable($n) operator(==) integer(1)operator(\)) predefined(return) local_variable($series)operator([)integer(0)operator(])operator(;) - reserved(if) operator(()local_variable($n) operator(==) integer(2)operator(\)) predefined(return) local_variable($series)operator([)integer(0)operator(]) operator(.) string<delimiter(')content( and )delimiter(')> operator(.) local_variable($series)operator([)integer(1)operator(])operator(;) + reserved(if) operator(()local_variable($n) operator(==) integer(0)operator(\)) reserved(return) pre_constant(NULL)operator(;) + reserved(if) operator(()local_variable($n) operator(==) integer(1)operator(\)) reserved(return) local_variable($series)operator([)integer(0)operator(])operator(;) + reserved(if) operator(()local_variable($n) operator(==) integer(2)operator(\)) reserved(return) local_variable($series)operator([)integer(0)operator(]) operator(.) string<delimiter(')content( and )delimiter(')> operator(.) local_variable($series)operator([)integer(1)operator(])operator(;) - predefined(return) predefined(join)operator(()string<delimiter(')content(, )delimiter(')>operator(,) predefined(array_slice)operator(()local_variable($series)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\)) operator(.) string<delimiter(')content(, and )delimiter(')> operator(.) local_variable($series)operator([)local_variable($n) operator(-) integer(1)operator(])operator(;) + reserved(return) predefined(join)operator(()string<delimiter(')content(, )delimiter(')>operator(,) predefined(array_slice)operator(()local_variable($series)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\)) operator(.) string<delimiter(')content(, and )delimiter(')> operator(.) local_variable($series)operator([)local_variable($n) operator(-) integer(1)operator(])operator(;) operator(}) comment(// ------------) @@ -1433,15 +1433,15 @@ operator({) reserved(foreach)operator(()local_variable($arr) reserved(as) local_variable($str)operator(\)) operator({) - reserved(if) operator(()predefined(strpos)operator(()local_variable($str)operator(,) string<delimiter(')content(,)delimiter(')>operator(\)) operator(===) reserved(false)operator(\)) reserved(continue)operator(;) + reserved(if) operator(()predefined(strpos)operator(()local_variable($str)operator(,) string<delimiter(')content(,)delimiter(')>operator(\)) operator(===) pre_constant(false)operator(\)) reserved(continue)operator(;) local_variable($sepchar) operator(=) string<delimiter(')content(;)delimiter(')>operator(;) reserved(break)operator(;) operator(}) - reserved(if) operator(()local_variable($n) operator(==) integer(0)operator(\)) predefined(return) reserved(NULL)operator(;) - reserved(if) operator(()local_variable($n) operator(==) integer(1)operator(\)) predefined(return) local_variable($arr)operator([)integer(0)operator(])operator(;) - reserved(if) operator(()local_variable($n) operator(==) integer(2)operator(\)) predefined(return) local_variable($arr)operator([)integer(0)operator(]) operator(.) string<delimiter(')content( and )delimiter(')> operator(.) local_variable($arr)operator([)integer(1)operator(])operator(;) + reserved(if) operator(()local_variable($n) operator(==) integer(0)operator(\)) reserved(return) pre_constant(NULL)operator(;) + reserved(if) operator(()local_variable($n) operator(==) integer(1)operator(\)) reserved(return) local_variable($arr)operator([)integer(0)operator(])operator(;) + reserved(if) operator(()local_variable($n) operator(==) integer(2)operator(\)) reserved(return) local_variable($arr)operator([)integer(0)operator(]) operator(.) string<delimiter(')content( and )delimiter(')> operator(.) local_variable($arr)operator([)integer(1)operator(])operator(;) - predefined(return) predefined(join)operator(()string<delimiter(")operator({)local_variable($sepchar)operator(})content( )delimiter(")>operator(,) predefined(array_slice)operator(()local_variable($arr)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\)) operator(.) string<delimiter(")operator({)local_variable($sepchar)operator(})content( and )delimiter(")> operator(.) local_variable($arr)operator([)local_variable($n) operator(-) integer(1)operator(])operator(;) + reserved(return) predefined(join)operator(()string<delimiter(")inline<delimiter({)local_variable($sepchar)delimiter(})>content( )delimiter(")>operator(,) predefined(array_slice)operator(()local_variable($arr)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\)) operator(.) string<delimiter(")inline<delimiter({)local_variable($sepchar)delimiter(})>content( and )delimiter(")> operator(.) local_variable($arr)operator([)local_variable($n) operator(-) integer(1)operator(])operator(;) operator(}) comment(// ------------) @@ -1514,14 +1514,14 @@ comment(// and then sort.) predefined(ksort)operator(()local_variable($env)operator(\))operator(;) reserved(foreach) operator(()local_variable($env) reserved(as) local_variable($key) operator(=>) local_variable($value)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($key)operator(})content(=)operator({)local_variable($value)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($key)delimiter(})>content(=)inline<delimiter({)local_variable($value)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// Literal translation of Perl example would be:) local_variable($keys) operator(=) predefined(array_keys)operator(()local_variable($_ENV)operator(\))operator(;) predefined(sort)operator(()local_variable($keys)operator(\))operator(;) reserved(foreach) operator(()local_variable($keys) reserved(as) local_variable($key)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($key)operator(})content(=)operator({)local_variable($_ENV)operator([)local_variable($key)operator(])operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($key)delimiter(})>content(=)inline<delimiter({)local_variable($_ENV)operator([)local_variable($key)operator(])delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// This assumes that MAX_QUOTA is a named constant.) @@ -1581,14 +1581,14 @@ local_variable($fruits) operator(=) predefined(array)operator(()string<delimiter reserved(foreach)operator(()local_variable($fruits) reserved(as) operator(&)local_variable($fruit)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($fruit)operator(})content( tastes good in a pie.)char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($fruit)delimiter(})>content( tastes good in a pie.)char(\\n)delimiter(")>operator(;) operator(}) local_variable($fruitlen) operator(=) predefined(count)operator(()local_variable($fruits)operator(\))operator(;) reserved(for)operator(()local_variable($i) operator(=) integer(0)operator(;) local_variable($i) operator(<) local_variable($fruitlen)operator(;) local_variable($i)operator(++)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($fruits)operator([)local_variable($i)operator(])operator(})content( tastes good in a pie.)char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($fruits)operator([)local_variable($i)operator(])delimiter(})>content( tastes good in a pie.)char(\\n)delimiter(")>operator(;) operator(}) comment(// ----------------------------) @@ -1601,13 +1601,13 @@ local_variable($namelist)operator([)string<delimiter(')content(felines)delimiter comment(// Take care to make '$cat' a reference via '&$' to allow updating) reserved(foreach)operator(()local_variable($namelist)operator([)string<delimiter(')content(felines)delimiter(')>operator(]) reserved(as) operator(&)local_variable($cat)operator(\)) operator({) - local_variable($cat) operator(.)operator(=) string<delimiter(')content( [meow])delimiter(')>operator(;) + local_variable($cat) operator(.=) string<delimiter(')content( [meow])delimiter(')>operator(;) operator(}) comment(// Via array reference) reserved(foreach)operator(()local_variable($namelist)operator([)string<delimiter(')content(felines)delimiter(')>operator(]) reserved(as) local_variable($cat)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($cat)operator(})content( purrs hypnotically.)char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($cat)delimiter(})>content( purrs hypnotically.)char(\\n)delimiter(")>operator(;) operator(}) predefined(echo) string<delimiter(")content(---)char(\\n)delimiter(")>operator(;) @@ -1615,7 +1615,7 @@ predefined(echo) string<delimiter(")content(---)char(\\n)delimiter(")>operator(; comment(// Original array) reserved(foreach)operator(()local_variable($rogue_cats) reserved(as) local_variable($cat)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($cat)operator(})content( purrs hypnotically.)char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($cat)delimiter(})>content( purrs hypnotically.)char(\\n)delimiter(")>operator(;) operator(}) comment(// @@PLEAC@@_4.6) @@ -1640,7 +1640,7 @@ reserved(foreach)operator(()local_variable($list) reserved(as) local_variable($i operator({) reserved(if) operator(()operator(!)predefined(isset)operator(()local_variable($seen)operator([)local_variable($item)operator(])operator(\))operator(\)) operator({) - local_variable($seen)operator([)local_variable($item)operator(]) operator(=) reserved(TRUE)operator(;) + local_variable($seen)operator([)local_variable($item)operator(]) operator(=) pre_constant(TRUE)operator(;) local_variable($unique)operator([)operator(]) operator(=) local_variable($item)operator(;) operator(}) operator(}) @@ -1649,7 +1649,7 @@ comment(// ------------) reserved(foreach)operator(()local_variable($list) reserved(as) local_variable($item)operator(\)) operator({) - local_variable($seen)operator([)local_variable($item)operator(]) operator(|)operator(|) operator(()operator(++)local_variable($seen)operator([)local_variable($item)operator(]) operator(&)operator(&) operator(()local_variable($unique)operator([)operator(]) operator(=) local_variable($item)operator(\))operator(\))operator(;) + local_variable($seen)operator([)local_variable($item)operator(]) operator(||) operator(()operator(++)local_variable($seen)operator([)local_variable($item)operator(]) operator(&&) operator(()local_variable($unique)operator([)operator(]) operator(=) local_variable($item)operator(\))operator(\))operator(;) operator(}) comment(// ------------) @@ -1661,12 +1661,12 @@ operator(}) reserved(foreach)operator(()local_variable($list) reserved(as) local_variable($item)operator(\)) operator({) - local_variable($seen)operator([)local_variable($item)operator(]) operator(|)operator(|) operator(()operator(++)local_variable($seen)operator([)local_variable($item)operator(]) operator(&)operator(&) ident(some_func)operator(()local_variable($item)operator(\))operator(\))operator(;) + local_variable($seen)operator([)local_variable($item)operator(]) operator(||) operator(()operator(++)local_variable($seen)operator([)local_variable($item)operator(]) operator(&&) ident(some_func)operator(()local_variable($item)operator(\))operator(\))operator(;) operator(}) comment(// ----------------------------) -reserved(foreach)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) error(`)ident(who)error(`)operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\)) reserved(as) local_variable($user_entry)operator(\)) +reserved(foreach)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) string<delimiter(`)content(who)delimiter(`)>operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\)) reserved(as) local_variable($user_entry)operator(\)) operator({) local_variable($user) operator(=) predefined(preg_split)operator(()string<delimiter(')content(/)content(\\s)content(/)delimiter(')>operator(,) local_variable($user_entry)operator(\))operator(;) local_variable($ucnt)operator([)local_variable($user)operator([)integer(0)operator(])operator(])operator(++)operator(;) @@ -1678,7 +1678,7 @@ predefined(echo) string<delimiter(")content(users logged in:)char(\\n)delimiter( reserved(foreach)operator(()local_variable($ucnt) reserved(as) local_variable($user) operator(=>) local_variable($cnt)operator(\)) operator({) - predefined(echo) string<delimiter(")char(\\t)operator({)local_variable($user)operator(})content( => )operator({)local_variable($cnt)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")char(\\t)inline<delimiter({)local_variable($user)delimiter(})>content( => )inline<delimiter({)local_variable($cnt)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// @@PLEAC@@_4.7) @@ -1807,14 +1807,14 @@ reserved(function) ident(popN)operator(()operator(&)local_variable($arr)operator operator({) local_variable($ret) operator(=) predefined(array_slice)operator(()local_variable($arr)operator(,) operator(-)operator(()local_variable($n)operator(\))operator(,) local_variable($n)operator(\))operator(;) local_variable($arr) operator(=) predefined(array_slice)operator(()local_variable($arr)operator(,) integer(0)operator(,) predefined(count)operator(()local_variable($arr)operator(\)) operator(-) local_variable($n)operator(\))operator(;) - predefined(return) local_variable($ret)operator(;) + reserved(return) local_variable($ret)operator(;) operator(}) reserved(function) ident(shiftN)operator(()operator(&)local_variable($arr)operator(,) local_variable($n)operator(\)) operator({) local_variable($ret) operator(=) predefined(array_slice)operator(()local_variable($arr)operator(,) integer(0)operator(,) local_variable($n)operator(\))operator(;) local_variable($arr) operator(=) predefined(array_slice)operator(()local_variable($arr)operator(,) local_variable($n)operator(\))operator(;) - predefined(return) local_variable($ret)operator(;) + reserved(return) local_variable($ret)operator(;) operator(}) comment(// ------------) @@ -1831,7 +1831,7 @@ local_variable($friends) operator(=) predefined(array)operator(()string<delimite predefined(list)operator(()local_variable($this_)operator(,) local_variable($that)operator(\)) operator(=) ident(shiftN)operator(()local_variable($friends)operator(,) integer(2)operator(\))operator(;) -predefined(echo) string<delimiter(")operator({)local_variable($this_)operator(})content( )operator({)local_variable($that)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")inline<delimiter({)local_variable($this_)delimiter(})>content( )inline<delimiter({)local_variable($that)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// ------------) @@ -1855,7 +1855,7 @@ comment(// means of terminating the search once a match has been found. It wou comment(// function were to have a third parameter, a Boolean flag indicating whether to traverse) comment(// the whole array, or quit after first match [next version, maybe :\) ?]) -local_variable($found) operator(=) reserved(FALSE)operator(;) +local_variable($found) operator(=) pre_constant(FALSE)operator(;) reserved(foreach)operator(()local_variable($array) reserved(as) local_variable($item)operator(\)) operator({) @@ -1864,7 +1864,7 @@ operator({) comment(// Found - save and leave) local_variable($match) operator(=) local_variable($item)operator(;) - local_variable($found) operator(=) reserved(TRUE)operator(;) + local_variable($found) operator(=) pre_constant(TRUE)operator(;) reserved(break)operator(;) operator(}) @@ -1881,8 +1881,8 @@ comment(// ------------) reserved(function) ident(predicate)operator(()local_variable($element)operator(\)) operator({) - reserved(if) operator(()ident(criterion)operator(\)) predefined(return) reserved(TRUE)operator(;) - predefined(return) reserved(FALSE)operator(;) + reserved(if) operator(()ident(criterion)operator(\)) reserved(return) pre_constant(TRUE)operator(;) + reserved(return) pre_constant(FALSE)operator(;) operator(}) local_variable($match) operator(=) predefined(array_slice)operator(()predefined(array_filter)operator(()local_variable($array)operator(,) string<delimiter(')content(predicate)delimiter(')>operator(\))operator(,) integer(0)operator(,) integer(1)operator(\))operator(;) @@ -1924,7 +1924,7 @@ comment(// ------------) reserved(function) ident(array_update)operator(()local_variable($arr)operator(,) local_variable($lambda)operator(,) local_variable($updarr)operator(\)) operator({) reserved(foreach)operator(()local_variable($arr) reserved(as) local_variable($key)operator(\)) local_variable($lambda)operator(()local_variable($updarr)operator(,) local_variable($key)operator(\))operator(;) - predefined(return) local_variable($updarr)operator(;) + reserved(return) local_variable($updarr)operator(;) operator(}) reserved(function) ident(highest_salaried_engineer)operator(()operator(&)local_variable($arr)operator(,) local_variable($employee)operator(\)) @@ -1956,8 +1956,8 @@ comment(// function) reserved(function) ident(predicate)operator(()local_variable($element)operator(\)) operator({) - reserved(if) operator(()ident(criterion)operator(\)) predefined(return) reserved(TRUE)operator(;) - predefined(return) reserved(FALSE)operator(;) + reserved(if) operator(()ident(criterion)operator(\)) reserved(return) pre_constant(TRUE)operator(;) + reserved(return) pre_constant(FALSE)operator(;) operator(}) local_variable($matching) operator(=) predefined(array_filter)operator(()local_variable($list)operator(,) string<delimiter(')content(predicate)delimiter(')>operator(\))operator(;) @@ -1972,15 +1972,15 @@ reserved(function) ident(is_pig)operator(()local_variable($user)operator(\)) operator({) local_variable($user_details) operator(=) predefined(preg_split)operator(()string<delimiter(')content(/()content(\\s)content(\)+/)delimiter(')>operator(,) local_variable($user)operator(\))operator(;) comment(// Assuming field 5 is the resource being compared) - predefined(return) local_variable($user_details)operator([)integer(5)operator(]) operator(>) integer(1)ident(e7)operator(;) + reserved(return) local_variable($user_details)operator([)integer(5)operator(]) operator(>) float(1e7)operator(;) operator(}) -local_variable($pigs) operator(=) predefined(array_filter)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) error(`)ident(who) operator(-)ident(u)error(`)operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(,) string<delimiter(')content(is_pig)delimiter(')>operator(\))operator(;) +local_variable($pigs) operator(=) predefined(array_filter)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) string<delimiter(`)content(who -u)delimiter(`)>operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(,) string<delimiter(')content(is_pig)delimiter(')>operator(\))operator(;) comment(// ------------) -local_variable($matching) operator(=) predefined(array_filter)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) error(`)ident(who)error(`)operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(,) - ident(create_function)operator(()string<delimiter(')content($user)delimiter(')>operator(,) string<delimiter(')content(return preg_match()content(\\')content(/^gnat /)content(\\')content(, $user\);)delimiter(')>operator(\))operator(\))operator(;) +local_variable($matching) operator(=) predefined(array_filter)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) string<delimiter(`)content(who)delimiter(`)>operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(,) + ident(create_function)operator(()string<delimiter(')content($user)delimiter(')>operator(,) string<delimiter(')content(return preg_match()char(\\')content(/^gnat /)char(\\')content(, $user\);)delimiter(')>operator(\))operator(\))operator(;) comment(// ------------) @@ -2037,8 +2037,8 @@ predefined(natsort)operator(()local_variable($unsorted)operator(\))operator(;) comment(// ------------) -reserved(function) ident(ascend)operator(()local_variable($left)operator(,) local_variable($right)operator(\)) operator({) predefined(return) local_variable($left) operator(>) local_variable($right)operator(;) operator(}) -reserved(function) ident(descend)operator(()local_variable($left)operator(,) local_variable($right)operator(\)) operator({) predefined(return) local_variable($left) operator(<) local_variable($right)operator(;) operator(}) +reserved(function) ident(ascend)operator(()local_variable($left)operator(,) local_variable($right)operator(\)) operator({) reserved(return) local_variable($left) operator(>) local_variable($right)operator(;) operator(}) +reserved(function) ident(descend)operator(()local_variable($left)operator(,) local_variable($right)operator(\)) operator({) reserved(return) local_variable($left) operator(<) local_variable($right)operator(;) operator(}) comment(// ------------) @@ -2053,7 +2053,7 @@ comment(// ----------------------------) reserved(function) ident(kill_process)operator(()local_variable($pid)operator(\)) operator({) comment(// Is 'killable' ?) - reserved(if) operator(()operator(!)ident(posix_kill)operator(()local_variable($pid)operator(,) integer(0)operator(\))operator(\)) predefined(return)operator(;) + reserved(if) operator(()operator(!)ident(posix_kill)operator(()local_variable($pid)operator(,) integer(0)operator(\))operator(\)) reserved(return)operator(;) comment(// Ok, so kill in two stages) ident(posix_kill)operator(()local_variable($pid)operator(,) integer(15)operator(\))operator(;) comment(// SIGTERM) @@ -2064,10 +2064,10 @@ operator(}) reserved(function) ident(pid)operator(()local_variable($pentry)operator(\)) operator({) local_variable($p) operator(=) predefined(preg_split)operator(()string<delimiter(')content(/)content(\\s)content(/)delimiter(')>operator(,) predefined(trim)operator(()local_variable($pentry)operator(\))operator(\))operator(;) - predefined(return) local_variable($p)operator([)integer(0)operator(])operator(;) + reserved(return) local_variable($p)operator([)integer(0)operator(])operator(;) operator(}) -local_variable($processes) operator(=) predefined(array_map)operator(()string<delimiter(')content(pid)delimiter(')>operator(,) predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) error(`)ident(ps) ident(ax)error(`)operator(\))operator(,) integer(1)operator(,) operator(-)integer(1)operator(\))operator(\))operator(;) +local_variable($processes) operator(=) predefined(array_map)operator(()string<delimiter(')content(pid)delimiter(')>operator(,) predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) string<delimiter(`)content(ps ax)delimiter(`)>operator(\))operator(,) integer(1)operator(,) operator(-)integer(1)operator(\))operator(\))operator(;) predefined(sort)operator(()local_variable($processes)operator(\))operator(;) predefined(echo) predefined(join)operator(()string<delimiter(')content( ,)delimiter(')>operator(,) local_variable($processes)operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) @@ -2130,7 +2130,7 @@ comment(// As above, except uses 'array_update' and 'accum' to help create hash) reserved(function) ident(array_update)operator(()local_variable($arr)operator(,) local_variable($lambda)operator(,) local_variable($updarr)operator(\)) operator({) reserved(foreach)operator(()local_variable($arr) reserved(as) local_variable($key)operator(\)) local_variable($lambda)operator(()local_variable($updarr)operator(,) local_variable($key)operator(\))operator(;) - predefined(return) local_variable($updarr)operator(;) + reserved(return) local_variable($updarr)operator(;) operator(}) reserved(function) ident(accum)operator(()operator(&)local_variable($arr)operator(,) local_variable($value)operator(\)) @@ -2196,13 +2196,13 @@ local_variable($bonus) operator(=) predefined(array)operator(()integer(12376) op reserved(foreach)operator(()local_variable($sorted_employees) reserved(as) local_variable($employee)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($employee)operator(->)ident(name)operator(})content( earns )content(\\$)operator({)local_variable($employee)operator(->)ident(salary)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($employee)operator(->)ident(name)delimiter(})>content( earns )content(\\$)inline<delimiter({)local_variable($employee)operator(->)ident(salary)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) reserved(foreach)operator(()local_variable($sorted_employees) reserved(as) local_variable($employee)operator(\)) operator({) reserved(if) operator(()operator(()local_variable($amount) operator(=) local_variable($bonus)operator([)local_variable($employee)operator(->)ident(ssn)operator(])operator(\))operator(\)) - predefined(echo) string<delimiter(")operator({)local_variable($employee)operator(->)ident(name)operator(})content( got a bonus of: )content(\\$)operator({)local_variable($amount)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($employee)operator(->)ident(name)delimiter(})>content( got a bonus of: )content(\\$)inline<delimiter({)local_variable($amount)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// ------------) @@ -2223,13 +2223,13 @@ reserved(function) ident(get_pw_entries)operator(()operator(\)) operator({) reserved(function) ident(normal_users_only)operator(()local_variable($e)operator(\)) operator({) - local_variable($entry) operator(=) predefined(split)operator(()string<delimiter(')content(:)delimiter(')>operator(,) local_variable($e)operator(\))operator(;) predefined(return) local_variable($entry)operator([)integer(2)operator(]) operator(>) integer(100) operator(&)operator(&) local_variable($entry)operator([)integer(2)operator(]) operator(<) integer(32768)operator(;) + local_variable($entry) operator(=) predefined(split)operator(()string<delimiter(')content(:)delimiter(')>operator(,) local_variable($e)operator(\))operator(;) reserved(return) local_variable($entry)operator([)integer(2)operator(]) operator(>) integer(100) operator(&&) local_variable($entry)operator([)integer(2)operator(]) operator(<) integer(32768)operator(;) operator(}) reserved(foreach)operator(()predefined(array_filter)operator(()predefined(file)operator(()string<delimiter(')content(/etc/passwd)delimiter(')>operator(\))operator(,) string<delimiter(')content(normal_users_only)delimiter(')>operator(\)) reserved(as) local_variable($entry)operator(\)) local_variable($users)operator([)operator(]) operator(=) predefined(split)operator(()string<delimiter(')content(:)delimiter(')>operator(,) predefined(trim)operator(()local_variable($entry)operator(\))operator(\))operator(;) - predefined(return) local_variable($users)operator(;) + reserved(return) local_variable($users)operator(;) operator(}) comment(// ------------) @@ -2237,7 +2237,7 @@ comment(// ------------) local_variable($users) operator(=) ident(get_pw_entries)operator(()operator(\))operator(;) predefined(usort)operator(()local_variable($users)operator(,) ident(create_function)operator(()string<delimiter(')content($left, $right)delimiter(')>operator(,) string<delimiter(')content(return $left[0] > $right[0];)delimiter(')>operator(\))operator(\))operator(;) -reserved(foreach)operator(()local_variable($users) reserved(as) local_variable($user)operator(\)) predefined(echo) string<delimiter(")operator({)local_variable($user)operator([)integer(0)operator(])operator(})char(\\n)delimiter(")>operator(;) +reserved(foreach)operator(()local_variable($users) reserved(as) local_variable($user)operator(\)) predefined(echo) string<delimiter(")inline<delimiter({)local_variable($user)operator([)integer(0)operator(])delimiter(})>char(\\n)delimiter(")>operator(;) comment(// ----------------------------) @@ -2258,7 +2258,7 @@ comment(// ----------------------------) reserved(function) ident(array_update)operator(()local_variable($arr)operator(,) local_variable($lambda)operator(,) local_variable($updarr)operator(\)) operator({) reserved(foreach)operator(()local_variable($arr) reserved(as) local_variable($key)operator(\)) local_variable($lambda)operator(()local_variable($updarr)operator(,) local_variable($key)operator(\))operator(;) - predefined(return) local_variable($updarr)operator(;) + reserved(return) local_variable($updarr)operator(;) operator(}) reserved(function) ident(accum)operator(()operator(&)local_variable($arr)operator(,) local_variable($value)operator(\)) @@ -2279,7 +2279,7 @@ comment(// ----------------------------) reserved(function) ident(array_update)operator(()local_variable($arr)operator(,) local_variable($lambda)operator(,) local_variable($updarr)operator(\)) operator({) reserved(foreach)operator(()local_variable($arr) reserved(as) local_variable($key)operator(\)) local_variable($lambda)operator(()local_variable($updarr)operator(,) local_variable($key)operator(\))operator(;) - predefined(return) local_variable($updarr)operator(;) + reserved(return) local_variable($updarr)operator(;) operator(}) reserved(function) ident(accum)operator(()operator(&)local_variable($arr)operator(,) local_variable($value)operator(\)) @@ -2306,17 +2306,17 @@ reserved(function) ident(grab_and_rotate)operator(()operator(&)local_variable($a operator({) local_variable($item) operator(=) local_variable($arr)operator([)integer(0)operator(])operator(;) predefined(array_push)operator(()local_variable($arr)operator(,) predefined(array_shift)operator(()local_variable($arr)operator(\))operator(\))operator(;) - predefined(return) local_variable($item)operator(;) + reserved(return) local_variable($item)operator(;) operator(}) comment(// ------------) local_variable($processes) operator(=) predefined(array)operator(()integer(1)operator(,) integer(2)operator(,) integer(3)operator(,) integer(4)operator(,) integer(5)operator(\))operator(;) -reserved(while) operator(()reserved(TRUE)operator(\)) +reserved(while) operator(()pre_constant(TRUE)operator(\)) operator({) local_variable($process) operator(=) ident(grab_and_rotate)operator(()local_variable($processes)operator(\))operator(;) - predefined(echo) string<delimiter(")content(Handling process )operator({)local_variable($process)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")content(Handling process )inline<delimiter({)local_variable($process)delimiter(})>char(\\n)delimiter(")>operator(;) predefined(sleep)operator(()integer(1)operator(\))operator(;) operator(}) @@ -2408,7 +2408,7 @@ local_variable($food_colour) operator(=) predefined(array)operator(()string<deli local_variable($food_colour)operator([)string<delimiter(')content(Raspberry)delimiter(')>operator(]) operator(=) string<delimiter(')content(pink)delimiter(')>operator(;) predefined(echo) string<delimiter(")content(Known foods:)char(\\n)delimiter(")>operator(;) -reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) predefined(echo) string<delimiter(")operator({)local_variable($food)operator(})char(\\n)delimiter(")>operator(;) +reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) predefined(echo) string<delimiter(")inline<delimiter({)local_variable($food)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// @@PLEAC@@_5.2) comment(// Returns TRUE on all existing entries with non-NULL values) @@ -2433,18 +2433,18 @@ local_variable($food_colour) operator(=) predefined(array)operator(()string<deli reserved(foreach)operator(()predefined(array)operator(()string<delimiter(')content(Banana)delimiter(')>operator(,) string<delimiter(')content(Martini)delimiter(')>operator(\)) reserved(as) local_variable($name)operator(\)) operator({) reserved(if) operator(()predefined(isset)operator(()local_variable($food_colour)operator([)local_variable($name)operator(])operator(\))operator(\)) - predefined(echo) string<delimiter(")operator({)local_variable($name)operator(})content( is a food.)char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($name)delimiter(})>content( is a food.)char(\\n)delimiter(")>operator(;) reserved(else) - predefined(echo) string<delimiter(")operator({)local_variable($name)operator(})content( is a drink.)char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($name)delimiter(})>content( is a drink.)char(\\n)delimiter(")>operator(;) operator(}) comment(// ----------------------------) -local_variable($age) operator(=) predefined(array)operator(()string<delimiter(')content(Toddler)delimiter(')> operator(=>) integer(3)operator(,) string<delimiter(')content(Unborn)delimiter(')> operator(=>) integer(0)operator(,) string<delimiter(')content(Phantasm)delimiter(')> operator(=>) reserved(NULL)operator(\))operator(;) +local_variable($age) operator(=) predefined(array)operator(()string<delimiter(')content(Toddler)delimiter(')> operator(=>) integer(3)operator(,) string<delimiter(')content(Unborn)delimiter(')> operator(=>) integer(0)operator(,) string<delimiter(')content(Phantasm)delimiter(')> operator(=>) pre_constant(NULL)operator(\))operator(;) reserved(foreach)operator(()predefined(array)operator(()string<delimiter(')content(Toddler)delimiter(')>operator(,) string<delimiter(')content(Unborn)delimiter(')>operator(,) string<delimiter(')content(Phantasm)delimiter(')>operator(,) string<delimiter(')content(Relic)delimiter(')>operator(\)) reserved(as) local_variable($thing)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($thing)operator(})content(:)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($thing)delimiter(})>content(:)delimiter(")>operator(;) reserved(if) operator(()predefined(array_key_exists)operator(()local_variable($thing)operator(,) local_variable($age)operator(\))operator(\)) predefined(echo) string<delimiter(')content( exists)delimiter(')>operator(;) reserved(if) operator(()predefined(isset)operator(()local_variable($age)operator([)local_variable($thing)operator(])operator(\))operator(\)) predefined(echo) string<delimiter(')content( non-NULL)delimiter(')>operator(;) reserved(if) operator(()local_variable($age)operator([)local_variable($thing)operator(])operator(\)) predefined(echo) string<delimiter(')content( TRUE)delimiter(')>operator(;) @@ -2470,7 +2470,7 @@ operator({) local_variable($foods) operator(=) predefined(array_keys)operator(()local_variable($food_colour)operator(\))operator(;) predefined(echo) string<delimiter(')content(Foods:)delimiter(')>operator(;) - reserved(foreach)operator(()local_variable($foods) reserved(as) local_variable($food)operator(\)) predefined(echo) string<delimiter(")content( )operator({)local_variable($food)operator(})delimiter(")>operator(;) + reserved(foreach)operator(()local_variable($foods) reserved(as) local_variable($food)operator(\)) predefined(echo) string<delimiter(")content( )inline<delimiter({)local_variable($food)delimiter(})>delimiter(")>operator(;) predefined(echo) string<delimiter(")char(\\n)content(Values:)char(\\n)delimiter(")>operator(;) reserved(foreach)operator(()local_variable($foods) reserved(as) local_variable($food)operator(\)) @@ -2478,7 +2478,7 @@ operator({) local_variable($colour) operator(=) local_variable($food_colour)operator([)local_variable($food)operator(])operator(;) reserved(if) operator(()predefined(isset)operator(()local_variable($colour)operator(\))operator(\)) - predefined(echo) string<delimiter(")content( )operator({)local_variable($colour)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")content( )inline<delimiter({)local_variable($colour)delimiter(})>char(\\n)delimiter(")>operator(;) reserved(else) predefined(echo) string<delimiter(")content( nullified or removed)char(\\n)delimiter(")>operator(;) operator(}) @@ -2492,7 +2492,7 @@ local_variable($food_colour) operator(=) predefined(array)operator(()string<deli predefined(echo) string<delimiter(")content(Initially:)char(\\n)delimiter(")>operator(;) ident(print_foods)operator(()operator(\))operator(;) comment(// Nullify an entry) -local_variable($food_colour)operator([)string<delimiter(')content(Banana)delimiter(')>operator(]) operator(=) reserved(NULL)operator(;) +local_variable($food_colour)operator([)string<delimiter(')content(Banana)delimiter(')>operator(]) operator(=) pre_constant(NULL)operator(;) predefined(echo) string<delimiter(")char(\\n)content(With 'Banana' nullified)char(\\n)delimiter(")>operator(;) ident(print_foods)operator(()operator(\))operator(;) @@ -2530,12 +2530,12 @@ local_variable($food_colour) operator(=) predefined(array)operator(()string<deli reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($food)operator(})content( is )operator({)local_variable($colour)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($food)delimiter(})>content( is )inline<delimiter({)local_variable($colour)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) reserved(foreach)operator(()predefined(array_keys)operator(()local_variable($food_colour)operator(\)) reserved(as) local_variable($food)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($food)operator(})content( is )operator({)local_variable($food_colour)operator([)local_variable($food)operator(])operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($food)delimiter(})>content( is )inline<delimiter({)local_variable($food_colour)operator([)local_variable($food)operator(])delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// ----------------------------) @@ -2549,7 +2549,7 @@ operator({) reserved(if) operator(()predefined(preg_match)operator(()string<delimiter(')content(/^From: (.*\)/)delimiter(')>operator(,) local_variable($line)operator(,) local_variable($matches)operator(\))operator(\)) operator({) reserved(if) operator(()predefined(isset)operator(()local_variable($from)operator([)local_variable($matches)operator([)integer(1)operator(])operator(])operator(\))operator(\)) - local_variable($from)operator([)local_variable($matches)operator([)integer(1)operator(])operator(]) operator(+)operator(=) integer(1)operator(;) + local_variable($from)operator([)local_variable($matches)operator([)integer(1)operator(])operator(]) operator(+=) integer(1)operator(;) reserved(else) local_variable($from)operator([)local_variable($matches)operator([)integer(1)operator(])operator(]) operator(=) integer(1)operator(;) operator(}) @@ -2560,7 +2560,7 @@ operator(}) reserved(if) operator(()predefined(isset)operator(()local_variable($from)operator(\))operator(\)) operator({) predefined(echo) string<delimiter(")content(Senders:)char(\\n)delimiter(")>operator(;) - reserved(foreach)operator(()local_variable($from) reserved(as) local_variable($sender) operator(=>) local_variable($count)operator(\)) predefined(echo) string<delimiter(")operator({)local_variable($sender)operator(})content( : )operator({)local_variable($count)operator(})char(\\n)delimiter(")>operator(;) + reserved(foreach)operator(()local_variable($from) reserved(as) local_variable($sender) operator(=>) local_variable($count)operator(\)) predefined(echo) string<delimiter(")inline<delimiter({)local_variable($sender)delimiter(})>content( : )inline<delimiter({)local_variable($count)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) reserved(else) operator({) @@ -2584,7 +2584,7 @@ comment(// ------------) comment(// Based on Perl example; non-recursive, so contained arrays not printed correctly) reserved(foreach)operator(()local_variable($hash) reserved(as) local_variable($key) operator(=>) local_variable($value)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($key)operator(})content( => )local_variable($value)char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($key)delimiter(})>content( => )local_variable($value)char(\\n)delimiter(")>operator(;) operator(}) comment(// ----------------------------) @@ -2599,7 +2599,7 @@ local_variable($keys) operator(=) predefined(array_keys)operator(()local_variabl reserved(foreach)operator(()local_variable($keys) reserved(as) local_variable($key)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($key)operator(})content( => )operator({)local_variable($hash)operator([)local_variable($key)operator(])operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($key)delimiter(})>content( => )inline<delimiter({)local_variable($hash)operator([)local_variable($key)operator(])delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// Sorted by values) @@ -2631,7 +2631,7 @@ operator({) local_variable($arr)operator([)local_variable($arg)operator(]) operator(=) string<delimiter(')delimiter(')>operator(;) operator(}) - predefined(return) local_variable($ret)operator(;) + reserved(return) local_variable($ret)operator(;) operator(}) comment(// ------------) @@ -2649,15 +2649,15 @@ comment(// array_push_associative($food_colour, array('Banana' => 'Yellow', 'App predefined(print_r)operator(()local_variable($food_colour)operator(\))operator(;) predefined(echo) string<delimiter(")char(\\n)content(In insertion order:)char(\\n)delimiter(")>operator(;) -reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) predefined(echo) string<delimiter(")content( )operator({)local_variable($food)operator(})content( => )operator({)local_variable($colour)operator(})char(\\n)delimiter(")>operator(;) +reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) predefined(echo) string<delimiter(")content( )inline<delimiter({)local_variable($food)delimiter(})>content( => )inline<delimiter({)local_variable($colour)delimiter(})>char(\\n)delimiter(")>operator(;) local_variable($foods) operator(=) predefined(array_keys)operator(()local_variable($food_colour)operator(\))operator(;) predefined(echo) string<delimiter(")char(\\n)content(Still in insertion order:)char(\\n)delimiter(")>operator(;) -reserved(foreach)operator(()local_variable($foods) reserved(as) local_variable($food)operator(\)) predefined(echo) string<delimiter(")content( )operator({)local_variable($food)operator(})content( => )operator({)local_variable($food_colour)operator([)local_variable($food)operator(])operator(})char(\\n)delimiter(")>operator(;) +reserved(foreach)operator(()local_variable($foods) reserved(as) local_variable($food)operator(\)) predefined(echo) string<delimiter(")content( )inline<delimiter({)local_variable($food)delimiter(})>content( => )inline<delimiter({)local_variable($food_colour)operator([)local_variable($food)operator(])delimiter(})>char(\\n)delimiter(")>operator(;) comment(// @@PLEAC@@_5.7) -reserved(foreach)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) error(`)ident(who)error(`)operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\)) reserved(as) local_variable($entry)operator(\)) +reserved(foreach)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()string<delimiter(')content(/)content(\\n)content(/)delimiter(')>operator(,) string<delimiter(`)content(who)delimiter(`)>operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\)) reserved(as) local_variable($entry)operator(\)) operator({) predefined(list)operator(()local_variable($user)operator(,) local_variable($tty)operator(\)) operator(=) predefined(preg_split)operator(()string<delimiter(')content(/)content(\\s)content(/)delimiter(')>operator(,) local_variable($entry)operator(\))operator(;) local_variable($ttys)operator([)local_variable($user)operator(])operator([)operator(]) operator(=) local_variable($tty)operator(;) @@ -2673,21 +2673,21 @@ comment(// ------------) reserved(foreach)operator(()local_variable($ttys) reserved(as) local_variable($user) operator(=>) local_variable($all_ttys)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($user)operator(})content(: )delimiter(")> operator(.) predefined(join)operator(()string<delimiter(')content( )delimiter(')>operator(,) local_variable($all_ttys)operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($user)delimiter(})>content(: )delimiter(")> operator(.) predefined(join)operator(()string<delimiter(')content( )delimiter(')>operator(,) local_variable($all_ttys)operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) operator(}) comment(// ------------) reserved(foreach)operator(()local_variable($ttys) reserved(as) local_variable($user) operator(=>) local_variable($all_ttys)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($user)operator(})content(: )delimiter(")> operator(.) predefined(join)operator(()string<delimiter(')content( )delimiter(')>operator(,) local_variable($all_ttys)operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($user)delimiter(})>content(: )delimiter(")> operator(.) predefined(join)operator(()string<delimiter(')content( )delimiter(')>operator(,) local_variable($all_ttys)operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) reserved(foreach)operator(()local_variable($all_ttys) reserved(as) local_variable($tty)operator(\)) operator({) local_variable($stat) operator(=) predefined(stat)operator(()string<delimiter(')content(/dev/$tty)delimiter(')>operator(\))operator(;) local_variable($pwent) operator(=) ident(posix_getpwuid)operator(()local_variable($stat)operator([)string<delimiter(')content(uid)delimiter(')>operator(])operator(\))operator(;) local_variable($user) operator(=) predefined(isset)operator(()local_variable($pwent)operator([)string<delimiter(')content(name)delimiter(')>operator(])operator(\)) operator(?) local_variable($pwent)operator([)string<delimiter(')content(name)delimiter(')>operator(]) operator(:) string<delimiter(')content(Not available)delimiter(')>operator(;) - predefined(echo) string<delimiter(")operator({)local_variable($tty)operator(})content( owned by: )operator({)local_variable($user)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($tty)delimiter(})>content( owned by: )inline<delimiter({)local_variable($user)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) operator(}) @@ -2702,11 +2702,11 @@ comment(// ----------------------------) local_variable($surname) operator(=) predefined(array)operator(()string<delimiter(')content(Babe)delimiter(')> operator(=>) string<delimiter(')content(Ruth)delimiter(')>operator(,) string<delimiter(')content(Mickey)delimiter(')> operator(=>) string<delimiter(')content(Mantle)delimiter(')>operator(\))operator(;) local_variable($first_name) operator(=) predefined(array_flip)operator(()local_variable($surname)operator(\))operator(;) -predefined(echo) string<delimiter(")operator({)local_variable($first_name)operator([)string<delimiter(')content(Mantle)delimiter(')>operator(])operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")inline<delimiter({)local_variable($first_name)operator([)string<delimiter(')content(Mantle)delimiter(')>operator(])delimiter(})>char(\\n)delimiter(")>operator(;) comment(// ----------------------------) -local_variable($argc) operator(==) integer(2) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(usage: )operator({)local_variable($argv)operator([)integer(0)operator(])operator(})content( food|colour)char(\\n)delimiter(")>operator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()string<delimiter(")content(usage: )inline<delimiter({)local_variable($argv)operator([)integer(0)operator(])delimiter(})>content( food|colour)char(\\n)delimiter(")>operator(\))operator(;) local_variable($given) operator(=) local_variable($argv)operator([)integer(1)operator(])operator(;) @@ -2716,10 +2716,10 @@ local_variable($colour) operator(=) predefined(array)operator(()string<delimiter local_variable($food) operator(=) predefined(array_flip)operator(()local_variable($colour)operator(\))operator(;) reserved(if) operator(()predefined(isset)operator(()local_variable($colour)operator([)local_variable($given)operator(])operator(\))operator(\)) - predefined(echo) string<delimiter(")operator({)local_variable($given)operator(})content( is a food with colour: )operator({)local_variable($colour)operator([)local_variable($given)operator(])operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($given)delimiter(})>content( is a food with colour: )inline<delimiter({)local_variable($colour)operator([)local_variable($given)operator(])delimiter(})>char(\\n)delimiter(")>operator(;) reserved(if) operator(()predefined(isset)operator(()local_variable($food)operator([)local_variable($given)operator(])operator(\))operator(\)) - predefined(echo) string<delimiter(")operator({)local_variable($food)operator([)local_variable($given)operator(])operator(})content( is a food with colour: )operator({)local_variable($given)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($food)operator([)local_variable($given)operator(])delimiter(})>content( is a food with colour: )inline<delimiter({)local_variable($given)delimiter(})>char(\\n)delimiter(")>operator(;) comment(// ----------------------------) @@ -2732,7 +2732,7 @@ operator({) operator(}) local_variable($colour) operator(=) string<delimiter(')content(yellow)delimiter(')>operator(;) -predefined(echo) string<delimiter(")content(foods with colour )operator({)local_variable($colour)operator(})content( were: )delimiter(")> operator(.) predefined(join)operator(()string<delimiter(')content( )delimiter(')>operator(,) local_variable($foods_with_colour)operator([)local_variable($colour)operator(])operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")content(foods with colour )inline<delimiter({)local_variable($colour)delimiter(})>content( were: )delimiter(")> operator(.) predefined(join)operator(()string<delimiter(')content( )delimiter(')>operator(,) local_variable($foods_with_colour)operator([)local_variable($colour)operator(])operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) comment(// @@PLEAC@@_5.9) comment(// PHP implements a swag of sorting functions, most designed to work with numerically-indexed) @@ -2750,7 +2750,7 @@ comment(// Comparator-based sort) reserved(function) ident(comparator)operator(()local_variable($left)operator(,) local_variable($right)operator(\)) operator({) comment(// Compare left key with right key) - predefined(return) local_variable($left) operator(>) local_variable($right)operator(;) + reserved(return) local_variable($left) operator(>) local_variable($right)operator(;) operator(}) predefined(uksort)operator(()local_variable($hash)operator(,) string<delimiter(')content(comparator)delimiter(')>operator(\))operator(;) @@ -2766,7 +2766,7 @@ predefined(ksort)operator(()local_variable($food_colour)operator(\))operator(;) reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($food)operator(})content( is )operator({)local_variable($colour)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($food)delimiter(})>content( is )inline<delimiter({)local_variable($colour)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// ------------) @@ -2775,7 +2775,7 @@ predefined(uksort)operator(()local_variable($food_colour)operator(,) ident(creat reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($food)operator(})content( is )operator({)local_variable($colour)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($food)delimiter(})>content( is )inline<delimiter({)local_variable($colour)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// @@PLEAC@@_5.10) @@ -2824,7 +2824,7 @@ operator({) operator({) reserved(if) operator(()predefined(array_key_exists)operator(()local_variable($substance)operator(,) local_variable($substance_colour)operator(\))operator(\)) operator({) - predefined(echo) string<delimiter(")content(Warning )operator({)local_variable($substance_colour)operator([)local_variable($substance)operator(])operator(})content( seen twice. Using first definition.)char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")content(Warning )inline<delimiter({)local_variable($substance_colour)operator([)local_variable($substance)operator(])delimiter(})>content( seen twice. Using first definition.)char(\\n)delimiter(")>operator(;) reserved(continue)operator(;) operator(}) local_variable($substance_colour)operator([)local_variable($substance)operator(]) operator(=) local_variable($colour)operator(;) @@ -2910,7 +2910,7 @@ comment(// three elements) local_variable($hash) operator(=) predefined(array)operator(()string<delimiter(')content(Apple)delimiter(')> operator(=>) string<delimiter(')content(red)delimiter(')>operator(,) string<delimiter(')content(Lemon)delimiter(')> operator(=>) string<delimiter(')content(yellow)delimiter(')>operator(,) string<delimiter(')content(Carrot)delimiter(')> operator(=>) string<delimiter(')content(orange)delimiter(')>operator(\))operator(;) comment(// @@PLEAC@@_5.14) -reserved(foreach)operator(()local_variable($array) reserved(as) local_variable($element)operator(\)) local_variable($count)operator([)local_variable($element)operator(]) operator(+)operator(=) integer(1)operator(;) +reserved(foreach)operator(()local_variable($array) reserved(as) local_variable($element)operator(\)) local_variable($count)operator([)local_variable($element)operator(]) operator(+=) integer(1)operator(;) comment(// @@PLEAC@@_5.15) local_variable($father) operator(=) predefined(array)operator(()string<delimiter(')content(Cain)delimiter(')> operator(=>) string<delimiter(')content(Adam)delimiter(')>operator(,) string<delimiter(')content(Abel)delimiter(')> operator(=>) string<delimiter(')content(Adam)delimiter(')>operator(,) string<delimiter(')content(Seth)delimiter(')> operator(=>) string<delimiter(')content(Adam)delimiter(')>operator(,) string<delimiter(')content(Enoch)delimiter(')> operator(=>) string<delimiter(')content(Cain)delimiter(')>operator(,) @@ -2924,7 +2924,7 @@ local_variable($name) operator(=) predefined(trim)operator(()predefined(fgets)op reserved(while) operator(()operator(!)predefined(feof)operator(()constant(STDIN)operator(\))operator(\)) operator({) - reserved(while) operator(()reserved(TRUE)operator(\)) + reserved(while) operator(()pre_constant(TRUE)operator(\)) operator({) predefined(echo) string<delimiter(")local_variable($name)char(\\n)delimiter(")>operator(;) @@ -2953,7 +2953,7 @@ operator({) reserved(if) operator(()operator(!)local_variable($children)operator([)local_variable($parent)operator(])operator(\)) local_variable($children)operator([)local_variable($parent)operator(]) operator(=) local_variable($child)operator(;) reserved(else) - local_variable($children)operator([)local_variable($parent)operator(]) operator(.)operator(=) constant(SEP) operator(.) local_variable($child)operator(;) + local_variable($children)operator([)local_variable($parent)operator(]) operator(.=) constant(SEP) operator(.) local_variable($child)operator(;) operator(}) local_variable($name) operator(=) predefined(trim)operator(()predefined(fgets)operator(()constant(STDIN)operator(\))operator(\))operator(;) @@ -2978,8 +2978,8 @@ local_variable($files) operator(=) predefined(array)operator(()string<delimiter( reserved(foreach)operator(()local_variable($files) reserved(as) local_variable($file)operator(\)) operator({) - reserved(if) operator(()operator(!)predefined(is_file)operator(()local_variable($file)operator(\))operator(\)) operator({) predefined(echo) string<delimiter(")content(Skipping )operator({)local_variable($file)operator(})char(\\n)delimiter(")>operator(;) reserved(continue)operator(;) operator(}) - reserved(if) operator(()operator(!)operator(()local_variable($fh) operator(=) predefined(fopen)operator(()local_variable($file)operator(,) string<delimiter(')content(r)delimiter(')>operator(\))operator(\))operator(\)) operator({) predefined(echo) string<delimiter(")content(Skipping )operator({)local_variable($file)operator(})char(\\n)delimiter(")>operator(;) reserved(continue)operator(;) operator(}) + reserved(if) operator(()operator(!)predefined(is_file)operator(()local_variable($file)operator(\))operator(\)) operator({) predefined(echo) string<delimiter(")content(Skipping )inline<delimiter({)local_variable($file)delimiter(})>char(\\n)delimiter(")>operator(;) reserved(continue)operator(;) operator(}) + reserved(if) operator(()operator(!)operator(()local_variable($fh) operator(=) predefined(fopen)operator(()local_variable($file)operator(,) string<delimiter(')content(r)delimiter(')>operator(\))operator(\))operator(\)) operator({) predefined(echo) string<delimiter(")content(Skipping )inline<delimiter({)local_variable($file)delimiter(})>char(\\n)delimiter(")>operator(;) reserved(continue)operator(;) operator(}) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($fh)operator(\))operator(;) @@ -2988,7 +2988,7 @@ operator({) reserved(if) operator(()predefined(preg_match)operator(()string<delimiter(')content(/^)content(\\s)content(*#)content(\\s)content(*include)content(\\s)content(*<([^>]+\)>/)delimiter(')>operator(,) local_variable($line)operator(,) local_variable($matches)operator(\))operator(\)) operator({) reserved(if) operator(()predefined(isset)operator(()local_variable($includes)operator([)local_variable($matches)operator([)integer(1)operator(])operator(])operator(\))operator(\)) - local_variable($includes)operator([)local_variable($matches)operator([)integer(1)operator(])operator(]) operator(.)operator(=) constant(SEP) operator(.) local_variable($file)operator(;) + local_variable($includes)operator([)local_variable($matches)operator([)integer(1)operator(])operator(]) operator(.=) constant(SEP) operator(.) local_variable($file)operator(;) reserved(else) local_variable($includes)operator([)local_variable($matches)operator([)integer(1)operator(])operator(]) operator(=) local_variable($file)operator(;) operator(}) @@ -3024,19 +3024,19 @@ comment(// function that searches for a newline could be implemented. Not exactl comment(// foolproof, but very simple, low overhead, no installation headaches ...) reserved(function) ident(containsText)operator(()local_variable($file)operator(\)) operator({) - local_variable($status) operator(=) reserved(FALSE)operator(;) + local_variable($status) operator(=) pre_constant(FALSE)operator(;) reserved(if) operator(()operator(()local_variable($fp) operator(=) predefined(fopen)operator(()local_variable($file)operator(,) string<delimiter(')content(r)delimiter(')>operator(\))operator(\))operator(\)) operator({) - reserved(while) operator(()reserved(FALSE) operator(!==) operator(()local_variable($char) operator(=) predefined(fgetc)operator(()local_variable($fp)operator(\))operator(\))operator(\)) + reserved(while) operator(()pre_constant(FALSE) operator(!==) operator(()local_variable($char) operator(=) predefined(fgetc)operator(()local_variable($fp)operator(\))operator(\))operator(\)) operator({) - reserved(if) operator(()local_variable($char) operator(==) string<delimiter(")char(\\n)delimiter(")>operator(\)) operator({) local_variable($status) operator(=) reserved(TRUE)operator(;) reserved(break)operator(;) operator(}) + reserved(if) operator(()local_variable($char) operator(==) string<delimiter(")char(\\n)delimiter(")>operator(\)) operator({) local_variable($status) operator(=) pre_constant(TRUE)operator(;) reserved(break)operator(;) operator(}) operator(}) predefined(fclose)operator(()local_variable($fp)operator(\))operator(;) operator(}) - predefined(return) local_variable($status)operator(;) + reserved(return) local_variable($status)operator(;) operator(}) comment(// PHP offers the [currently experimental] Fileinfo group of functions to) @@ -3049,28 +3049,28 @@ operator({) local_variable($finfo) operator(=) ident(finfo_open)operator(()constant(FILEINFO_NONE)operator(\))operator(;) local_variable($status) operator(=) operator(()ident(finfo_file)operator(()local_variable($finfo)operator(,) local_variable($file)operator(\)) operator(==) string<delimiter(')content(ASCII text)delimiter(')>operator(\))operator(;) ident(finfo_close)operator(()local_variable($finfo)operator(\))operator(;) - predefined(return) local_variable($status)operator(;) + reserved(return) local_variable($status)operator(;) operator(}) comment(// Alternatively, use the *NIX utility, 'file', directly) reserved(function) ident(isTextFile)operator(()local_variable($file)operator(\)) operator({) - predefined(return) predefined(exec)operator(()predefined(trim)operator(()string<delimiter(')content(file -bN )delimiter(')> operator(.) predefined(escapeshellarg)operator(()local_variable($file)operator(\))operator(\))operator(\)) operator(==) string<delimiter(')content(ASCII text)delimiter(')>operator(;) + reserved(return) predefined(exec)operator(()predefined(trim)operator(()string<delimiter(')content(file -bN )delimiter(')> operator(.) predefined(escapeshellarg)operator(()local_variable($file)operator(\))operator(\))operator(\)) operator(==) string<delimiter(')content(ASCII text)delimiter(')>operator(;) operator(}) comment(// ----) -ident(containsText)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(File )operator({)local_variable($argv)operator([)integer(1)operator(])operator(})content( doesn't have any text in it)char(\\n)delimiter(")>operator(\))operator(;) +ident(containsText)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(File )inline<delimiter({)local_variable($argv)operator([)integer(1)operator(])delimiter(})>content( doesn't have any text in it)char(\\n)delimiter(")>operator(\))operator(;) -ident(isTextFile)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(File )operator({)local_variable($argv)operator([)integer(1)operator(])operator(})content( doesn't have any text in it)char(\\n)delimiter(")>operator(\))operator(;) +ident(isTextFile)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(File )inline<delimiter({)local_variable($argv)operator([)integer(1)operator(])delimiter(})>content( doesn't have any text in it)char(\\n)delimiter(")>operator(\))operator(;) comment(// ----------------------------) local_variable($dirname) operator(=) string<delimiter(')content(/usr/bin/)delimiter(')>operator(;) -operator(()local_variable($dirhdl) operator(=) predefined(opendir)operator(()local_variable($dirname)operator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Couldn't open )operator({)local_variable($dirname)operator(})char(\\n)delimiter(")>operator(\))operator(;) +operator(()local_variable($dirhdl) operator(=) predefined(opendir)operator(()local_variable($dirname)operator(\))operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Couldn't open )inline<delimiter({)local_variable($dirname)delimiter(})>char(\\n)delimiter(")>operator(\))operator(;) -reserved(while) operator(()operator(()local_variable($file) operator(=) predefined(readdir)operator(()local_variable($dirhdl)operator(\))operator(\)) operator(!==) reserved(FALSE)operator(\)) +reserved(while) operator(()operator(()local_variable($file) operator(=) predefined(readdir)operator(()local_variable($dirhdl)operator(\))operator(\)) operator(!==) pre_constant(FALSE)operator(\)) operator({) predefined(printf)operator(()string<delimiter(")content(Inside %s is something called: %s)char(\\n)delimiter(")>operator(,) local_variable($dirname)operator(,) local_variable($file)operator(\))operator(;) operator(}) @@ -3113,8 +3113,8 @@ comment(// directly with Epoch Seconds [i.e. the *NIX time stamp value] will wor predefined(define)operator(()string<delimiter(')content(SECONDS_PER_DAY)delimiter(')>operator(,) integer(60) operator(*) integer(60) operator(*) integer(24)operator(\))operator(;) comment(// Set file's access and modification times to 1 week ago) -local_variable($atime) operator(-)operator(=) integer(7) operator(*) constant(SECONDS_PER_DAY)operator(;) -local_variable($mtime) operator(-)operator(=) integer(7) operator(*) constant(SECONDS_PER_DAY)operator(;) +local_variable($atime) operator(-=) integer(7) operator(*) constant(SECONDS_PER_DAY)operator(;) +local_variable($mtime) operator(-=) integer(7) operator(*) constant(SECONDS_PER_DAY)operator(;) comment(// ... but care must be taken to account for daylight saving. Therefore, the) comment(// recommended approach is to use library functions to perform such tasks:) @@ -3131,7 +3131,7 @@ predefined(clearstatcache)operator(()operator(\))operator(;) comment(// ----------------------------) -local_variable($argc) operator(==) integer(2) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(usage: )operator({)local_variable($argv)operator([)integer(0)operator(])operator(})content( filename)char(\\n)delimiter(")>operator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()string<delimiter(")content(usage: )inline<delimiter({)local_variable($argv)operator([)integer(0)operator(])delimiter(})>content( filename)char(\\n)delimiter(")>operator(\))operator(;) local_variable($filename) operator(=) local_variable($argv)operator([)integer(1)operator(])operator(;) local_variable($fs) operator(=) predefined(stat)operator(()local_variable($filename)operator(\))operator(;) @@ -3143,7 +3143,7 @@ comment(// Careful here: since interactive, use, 'system', not 'exec', to launch comment(// does not work under *NIX - at least, not for me :\)]) predefined(system)operator(()predefined(trim)operator(()predefined(getenv)operator(()string<delimiter(')content(EDITOR)delimiter(')>operator(\)) operator(.) string<delimiter(')content( vi )delimiter(')> operator(.) predefined(escapeshellarg)operator(()local_variable($filename)operator(\))operator(\))operator(,) local_variable($retcode)operator(\))operator(;) -predefined(touch)operator(()local_variable($filename)operator(,) local_variable($mtime)operator(,) local_variable($atime)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Error updating timestamp on file, )operator({)local_variable($filename)operator(})content(!)char(\\n)delimiter(")>operator(\))operator(;) +predefined(touch)operator(()local_variable($filename)operator(,) local_variable($mtime)operator(,) local_variable($atime)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Error updating timestamp on file, )inline<delimiter({)local_variable($filename)delimiter(})>content(!)char(\\n)delimiter(")>operator(\))operator(;) comment(// @@PLEAC@@_9.2) comment(// The 'unlink' function is used to delete regular files, whilst the 'rmdir' function) @@ -3152,15 +3152,15 @@ comment(// exists, and must be manually programmed) local_variable($filename) operator(=) string<delimiter(')content(...)delimiter(')>operator(;) -operator(@)predefined(unlink)operator(()local_variable($filename)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Can't delete, )operator({)local_variable($filename)operator(})content(!)char(\\n)delimiter(")>operator(\))operator(;) +operator(@)predefined(unlink)operator(()local_variable($filename)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Can't delete, )inline<delimiter({)local_variable($filename)delimiter(})>content(!)char(\\n)delimiter(")>operator(\))operator(;) comment(// ------------) local_variable($files) operator(=) predefined(glob)operator(()string<delimiter(')content(...)delimiter(')>operator(\))operator(;) -local_variable($problem) operator(=) reserved(FALSE)operator(;) +local_variable($problem) operator(=) pre_constant(FALSE)operator(;) comment(// Could simply use a foreach loop) -reserved(foreach)operator(()local_variable($files) reserved(as) local_variable($filename)operator(\)) operator({) operator(@)predefined(unlink)operator(()local_variable($filename)operator(\)) operator(|)operator(|) local_variable($problem) operator(=) reserved(TRUE)operator(;) operator(}) +reserved(foreach)operator(()local_variable($files) reserved(as) local_variable($filename)operator(\)) operator({) operator(@)predefined(unlink)operator(()local_variable($filename)operator(\)) operator(||) local_variable($problem) operator(=) pre_constant(TRUE)operator(;) operator(}) comment(//) comment(// Alternatively, an applicative approach could be used, one closer in spirit to) @@ -3183,9 +3183,9 @@ reserved(function) ident(rmAll)operator(()local_variable($files)operator(\)) operator({) local_variable($count) operator(=) integer(0)operator(;) - reserved(foreach)operator(()local_variable($files) reserved(as) local_variable($filename)operator(\)) operator({) operator(@)predefined(unlink)operator(()local_variable($filename)operator(\)) operator(&)operator(&) local_variable($count)operator(++)operator(;) operator(})operator(;) + reserved(foreach)operator(()local_variable($files) reserved(as) local_variable($filename)operator(\)) operator({) operator(@)predefined(unlink)operator(()local_variable($filename)operator(\)) operator(&&) local_variable($count)operator(++)operator(;) operator(})operator(;) - predefined(return) local_variable($count)operator(;) + reserved(return) local_variable($count)operator(;) comment(// An applicative alternative using 'create_function', PHP's rough equivalent of 'lambda' ...) comment(//) @@ -3199,12 +3199,12 @@ local_variable($files) operator(=) predefined(glob)operator(()string<delimiter(' local_variable($toBeDeleted) operator(=) predefined(sizeof)operator(()local_variable($files)operator(\))operator(;) local_variable($count) operator(=) ident(rmAll)operator(()local_variable($files)operator(\))operator(;) -operator(()local_variable($count) operator(==) local_variable($toBeDeleted)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Could only delete )operator({)local_variable($count)operator(})content( of )operator({)local_variable($toBeDeleted)operator(})content( files)char(\\n)delimiter(")>operator(\))operator(;) +operator(()local_variable($count) operator(==) local_variable($toBeDeleted)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Could only delete )inline<delimiter({)local_variable($count)delimiter(})>content( of )inline<delimiter({)local_variable($toBeDeleted)delimiter(})>content( files)char(\\n)delimiter(")>operator(\))operator(;) comment(// @@PLEAC@@_9.3) local_variable($oldfile) operator(=) string<delimiter(')content(/tmp/old)delimiter(')>operator(;) local_variable($newfile) operator(=) string<delimiter(')content(/tmp/new)delimiter(')>operator(;) -predefined(copy)operator(()local_variable($oldfile)operator(,) local_variable($newfile)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Error copying file)char(\\n)delimiter(")>operator(\))operator(;) +predefined(copy)operator(()local_variable($oldfile)operator(,) local_variable($newfile)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Error copying file)char(\\n)delimiter(")>operator(\))operator(;) comment(// ----------------------------) @@ -3216,7 +3216,7 @@ local_variable($oldfile) operator(=) string<delimiter(')content(/tmp/old)delimit reserved(if) operator(()predefined(is_file)operator(()local_variable($oldfile)operator(\))operator(\)) predefined(file_put_contents)operator(()local_variable($newfile)operator(,) predefined(file_get_contents)operator(()local_variable($oldfile)operator(\))operator(\))operator(;) reserved(else) - predefined(die)operator(()string<delimiter(")content(Problem copying file )operator({)local_variable($oldfile)operator(})content( to file )operator({)local_variable($newfile)operator(})char(\\n)delimiter(")>operator(\))operator(;) + predefined(die)operator(()string<delimiter(")content(Problem copying file )inline<delimiter({)local_variable($oldfile)delimiter(})>content( to file )inline<delimiter({)local_variable($newfile)delimiter(})>char(\\n)delimiter(")>operator(\))operator(;) comment(// ------------) @@ -3231,12 +3231,12 @@ comment(// ------------) comment(// As above, but with some error checking / handling) local_variable($oldfile) operator(=) string<delimiter(')content(/tmp/old)delimiter(')>operator(;) local_variable($newfile) operator(=) string<delimiter(')content(/tmp/new)delimiter(')>operator(;) -operator(()local_variable($oh) operator(=) predefined(fopen)operator(()local_variable($oldfile)operator(,) string<delimiter(')content(rb)delimiter(')>operator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Problem opening input file )operator({)local_variable($oldfile)operator(})char(\\n)delimiter(")>operator(\))operator(;) -operator(()local_variable($nh) operator(=) predefined(fopen)operator(()local_variable($newfile)operator(,) string<delimiter(')content(wb)delimiter(')>operator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Problem opening output file )operator({)local_variable($newfile)operator(})char(\\n)delimiter(")>operator(\))operator(;) +operator(()local_variable($oh) operator(=) predefined(fopen)operator(()local_variable($oldfile)operator(,) string<delimiter(')content(rb)delimiter(')>operator(\))operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Problem opening input file )inline<delimiter({)local_variable($oldfile)delimiter(})>char(\\n)delimiter(")>operator(\))operator(;) +operator(()local_variable($nh) operator(=) predefined(fopen)operator(()local_variable($newfile)operator(,) string<delimiter(')content(wb)delimiter(')>operator(\))operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Problem opening output file )inline<delimiter({)local_variable($newfile)delimiter(})>char(\\n)delimiter(")>operator(\))operator(;) reserved(if) operator(()operator(()local_variable($filesize) operator(=) predefined(filesize)operator(()local_variable($oldfile)operator(\))operator(\)) operator(>) integer(0)operator(\)) operator({) - predefined(fwrite)operator(()local_variable($nh)operator(,) predefined(fread)operator(()local_variable($oh)operator(,) local_variable($filesize)operator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Problem reading / writing file data)char(\\n)delimiter(")>operator(\))operator(;) + predefined(fwrite)operator(()local_variable($nh)operator(,) predefined(fread)operator(()local_variable($oh)operator(,) local_variable($filesize)operator(\))operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Problem reading / writing file data)char(\\n)delimiter(")>operator(\))operator(;) operator(}) predefined(fclose)operator(()local_variable($oh)operator(\))operator(;) @@ -3251,11 +3251,11 @@ comment(// *NIX-specific example. Could check whether, 'exec', succeeded, but ch comment(// a file exists after the operation might be a better approach) local_variable($oldfile) operator(=) string<delimiter(')content(/tmp/old)delimiter(')>operator(;) local_variable($newfile) operator(=) string<delimiter(')content(/tmp/new)delimiter(')>operator(;) -predefined(is_file)operator(()local_variable($newfile)operator(\)) operator(&)operator(&) predefined(unlink)operator(()local_variable($newfile)operator(\))operator(;) +predefined(is_file)operator(()local_variable($newfile)operator(\)) operator(&&) predefined(unlink)operator(()local_variable($newfile)operator(\))operator(;) predefined(exec)operator(()predefined(trim)operator(()string<delimiter(')content(cp --force )delimiter(')> operator(.) predefined(escapeshellarg)operator(()local_variable($oldfile)operator(\)) operator(.) string<delimiter(')content( )delimiter(')> operator(.) predefined(escapeshellarg)operator(()local_variable($newfile)operator(\))operator(\))operator(\))operator(;) -predefined(is_file)operator(()local_variable($newfile)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Problem copying file )operator({)local_variable($oldfile)operator(})content( to file )operator({)local_variable($newfile)operator(})char(\\n)delimiter(")>operator(\))operator(;) +predefined(is_file)operator(()local_variable($newfile)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Problem copying file )inline<delimiter({)local_variable($oldfile)delimiter(})>content( to file )inline<delimiter({)local_variable($newfile)delimiter(})>char(\\n)delimiter(")>operator(\))operator(;) comment(// For other operating systems just change:) comment(// * filenames) @@ -3265,8 +3265,8 @@ comment(// as the rest of the code is platform independant) comment(// @@PLEAC@@_9.4) reserved(function) ident(makeDevInodePair)operator(()local_variable($filename)operator(\)) operator({) - reserved(if) operator(()operator(!)operator(()local_variable($fs) operator(=) operator(@)predefined(stat)operator(()local_variable($filename)operator(\))operator(\))operator(\)) predefined(return) reserved(FALSE)operator(;) - predefined(return) predefined(strval)operator(()local_variable($fs)operator([)string<delimiter(')content(dev)delimiter(')>operator(]) operator(.) local_variable($fs)operator([)string<delimiter(')content(ino)delimiter(')>operator(])operator(\))operator(;) + reserved(if) operator(()operator(!)operator(()local_variable($fs) operator(=) operator(@)predefined(stat)operator(()local_variable($filename)operator(\))operator(\))operator(\)) reserved(return) pre_constant(FALSE)operator(;) + reserved(return) predefined(strval)operator(()local_variable($fs)operator([)string<delimiter(')content(dev)delimiter(')>operator(]) operator(.) local_variable($fs)operator([)string<delimiter(')content(ino)delimiter(')>operator(])operator(\))operator(;) operator(}) comment(// ------------) @@ -3290,7 +3290,7 @@ operator({) reserved(else) operator({) comment(// Otherwise, just increment the count) - local_variable($seen)operator([)local_variable($devino)operator(]) operator(+)operator(=) integer(1)operator(;) + local_variable($seen)operator([)local_variable($devino)operator(]) operator(+=) integer(1)operator(;) operator(}) operator(}) @@ -3306,7 +3306,7 @@ ident(do_my_thing)operator(()string<delimiter(')content(/tmp/new)delimiter(')>op reserved(foreach)operator(()local_variable($seen) reserved(as) local_variable($devino) operator(=>) local_variable($count)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($devino)operator(})content( -> )operator({)local_variable($count)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($devino)delimiter(})>content( -> )inline<delimiter({)local_variable($count)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// ------------) @@ -3319,7 +3319,7 @@ comment(// 'accumulator', which is returned on completion) reserved(function) ident(array_update)operator(()local_variable($arr)operator(,) local_variable($lambda)operator(,) local_variable($updarr)operator(\)) operator({) reserved(foreach)operator(()local_variable($arr) reserved(as) local_variable($key)operator(\)) local_variable($lambda)operator(()local_variable($updarr)operator(,) local_variable($key)operator(\))operator(;) - predefined(return) local_variable($updarr)operator(;) + reserved(return) local_variable($updarr)operator(;) operator(}) reserved(function) ident(do_my_thing)operator(()operator(&)local_variable($seen)operator(,) local_variable($filename)operator(\)) @@ -3334,7 +3334,7 @@ operator({) reserved(else) operator({) comment(// Update $seen) - local_variable($seen)operator([)local_variable($devino)operator(]) operator(+)operator(=) integer(1)operator(;) + local_variable($seen)operator([)local_variable($devino)operator(]) operator(+=) integer(1)operator(;) operator(}) operator(}) @@ -3357,7 +3357,7 @@ ident(array_update)operator(()local_variable($files)operator(,) reserved(foreach)operator(()local_variable($seen) reserved(as) local_variable($devino) operator(=>) local_variable($count)operator(\)) operator({) - predefined(echo) string<delimiter(")operator({)local_variable($devino)operator(})content( -> )operator({)local_variable($count)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")inline<delimiter({)local_variable($devino)delimiter(})>content( -> )inline<delimiter({)local_variable($count)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// ----------------------------) @@ -3389,9 +3389,9 @@ comment(// @@PLEAC@@_9.5) comment(// Conventional POSIX-like approach to directory traversal) local_variable($dirname) operator(=) string<delimiter(')content(/usr/bin/)delimiter(')>operator(;) -operator(()local_variable($dirhdl) operator(=) predefined(opendir)operator(()local_variable($dirname)operator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Couldn't open )operator({)local_variable($dirname)operator(})char(\\n)delimiter(")>operator(\))operator(;) +operator(()local_variable($dirhdl) operator(=) predefined(opendir)operator(()local_variable($dirname)operator(\))operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Couldn't open )inline<delimiter({)local_variable($dirname)delimiter(})>char(\\n)delimiter(")>operator(\))operator(;) -reserved(while) operator(()operator(()local_variable($file) operator(=) predefined(readdir)operator(()local_variable($dirhdl)operator(\))operator(\)) operator(!==) reserved(FALSE)operator(\)) +reserved(while) operator(()operator(()local_variable($file) operator(=) predefined(readdir)operator(()local_variable($dirhdl)operator(\))operator(\)) operator(!==) pre_constant(FALSE)operator(\)) operator({) operator(;) comment(// ... do something with $dirname/$file) comment(// ...) @@ -3434,24 +3434,24 @@ comment(// ----------------------------) comment(// Uses, 'isTextFile', from an earlier section) local_variable($dirname) operator(=) string<delimiter(')content(/usr/bin/)delimiter(')>operator(;) -predefined(echo) string<delimiter(")content(Text files in )operator({)local_variable($dirname)operator(})content(:)char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")content(Text files in )inline<delimiter({)local_variable($dirname)delimiter(})>content(:)char(\\n)delimiter(")>operator(;) reserved(foreach)operator(()predefined(scandir)operator(()local_variable($dirname)operator(\)) reserved(as) local_variable($file)operator(\)) operator({) comment(// Take care when constructing paths to ensure cross-platform operability ) local_variable($path) operator(=) local_variable($dirname) operator(.) local_variable($file)operator(;) - reserved(if) operator(()predefined(is_file)operator(()local_variable($path)operator(\)) operator(&)operator(&) ident(isTextFile)operator(()local_variable($path)operator(\))operator(\)) predefined(echo) local_variable($path) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) + reserved(if) operator(()predefined(is_file)operator(()local_variable($path)operator(\)) operator(&&) ident(isTextFile)operator(()local_variable($path)operator(\))operator(\)) predefined(echo) local_variable($path) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) operator(}) comment(// ----------------------------) reserved(function) ident(plain_files)operator(()local_variable($dirname)operator(\)) operator({) - operator(()local_variable($dirlist) operator(=) predefined(glob)operator(()local_variable($dirname) operator(.) string<delimiter(')content(*)delimiter(')>operator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Couldn't glob )operator({)local_variable($dirname)operator(})char(\\n)delimiter(")>operator(\))operator(;) + operator(()local_variable($dirlist) operator(=) predefined(glob)operator(()local_variable($dirname) operator(.) string<delimiter(')content(*)delimiter(')>operator(\))operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Couldn't glob )inline<delimiter({)local_variable($dirname)delimiter(})>char(\\n)delimiter(")>operator(\))operator(;) comment(// Pass function name directly if only a single function performs filter test) - predefined(return) predefined(array_filter)operator(()local_variable($dirlist)operator(,) string<delimiter(')content(is_file)delimiter(')>operator(\))operator(;) + reserved(return) predefined(array_filter)operator(()local_variable($dirlist)operator(,) string<delimiter(')content(is_file)delimiter(')>operator(\))operator(;) comment(// Use, 'create_function', if a multi-function test is needed) comment(//) @@ -3512,7 +3512,7 @@ operator({) local_variable($current) operator(=) local_variable($func_args)operator([)integer(0)operator(])operator(;) reserved(foreach)operator(()predefined(scandir)operator(()local_variable($current)operator(\)) reserved(as) local_variable($entry)operator(\)) operator({) - reserved(if) operator(()local_variable($entry) operator(==) string<delimiter(')content(.)delimiter(')> operator(|)operator(|) local_variable($entry) operator(==) string<delimiter(')content(..)delimiter(')>operator(\)) reserved(continue)operator(;) + reserved(if) operator(()local_variable($entry) operator(==) string<delimiter(')content(.)delimiter(')> operator(||) local_variable($entry) operator(==) string<delimiter(')content(..)delimiter(')>operator(\)) reserved(continue)operator(;) local_variable($func_args)operator([)integer(0)operator(]) operator(=) local_variable($current) operator(.) string<delimiter(')content(/)delimiter(')> operator(.) local_variable($entry)operator(;) ident(process_directory_)operator(()local_variable($op)operator(,) local_variable($func_args)operator(\))operator(;) operator(}) @@ -3525,10 +3525,10 @@ operator(}) reserved(function) ident(process_directory)operator(()local_variable($op)operator(,) local_variable($dir)operator(\)) operator({) - reserved(if) operator(()operator(!)predefined(is_dir)operator(()local_variable($dir)operator(\))operator(\)) predefined(return) reserved(FALSE)operator(;) + reserved(if) operator(()operator(!)predefined(is_dir)operator(()local_variable($dir)operator(\))operator(\)) reserved(return) pre_constant(FALSE)operator(;) local_variable($func_args) operator(=) predefined(array_slice)operator(()predefined(func_get_args)operator(()operator(\))operator(,) integer(1)operator(\))operator(;) ident(process_directory_)operator(()local_variable($op)operator(,) local_variable($func_args)operator(\))operator(;) - predefined(return) reserved(TRUE)operator(;) + reserved(return) pre_constant(TRUE)operator(;) operator(}) comment(// ----------------------------) @@ -3571,7 +3571,7 @@ operator({) reserved(foreach)operator(()local_variable($filelist) reserved(as) local_variable($file)operator(\)) operator({) comment(// Ignore '..' and '.' entries) - reserved(if) operator(()local_variable($file) operator(==) string<delimiter(')content(.)delimiter(')> operator(|)operator(|) local_variable($file) operator(==) string<delimiter(')content(..)delimiter(')>operator(\)) reserved(continue)operator(;) + reserved(if) operator(()local_variable($file) operator(==) string<delimiter(')content(.)delimiter(')> operator(||) local_variable($file) operator(==) string<delimiter(')content(..)delimiter(')>operator(\)) reserved(continue)operator(;) comment(// Apply function to process the file / directory) ident(pf)operator(()local_variable($dir) operator(.) string<delimiter(')content(/)delimiter(')> operator(.) local_variable($file)operator(\))operator(;) @@ -3582,16 +3582,16 @@ comment(// ----------------------------) reserved(function) ident(accum_filesize)operator(()local_variable($file)operator(,) local_variable($accum)operator(\)) operator({) - predefined(is_file)operator(()local_variable($file)operator(\)) operator(&)operator(&) operator(()local_variable($accum)operator(->)ident(value) operator(+)operator(=) predefined(filesize)operator(()local_variable($file)operator(\))operator(\))operator(;) + predefined(is_file)operator(()local_variable($file)operator(\)) operator(&&) operator(()local_variable($accum)operator(->)ident(value) operator(+=) predefined(filesize)operator(()local_variable($file)operator(\))operator(\))operator(;) operator(}) comment(// ------------) comment(// Verify arguments ...) -local_variable($argc) operator(==) integer(2) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(usage: )operator({)local_variable($argv)operator([)integer(0)operator(])operator(})content( dir)char(\\n)delimiter(")>operator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()string<delimiter(")content(usage: )inline<delimiter({)local_variable($argv)operator([)integer(0)operator(])delimiter(})>content( dir)char(\\n)delimiter(")>operator(\))operator(;) local_variable($dir) operator(=) local_variable($argv)operator([)integer(1)operator(])operator(;) -predefined(is_dir)operator(()local_variable($dir)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")operator({)local_variable($dir)operator(})content( does not exist / not a directory)char(\\n)delimiter(")>operator(\))operator(;) +predefined(is_dir)operator(()local_variable($dir)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")inline<delimiter({)local_variable($dir)delimiter(})>content( does not exist / not a directory)char(\\n)delimiter(")>operator(\))operator(;) comment(// Collect data [use an object to accumulate results]) local_variable($dirsize) operator(=) reserved(new) constant(Accumulator)operator(()integer(0)operator(\))operator(;) @@ -3614,10 +3614,10 @@ operator(}) comment(// ------------) comment(// Verify arguments ...) -local_variable($argc) operator(==) integer(2) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(usage: )operator({)local_variable($argv)operator([)integer(0)operator(])operator(})content( dir)char(\\n)delimiter(")>operator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()string<delimiter(")content(usage: )inline<delimiter({)local_variable($argv)operator([)integer(0)operator(])delimiter(})>content( dir)char(\\n)delimiter(")>operator(\))operator(;) local_variable($dir) operator(=) local_variable($argv)operator([)integer(1)operator(])operator(;) -predefined(is_dir)operator(()local_variable($dir)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")operator({)local_variable($dir)operator(})content( does not exist / not a directory)char(\\n)delimiter(")>operator(\))operator(;) +predefined(is_dir)operator(()local_variable($dir)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")inline<delimiter({)local_variable($dir)delimiter(})>content( does not exist / not a directory)char(\\n)delimiter(")>operator(\))operator(;) comment(// Collect data [use an object to accumulate results]) local_variable($biggest) operator(=) reserved(new) constant(Accumulator)operator(()predefined(array)operator(()string<delimiter(')delimiter(')>operator(,) integer(0)operator(\))operator(\))operator(;) @@ -3640,10 +3640,10 @@ operator(}) comment(// ------------) comment(// Verify arguments ...) -local_variable($argc) operator(==) integer(2) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(usage: )operator({)local_variable($argv)operator([)integer(0)operator(])operator(})content( dir)char(\\n)delimiter(")>operator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()string<delimiter(")content(usage: )inline<delimiter({)local_variable($argv)operator([)integer(0)operator(])delimiter(})>content( dir)char(\\n)delimiter(")>operator(\))operator(;) local_variable($dir) operator(=) local_variable($argv)operator([)integer(1)operator(])operator(;) -predefined(is_dir)operator(()local_variable($dir)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")operator({)local_variable($dir)operator(})content( does not exist / not a directory)char(\\n)delimiter(")>operator(\))operator(;) +predefined(is_dir)operator(()local_variable($dir)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")inline<delimiter({)local_variable($dir)delimiter(})>content( does not exist / not a directory)char(\\n)delimiter(")>operator(\))operator(;) comment(// Collect data [use an object to accumulate results]) local_variable($youngest) operator(=) reserved(new) constant(Accumulator)operator(()predefined(array)operator(()string<delimiter(')delimiter(')>operator(,) integer(2147483647)operator(\))operator(\))operator(;) @@ -3678,9 +3678,9 @@ operator({) reserved(if) operator(()local_variable($dh) operator(=) predefined(opendir)operator(()local_variable($dir)operator(\))operator(\)) operator({) - reserved(while) operator(()reserved(FALSE) operator(!==) operator(()local_variable($item) operator(=) predefined(readdir)operator(()local_variable($dh)operator(\))operator(\))operator(\)) + reserved(while) operator(()pre_constant(FALSE) operator(!==) operator(()local_variable($item) operator(=) predefined(readdir)operator(()local_variable($dh)operator(\))operator(\))operator(\)) operator({) - reserved(if) operator(()local_variable($item) operator(!=) string<delimiter(')content(.)delimiter(')> operator(&)operator(&) local_variable($item) operator(!=) string<delimiter(')content(..)delimiter(')>operator(\)) + reserved(if) operator(()local_variable($item) operator(!=) string<delimiter(')content(.)delimiter(')> operator(&&) local_variable($item) operator(!=) string<delimiter(')content(..)delimiter(')>operator(\)) operator({) local_variable($subdir) operator(=) local_variable($dir) operator(.) string<delimiter(')content(/)delimiter(')> operator(.) string<delimiter(")local_variable($item)delimiter(")>operator(;) @@ -3698,25 +3698,25 @@ reserved(function) ident(rmtree)operator(()local_variable($dir)operator(\)) operator({) reserved(if) operator(()predefined(is_dir)operator(()local_variable($dir)operator(\))operator(\)) operator({) - operator(()predefined(substr)operator(()local_variable($dir)operator(,) operator(-)integer(1)operator(,) integer(1)operator(\)) operator(==) string<delimiter(')content(/)delimiter(')>operator(\)) operator(&)operator(&) operator(()local_variable($dir) operator(=) predefined(substr)operator(()local_variable($dir)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\))operator(;) - ident(rmtree_)operator(()local_variable($dir)operator(\))operator(;) predefined(return) operator(!)predefined(is_dir)operator(()local_variable($dir)operator(\))operator(;) + operator(()predefined(substr)operator(()local_variable($dir)operator(,) operator(-)integer(1)operator(,) integer(1)operator(\)) operator(==) string<delimiter(')content(/)delimiter(')>operator(\)) operator(&&) operator(()local_variable($dir) operator(=) predefined(substr)operator(()local_variable($dir)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\))operator(;) + ident(rmtree_)operator(()local_variable($dir)operator(\))operator(;) reserved(return) operator(!)predefined(is_dir)operator(()local_variable($dir)operator(\))operator(;) operator(}) - predefined(return) reserved(FALSE)operator(;) + reserved(return) pre_constant(FALSE)operator(;) operator(}) comment(// ------------) -local_variable($argc) operator(==) integer(2) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(usage: rmtree dir)char(\\n)delimiter(")>operator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()string<delimiter(")content(usage: rmtree dir)char(\\n)delimiter(")>operator(\))operator(;) -ident(rmtree)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Could not remove directory )operator({)local_variable($argv)operator([)integer(1)operator(])operator(})char(\\n)delimiter(")>operator(\))operator(;) +ident(rmtree)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Could not remove directory )inline<delimiter({)local_variable($argv)operator([)integer(1)operator(])delimiter(})>char(\\n)delimiter(")>operator(\))operator(;) comment(// @@PLEAC@@_9.9) local_variable($filepairs) operator(=) predefined(array)operator(()string<delimiter(')content(x.txt)delimiter(')> operator(=>) string<delimiter(')content(x2.txt)delimiter(')>operator(,) string<delimiter(')content(y.txt)delimiter(')> operator(=>) string<delimiter(')content(y.doc)delimiter(')>operator(,) string<delimiter(')content(zxc.txt)delimiter(')> operator(=>) string<delimiter(')content(cxz.txt)delimiter(')>operator(\))operator(;) reserved(foreach)operator(()local_variable($filepairs) reserved(as) local_variable($oldfile) operator(=>) local_variable($newfile)operator(\)) operator({) - operator(@)predefined(rename)operator(()local_variable($oldfile)operator(,) local_variable($newfile)operator(\)) operator(|)operator(|) predefined(fwrite)operator(()constant(STDERR)operator(,) predefined(sprintf)operator(()string<delimiter(")content(Could not rename %s to %s)char(\\n)delimiter(")>operator(,) local_variable($oldfile)operator(,) local_variable($newfile)operator(\))operator(\))operator(;) + operator(@)predefined(rename)operator(()local_variable($oldfile)operator(,) local_variable($newfile)operator(\)) operator(||) predefined(fwrite)operator(()constant(STDERR)operator(,) predefined(sprintf)operator(()string<delimiter(")content(Could not rename %s to %s)char(\\n)delimiter(")>operator(,) local_variable($oldfile)operator(,) local_variable($newfile)operator(\))operator(\))operator(;) operator(}) comment(// ----------------------------) @@ -3727,11 +3727,11 @@ comment(// be a better approach) local_variable($oldfile) operator(=) string<delimiter(')content(/tmp/old)delimiter(')>operator(;) local_variable($newfile) operator(=) string<delimiter(')content(/tmp/new)delimiter(')>operator(;) -predefined(is_file)operator(()local_variable($newfile)operator(\)) operator(&)operator(&) predefined(unlink)operator(()local_variable($newfile)operator(\))operator(;) +predefined(is_file)operator(()local_variable($newfile)operator(\)) operator(&&) predefined(unlink)operator(()local_variable($newfile)operator(\))operator(;) predefined(exec)operator(()predefined(trim)operator(()string<delimiter(')content(mv --force )delimiter(')> operator(.) predefined(escapeshellarg)operator(()local_variable($oldfile)operator(\)) operator(.) string<delimiter(')content( )delimiter(')> operator(.) predefined(escapeshellarg)operator(()local_variable($newfile)operator(\))operator(\))operator(\))operator(;) -predefined(is_file)operator(()local_variable($oldfile)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Problem renaming file )operator({)local_variable($oldfile)operator(})content( to file )operator({)local_variable($newfile)operator(})char(\\n)delimiter(")>operator(\))operator(;) +predefined(is_file)operator(()local_variable($oldfile)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Problem renaming file )inline<delimiter({)local_variable($oldfile)delimiter(})>content( to file )inline<delimiter({)local_variable($newfile)delimiter(})>char(\\n)delimiter(")>operator(\))operator(;) comment(// For other operating systems just change:) comment(// * filenames) @@ -3745,7 +3745,7 @@ comment(// a single expression, a 'from' regexp is passed; each match in the fil comment(// name(s\) is changed to the value of 'to'. It otherwise behaves the same) comment(//) -local_variable($argc) operator(>) integer(2) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(usage: rename from to [file ...])char(\\n)delimiter(")>operator(\))operator(;) +local_variable($argc) operator(>) integer(2) operator(||) predefined(die)operator(()string<delimiter(")content(usage: rename from to [file ...])char(\\n)delimiter(")>operator(\))operator(;) local_variable($from) operator(=) local_variable($argv)operator([)integer(1)operator(])operator(;) local_variable($to) operator(=) local_variable($argv)operator([)integer(2)operator(])operator(;) @@ -3759,7 +3759,7 @@ operator({) local_variable($file) operator(=) ident(ereg_replace)operator(()local_variable($from)operator(,) local_variable($to)operator(,) local_variable($file)operator(\))operator(;) reserved(if) operator(()predefined(strcmp)operator(()local_variable($was)operator(,) local_variable($file)operator(\)) operator(!=) integer(0)operator(\)) - operator(@)predefined(rename)operator(()local_variable($was)operator(,) local_variable($file)operator(\)) operator(|)operator(|) predefined(fwrite)operator(()constant(STDERR)operator(,) predefined(sprintf)operator(()string<delimiter(")content(Could not rename %s to %s)char(\\n)delimiter(")>operator(,) local_variable($was)operator(,) local_variable($file)operator(\))operator(\))operator(;) + operator(@)predefined(rename)operator(()local_variable($was)operator(,) local_variable($file)operator(\)) operator(||) predefined(fwrite)operator(()constant(STDERR)operator(,) predefined(sprintf)operator(()string<delimiter(")content(Could not rename %s to %s)char(\\n)delimiter(")>operator(,) local_variable($was)operator(,) local_variable($file)operator(\))operator(\))operator(;) operator(}) comment(// @@PLEAC@@_9.10) @@ -3803,7 +3803,7 @@ comment(// ----------------------------) comment(// Not really necessary since we have, 'pathinfo', but better matches Perl example) reserved(function) ident(file_extension)operator(()local_variable($filename)operator(,) local_variable($separator) operator(=) string<delimiter(')content(.)delimiter(')>operator(\)) operator({) - predefined(return) predefined(end)operator(()predefined(split)operator(()operator(()string<delimiter(")char(\\\\)delimiter(")> operator(.) local_variable($separator)operator(\))operator(,) local_variable($filename)operator(\))operator(\))operator(;) + reserved(return) predefined(end)operator(()predefined(split)operator(()operator(()string<delimiter(")char(\\\\)delimiter(")> operator(.) local_variable($separator)operator(\))operator(,) local_variable($filename)operator(\))operator(\))operator(;) operator(}) comment(// ----) @@ -3830,27 +3830,27 @@ comment(// defined) reserved(function) ident(howManyGreetings)operator(()operator(\)) operator({) reserved(global) local_variable($greeted)operator(;) - predefined(return) local_variable($greeted)operator(;) + reserved(return) local_variable($greeted)operator(;) operator(}) reserved(function) ident(hello)operator(()operator(\)) operator({) reserved(global) local_variable($greeted)operator(;) local_variable($greeted)operator(++)operator(;) - predefined(echo) string<delimiter(")content(high there!, this procedure has been called )operator({)local_variable($greeted)operator(})content( times)char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")content(high there!, this procedure has been called )inline<delimiter({)local_variable($greeted)delimiter(})>content( times)char(\\n)delimiter(")>operator(;) operator(}) comment(// ------------) ident(hello)operator(()operator(\))operator(;) local_variable($greetings) operator(=) ident(howManyGreetings)operator(()operator(\))operator(;) -predefined(echo) string<delimiter(")content(bye there!, there have been )operator({)local_variable($greetings)operator(})content( greetings so far)char(\\n)delimiter(")>operator(;) +predefined(echo) string<delimiter(")content(bye there!, there have been )inline<delimiter({)local_variable($greetings)delimiter(})>content( greetings so far)char(\\n)delimiter(")>operator(;) comment(// @@PLEAC@@_10.1) comment(// Conventionally-defined function together with parameter list) reserved(function) ident(hypotenuse)operator(()local_variable($side1)operator(,) local_variable($side2)operator(\)) operator({) - predefined(return) predefined(sqrt)operator(()predefined(pow)operator(()local_variable($side1)operator(,) integer(2)operator(\)) operator(+) predefined(pow)operator(()local_variable($side2)operator(,) integer(2)operator(\))operator(\))operator(;) + reserved(return) predefined(sqrt)operator(()predefined(pow)operator(()local_variable($side1)operator(,) integer(2)operator(\)) operator(+) predefined(pow)operator(()local_variable($side2)operator(,) integer(2)operator(\))operator(\))operator(;) operator(}) comment(// ----) @@ -3863,7 +3863,7 @@ operator({) comment(// would be the approach used if dealing with variable number of arguments) local_variable($side1) operator(=) predefined(func_get_arg)operator(()integer(0)operator(\))operator(;) local_variable($side2) operator(=) predefined(func_get_arg)operator(()integer(1)operator(\))operator(;) - predefined(return) predefined(sqrt)operator(()predefined(pow)operator(()local_variable($side1)operator(,) integer(2)operator(\)) operator(+) predefined(pow)operator(()local_variable($side2)operator(,) integer(2)operator(\))operator(\))operator(;) + reserved(return) predefined(sqrt)operator(()predefined(pow)operator(()local_variable($side1)operator(,) integer(2)operator(\)) operator(+) predefined(pow)operator(()local_variable($side2)operator(,) integer(2)operator(\))operator(\))operator(;) operator(}) comment(// ------------) @@ -3892,7 +3892,7 @@ comment(// ------------) comment(// Pass-by-value) reserved(function) ident(int_all)operator(()local_variable($arr)operator(\)) operator({) - predefined(return) predefined(array_map)operator(()ident(create_function)operator(()string<delimiter(')content($n)delimiter(')>operator(,) string<delimiter(')content(return (int\) $n;)delimiter(')>operator(\))operator(,) local_variable($arr)operator(\))operator(;) + reserved(return) predefined(array_map)operator(()ident(create_function)operator(()string<delimiter(')content($n)delimiter(')>operator(,) string<delimiter(')content(return (int\) $n;)delimiter(')>operator(\))operator(,) local_variable($arr)operator(\))operator(;) operator(}) comment(// Pass-by-reference) @@ -4052,8 +4052,8 @@ operator({) local_variable($this)operator(->)ident(counter) operator(=) local_variable($counter_init)operator(;) operator(}) - reserved(function) ident(next_counter)operator(()operator(\)) operator({) local_variable($this)operator(->)ident(counter)operator(++)operator(;) predefined(return) local_variable($this)operator(->)ident(counter)operator(;) operator(}) - reserved(function) ident(prev_counter)operator(()operator(\)) operator({) local_variable($this)operator(->)ident(counter)operator(;) predefined(return) local_variable($this)operator(->)ident(counter)operator(;) operator(}) + reserved(function) ident(next_counter)operator(()operator(\)) operator({) local_variable($this)operator(->)ident(counter)operator(++)operator(;) reserved(return) local_variable($this)operator(->)ident(counter)operator(;) operator(}) + reserved(function) ident(prev_counter)operator(()operator(\)) operator({) local_variable($this)operator(->)ident(counter)operator(;) reserved(return) local_variable($this)operator(->)ident(counter)operator(;) operator(}) operator(}) comment(// ------------) @@ -4079,7 +4079,7 @@ comment(// variable [perhaps called, '$name'] is so set [contrived, and of limit reserved(function) ident(whoami)operator(()operator(\)) operator({) local_variable($name) operator(=) string<delimiter(')content(whoami)delimiter(')>operator(;) - predefined(echo) string<delimiter(")content(I am: )operator({)local_variable($name)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string<delimiter(")content(I am: )inline<delimiter({)local_variable($name)delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) comment(// ------------) @@ -4140,11 +4140,11 @@ operator({) local_variable($r) operator(=) predefined(array)operator(()operator(\))operator(;) local_variable($length) operator(=) predefined(count)operator(()local_variable($x)operator(\))operator(;) reserved(for)operator(()local_variable($i) operator(=) integer(0)operator(;) local_variable($i) operator(<) local_variable($length)operator(;) local_variable($i)operator(++)operator(\)) local_variable($r)operator([)local_variable($i)operator(]) operator(=) local_variable($x)operator([)local_variable($i)operator(]) operator(+) local_variable($y)operator([)local_variable($i)operator(])operator(;) - predefined(return) local_variable($r)operator(;) + reserved(return) local_variable($r)operator(;) operator(}) comment(// ...) -predefined(count)operator(()local_variable($arr1)operator(\)) operator(==) predefined(count)operator(()local_variable($arr2)operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(usage: add_vecpair ARR1 ARR2)char(\\n)delimiter(")>operator(\))operator(;) +predefined(count)operator(()local_variable($arr1)operator(\)) operator(==) predefined(count)operator(()local_variable($arr2)operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(usage: add_vecpair ARR1 ARR2)char(\\n)delimiter(")>operator(\))operator(;) comment(// 'passed by value') local_variable($arr3) operator(=) ident(add_vecpair)operator(()local_variable($arr1)operator(,) local_variable($arr2)operator(\))operator(;) @@ -4166,11 +4166,11 @@ comment(// Can return any type) reserved(function) ident(mysub)operator(()operator(\)) operator({) comment(// ...) - predefined(return) integer(5)operator(;) + reserved(return) integer(5)operator(;) comment(// ...) - predefined(return) predefined(array)operator(()integer(5)operator(\))operator(;) + reserved(return) predefined(array)operator(()integer(5)operator(\))operator(;) comment(// ...) - predefined(return) string<delimiter(')content(5)delimiter(')>operator(;) + reserved(return) string<delimiter(')content(5)delimiter(')>operator(;) operator(}) comment(// Throw away return type [i.e. returns a 'void' type ?]) @@ -4275,7 +4275,7 @@ comment(// construct] may be used to perform multiple assignments from a numeric comment(// indexed array of values, and offers the added bonus of being able to skip) comment(// assignment of one, or more, of those values) -reserved(function) ident(func)operator(()operator(\)) operator({) predefined(return) predefined(array)operator(()integer(3)operator(,) integer(6)operator(,) integer(9)operator(\))operator(;) operator(}) +reserved(function) ident(func)operator(()operator(\)) operator({) reserved(return) predefined(array)operator(()integer(3)operator(,) integer(6)operator(,) integer(9)operator(\))operator(;) operator(}) comment(// ------------) @@ -4300,7 +4300,7 @@ comment(// @@PLEAC@@_10.9) comment(// Multiple return values are possible via packing a set of values within a) comment(// numerically-indexed array and using 'list' to extract them) -reserved(function) ident(some_func)operator(()operator(\)) operator({) predefined(return) predefined(array)operator(()predefined(array)operator(()integer(1)operator(,) integer(2)operator(,) integer(3)operator(\))operator(,) predefined(array)operator(()string<delimiter(')content(a)delimiter(')> operator(=>) integer(1)operator(,) string<delimiter(')content(b)delimiter(')> operator(=>) integer(2)operator(\))operator(\))operator(;) operator(}) +reserved(function) ident(some_func)operator(()operator(\)) operator({) reserved(return) predefined(array)operator(()predefined(array)operator(()integer(1)operator(,) integer(2)operator(,) integer(3)operator(\))operator(,) predefined(array)operator(()string<delimiter(')content(a)delimiter(')> operator(=>) integer(1)operator(,) string<delimiter(')content(b)delimiter(')> operator(=>) integer(2)operator(\))operator(\))operator(;) operator(}) comment(// ------------) @@ -4308,7 +4308,7 @@ predefined(list)operator(()local_variable($arr)operator(,) local_variable($hash) comment(// ----------------------------) -reserved(function) ident(some_func)operator(()operator(&)local_variable($arr)operator(,) operator(&)local_variable($hash)operator(\)) operator({) predefined(return) predefined(array)operator(()local_variable($arr)operator(,) local_variable($hash)operator(\))operator(;) operator(}) +reserved(function) ident(some_func)operator(()operator(&)local_variable($arr)operator(,) operator(&)local_variable($hash)operator(\)) operator({) reserved(return) predefined(array)operator(()local_variable($arr)operator(,) local_variable($hash)operator(\))operator(;) operator(}) comment(// ------------) @@ -4322,9 +4322,9 @@ comment(// value on success, and FALSE on exit. Whilst it is possible to return comment(// one of the recognised 'empty' values [e.g. '' or 0 or an empty array etc],) comment(// FALSE actually seems to be the preferred means of indicating failure) -reserved(function) ident(a_func)operator(()operator(\)) operator({) predefined(return) reserved(FALSE)operator(;) operator(}) +reserved(function) ident(a_func)operator(()operator(\)) operator({) reserved(return) pre_constant(FALSE)operator(;) operator(}) -ident(a_func)operator(()operator(\)) operator(|)operator(|) predefined(die)operator(()string<delimiter(")content(Function failed)char(\\n)delimiter(")>operator(\))operator(;) +ident(a_func)operator(()operator(\)) operator(||) predefined(die)operator(()string<delimiter(")content(Function failed)char(\\n)delimiter(")>operator(\))operator(;) reserved(if) operator(()operator(!)ident(a_func)operator(()operator(\))operator(\)) predefined(die)operator(()string<delimiter(")content(Function failed)char(\\n)delimiter(")>operator(\))operator(;) @@ -4387,7 +4387,7 @@ comment(// of their respective languages. A simple, canonical example follows:) comment(// Usual to derive new exception classes from the built-in, 'Exception',) comment(// class) -reserved(class) constant(MyException) reserved(extends) constant(Exception) +reserved(class) constant(MyException) reserved(extends) pre_constant(Exception) operator({) comment(// ...) operator(}) @@ -4408,7 +4408,7 @@ operator(}) comment(// ----------------------------) -reserved(class) constant(FullMoonException) reserved(extends) constant(Exception) +reserved(class) constant(FullMoonException) reserved(extends) pre_constant(Exception) operator({) comment(// ...) operator(}) @@ -4498,7 +4498,7 @@ local_variable($fred)operator(()operator(\))operator(;) comment(// ----------------------------) -reserved(function) ident(red)operator(()local_variable($text)operator(\)) operator({) predefined(return) string<delimiter(")content(<FONT COLOR='red'>)local_variable($text)content(</FONT>)delimiter(")>operator(;) operator(}) +reserved(function) ident(red)operator(()local_variable($text)operator(\)) operator({) reserved(return) string<delimiter(")content(<FONT COLOR='red'>)local_variable($text)content(</FONT>)delimiter(")>operator(;) operator(}) predefined(echo) ident(red)operator(()string<delimiter(')content(careful here)delimiter(')>operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) @@ -4506,12 +4506,12 @@ comment(// ------------) local_variable($colour) operator(=) string<delimiter(')content(red)delimiter(')>operator(;) -error($)local_variable($colour) operator(=) ident(create_function)operator(()string<delimiter(')content($text)delimiter(')>operator(,) string<delimiter(')content(global $colour; -return "<FONT COLOR=)content(\\')content($colour)content(\\')content(>$text</FONT>";)delimiter(')>operator(\))operator(;) +operator($)local_variable($colour) operator(=) ident(create_function)operator(()string<delimiter(')content($text)delimiter(')>operator(,) string<delimiter(')content(global $colour; +return "<FONT COLOR=)char(\\')content($colour)char(\\')content(>$text</FONT>";)delimiter(')>operator(\))operator(;) -predefined(echo) error($)local_variable($colour)operator(()string<delimiter(')content(careful here)delimiter(')>operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) +predefined(echo) operator($)local_variable($colour)operator(()string<delimiter(')content(careful here)delimiter(')>operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) -predefined(unset)operator(()error($)local_variable($colour)operator(\))operator(;) +predefined(unset)operator(()operator($)local_variable($colour)operator(\))operator(;) comment(// ----) @@ -4519,13 +4519,13 @@ local_variable($colours) operator(=) predefined(split)operator(()string<delimite reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) operator({) - error($)local_variable($colour) operator(=) ident(create_function)operator(()string<delimiter(')content($text)delimiter(')>operator(,) string<delimiter(')content(global $colour; - return "<FONT COLOR=)content(\\')content($colour)content(\\')content(>$text</FONT>";)delimiter(')>operator(\))operator(;) + operator($)local_variable($colour) operator(=) ident(create_function)operator(()string<delimiter(')content($text)delimiter(')>operator(,) string<delimiter(')content(global $colour; + return "<FONT COLOR=)char(\\')content($colour)char(\\')content(>$text</FONT>";)delimiter(')>operator(\))operator(;) operator(}) -reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) operator({) predefined(echo) error($)local_variable($colour)operator(()string<delimiter(")content(Careful with this )local_variable($colour)content(, James)delimiter(")>operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) operator(}) +reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) operator({) predefined(echo) operator($)local_variable($colour)operator(()string<delimiter(")content(Careful with this )local_variable($colour)content(, James)delimiter(")>operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) operator(}) -reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) operator({) predefined(unset)operator(()error($)local_variable($colour)operator(\))operator(;) operator(}) +reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) operator({) predefined(unset)operator(()operator($)local_variable($colour)operator(\))operator(;) operator(}) comment(// @@PLEAC@@_10.15) comment(// PHP sports an AUTOLOAD facility that is quite easy to use, but, AFAICT, is geared) @@ -4538,7 +4538,7 @@ operator({) operator({) comment(// Class file does not exist, so handle situation; in this case,) comment(// issue error message, and exit program) - predefined(die)operator(()string<delimiter(")content(File for class: )operator({)local_variable($classname)operator(})content( not found - aborting)char(\\n)delimiter(")>operator(\))operator(;) + predefined(die)operator(()string<delimiter(")content(File for class: )inline<delimiter({)local_variable($classname)delimiter(})>content( not found - aborting)char(\\n)delimiter(")>operator(\))operator(;) operator(}) reserved(else) operator({) @@ -4567,8 +4567,8 @@ local_variable($colours) operator(=) predefined(array)operator(()string<delimite reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) operator({) - error($)local_variable($colour) operator(=) ident(create_function)operator(()string<delimiter(')content($text)delimiter(')>operator(,) string<delimiter(')content(global $colour; - return "<FONT COLOR=)content(\\')content($colour)content(\\')content(>$text</FONT>";)delimiter(')>operator(\))operator(;) + operator($)local_variable($colour) operator(=) ident(create_function)operator(()string<delimiter(')content($text)delimiter(')>operator(,) string<delimiter(')content(global $colour; + return "<FONT COLOR=)char(\\')content($colour)char(\\')content(>$text</FONT>";)delimiter(')>operator(\))operator(;) operator(}) comment(// Let's add a new colour to the list) @@ -4577,20 +4577,20 @@ predefined(array_push)operator(()local_variable($colours)operator(,) string<deli reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) operator({) comment(// Checking whether function is defined) - reserved(if) operator(()operator(!)predefined(function_exists)operator(()error($)local_variable($colour)operator(\))operator(\)) + reserved(if) operator(()operator(!)predefined(function_exists)operator(()operator($)local_variable($colour)operator(\))operator(\)) operator({) comment(// Doesn't exist, so dynamically define it) - error($)local_variable($colour) operator(=) ident(create_function)operator(()string<delimiter(')content($text)delimiter(')>operator(,) string<delimiter(')content(global $colour; - return "<FONT COLOR=)content(\\')content($colour)content(\\')content(>$text</FONT>";)delimiter(')>operator(\))operator(;) + operator($)local_variable($colour) operator(=) ident(create_function)operator(()string<delimiter(')content($text)delimiter(')>operator(,) string<delimiter(')content(global $colour; + return "<FONT COLOR=)char(\\')content($colour)char(\\')content(>$text</FONT>";)delimiter(')>operator(\))operator(;) comment(// Alternatively, if it exists in a source file, 'include' the file:) comment(// include 'newcolours.php') operator(}) - predefined(echo) error($)local_variable($colour)operator(()string<delimiter(")content(Careful with this )local_variable($colour)content(, James)delimiter(")>operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) + predefined(echo) operator($)local_variable($colour)operator(()string<delimiter(")content(Careful with this )local_variable($colour)content(, James)delimiter(")>operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) operator(}) -reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) predefined(unset)operator(()error($)local_variable($colour)operator(\))operator(;) +reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) predefined(unset)operator(()operator($)local_variable($colour)operator(\))operator(;) comment(// @@PLEAC@@_10.16) comment(// *** Warning *** Whilst PHP *does* allow functions to be defined within other) @@ -4607,10 +4607,10 @@ comment(// or other inner functions) reserved(function) ident(outer)operator(()local_variable($arg)operator(\)) operator({) local_variable($x) operator(=) local_variable($arg) operator(+) integer(35)operator(;) - reserved(function) ident(inner)operator(()operator(\)) operator({) predefined(return) local_variable($x) operator(*) integer(19)operator(;) operator(}) + reserved(function) ident(inner)operator(()operator(\)) operator({) reserved(return) local_variable($x) operator(*) integer(19)operator(;) operator(}) comment(// *** wrong *** 'inner' returns 0 * 19, not ($arg + 35\) * 19) - predefined(return) local_variable($x) operator(+) ident(inner)operator(()operator(\))operator(;) + reserved(return) local_variable($x) operator(+) ident(inner)operator(()operator(\))operator(;) operator(}) comment(// ----------------------------) @@ -4621,9 +4621,9 @@ operator({) comment(// No implicit access to outer function scope; any required data must be) comment(// explicity passed) - reserved(function) ident(inner)operator(()local_variable($x)operator(\)) operator({) predefined(return) local_variable($x) operator(*) integer(19)operator(;) operator(}) + reserved(function) ident(inner)operator(()local_variable($x)operator(\)) operator({) reserved(return) local_variable($x) operator(*) integer(19)operator(;) operator(}) - predefined(return) local_variable($x) operator(+) ident(inner)operator(()local_variable($x)operator(\))operator(;) + reserved(return) local_variable($x) operator(+) ident(inner)operator(()local_variable($x)operator(\))operator(;) operator(}) comment(// ------------ ) @@ -4631,13 +4631,13 @@ comment(// ------------ ) comment(// Equivalent to previously-shown code) reserved(function) ident(inner)operator(()local_variable($x)operator(\)) operator({) - predefined(return) local_variable($x) operator(*) integer(19)operator(;) + reserved(return) local_variable($x) operator(*) integer(19)operator(;) operator(}) reserved(function) ident(outer)operator(()local_variable($arg)operator(\)) operator({) local_variable($x) operator(=) local_variable($arg) operator(+) integer(35)operator(;) - predefined(return) local_variable($x) operator(+) ident(inner)operator(()local_variable($x)operator(\))operator(;) + reserved(return) local_variable($x) operator(+) ident(inner)operator(()local_variable($x)operator(\))operator(;) operator(}) comment(// @@PLEAC@@_10.17) @@ -4649,7 +4649,7 @@ comment(// Run a command and return its results as a string.) local_variable($output_string) operator(=) predefined(shell_exec)operator(()string<delimiter(')content(program args)delimiter(')>operator(\))operator(;) comment(// Same as above, using backtick operator.) -local_variable($output_string) operator(=) error(`)ident(program) ident(args)error(`)operator(;) +local_variable($output_string) operator(=) string<delimiter(`)content(program args)delimiter(`)>operator(;) comment(// Run a command and return its results as a list of strings,) comment(// one per line.) @@ -4743,7 +4743,7 @@ comment(// Handle each line in the output of a process.) local_variable($readme) operator(=) predefined(popen)operator(()string<delimiter(')content(program arguments)delimiter(')>operator(,) string<delimiter(')content(r)delimiter(')>operator(\))operator(;) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($readme)operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($readme)operator(\))operator(;) - reserved(if) operator(()local_variable($line) operator(===) reserved(false)operator(\)) reserved(break)operator(;) + reserved(if) operator(()local_variable($line) operator(===) pre_constant(false)operator(\)) reserved(break)operator(;) comment(// ...) operator(}) predefined(pclose)operator(()local_variable($readme)operator(\))operator(;) @@ -4772,13 +4772,13 @@ comment(// -----------------------------) comment(// Output buffering callback that sends output to the pager.) reserved(function) ident(ob_pager)operator(()local_variable($output)operator(,) local_variable($mode)operator(\)) operator({) reserved(static) local_variable($pipe)operator(;) - reserved(if) operator(()local_variable($mode) operator(&) constant(PHP_OUTPUT_HANDLER_START)operator(\)) operator({) + reserved(if) operator(()local_variable($mode) operator(&) pre_constant(PHP_OUTPUT_HANDLER_START)operator(\)) operator({) local_variable($pager) operator(=) predefined(getenv)operator(()string<delimiter(')content(PAGER)delimiter(')>operator(\))operator(;) reserved(if) operator(()operator(!)local_variable($pager)operator(\)) local_variable($pager) operator(=) string<delimiter(')content(/usr/bin/less)delimiter(')>operator(;) comment(// XXX: might not exist) local_variable($pipe) operator(=) predefined(popen)operator(()local_variable($pager)operator(,) string<delimiter(')content(w)delimiter(')>operator(\))operator(;) operator(}) predefined(fwrite)operator(()local_variable($pipe)operator(,) local_variable($output)operator(\))operator(;) - reserved(if) operator(()local_variable($mode) operator(&) constant(PHP_OUTPUT_HANDLER_END)operator(\)) operator({) + reserved(if) operator(()local_variable($mode) operator(&) pre_constant(PHP_OUTPUT_HANDLER_END)operator(\)) operator({) predefined(pclose)operator(()local_variable($pipe)operator(\))operator(;) operator(}) operator(}) @@ -4801,7 +4801,7 @@ reserved(class) constant(Head) operator({) reserved(function) ident(filter)operator(()local_variable($output)operator(,) local_variable($mode)operator(\)) operator({) local_variable($result) operator(=) predefined(array)operator(()operator(\))operator(;) local_variable($newline) operator(=) string<delimiter(')delimiter(')>operator(;) - reserved(if) operator(()predefined(strlen)operator(()local_variable($output)operator(\)) operator(>) integer(0) operator(&)operator(&) local_variable($output)operator([)predefined(strlen)operator(()local_variable($output)operator(\)) operator(-) integer(1)operator(]) operator(==) string<delimiter(")char(\\n)delimiter(")>operator(\)) operator({) + reserved(if) operator(()predefined(strlen)operator(()local_variable($output)operator(\)) operator(>) integer(0) operator(&&) local_variable($output)operator([)predefined(strlen)operator(()local_variable($output)operator(\)) operator(-) integer(1)operator(]) operator(==) string<delimiter(")char(\\n)delimiter(")>operator(\)) operator({) local_variable($newline) operator(=) string<delimiter(")char(\\n)delimiter(")>operator(;) local_variable($output) operator(=) predefined(substr)operator(()local_variable($output)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(;) operator(}) @@ -4811,7 +4811,7 @@ reserved(class) constant(Head) operator({) local_variable($result)operator([)operator(]) operator(=) local_variable($line)operator(;) operator(}) operator(}) - predefined(return) local_variable($result) operator(?) predefined(implode)operator(()string<delimiter(")char(\\n)delimiter(")>operator(,) local_variable($result)operator(\)) operator(.) local_variable($newline) operator(:) string<delimiter(')delimiter(')>operator(;) + reserved(return) local_variable($result) operator(?) predefined(implode)operator(()string<delimiter(")char(\\n)delimiter(")>operator(,) local_variable($result)operator(\)) operator(.) local_variable($newline) operator(:) string<delimiter(')delimiter(')>operator(;) operator(}) operator(}) @@ -4824,7 +4824,7 @@ reserved(class) constant(Number) operator({) reserved(function) ident(filter)operator(()local_variable($output)operator(,) local_variable($mode)operator(\)) operator({) local_variable($result) operator(=) predefined(array)operator(()operator(\))operator(;) local_variable($newline) operator(=) string<delimiter(')delimiter(')>operator(;) - reserved(if) operator(()predefined(strlen)operator(()local_variable($output)operator(\)) operator(>) integer(0) operator(&)operator(&) local_variable($output)operator([)predefined(strlen)operator(()local_variable($output)operator(\)) operator(-) integer(1)operator(]) operator(==) string<delimiter(")char(\\n)delimiter(")>operator(\)) operator({) + reserved(if) operator(()predefined(strlen)operator(()local_variable($output)operator(\)) operator(>) integer(0) operator(&&) local_variable($output)operator([)predefined(strlen)operator(()local_variable($output)operator(\)) operator(-) integer(1)operator(]) operator(==) string<delimiter(")char(\\n)delimiter(")>operator(\)) operator({) local_variable($newline) operator(=) string<delimiter(")char(\\n)delimiter(")>operator(;) local_variable($output) operator(=) predefined(substr)operator(()local_variable($output)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(;) operator(}) @@ -4832,7 +4832,7 @@ reserved(class) constant(Number) operator({) local_variable($this)operator(->)ident(line_number)operator(++)operator(;) local_variable($result)operator([)operator(]) operator(=) local_variable($this)operator(->)ident(line_number) operator(.) string<delimiter(')content(: )delimiter(')> operator(.) local_variable($line)operator(;) operator(}) - predefined(return) predefined(implode)operator(()string<delimiter(")char(\\n)delimiter(")>operator(,) local_variable($result)operator(\)) operator(.) local_variable($newline)operator(;) + reserved(return) predefined(implode)operator(()string<delimiter(")char(\\n)delimiter(")>operator(,) local_variable($result)operator(\)) operator(.) local_variable($newline)operator(;) operator(}) operator(}) @@ -4844,14 +4844,14 @@ reserved(class) constant(Quote) operator({) reserved(function) ident(filter)operator(()local_variable($output)operator(,) local_variable($mode)operator(\)) operator({) local_variable($result) operator(=) predefined(array)operator(()operator(\))operator(;) local_variable($newline) operator(=) string<delimiter(')delimiter(')>operator(;) - reserved(if) operator(()predefined(strlen)operator(()local_variable($output)operator(\)) operator(>) integer(0) operator(&)operator(&) local_variable($output)operator([)predefined(strlen)operator(()local_variable($output)operator(\)) operator(-) integer(1)operator(]) operator(==) string<delimiter(")char(\\n)delimiter(")>operator(\)) operator({) + reserved(if) operator(()predefined(strlen)operator(()local_variable($output)operator(\)) operator(>) integer(0) operator(&&) local_variable($output)operator([)predefined(strlen)operator(()local_variable($output)operator(\)) operator(-) integer(1)operator(]) operator(==) string<delimiter(")char(\\n)delimiter(")>operator(\)) operator({) local_variable($newline) operator(=) string<delimiter(")char(\\n)delimiter(")>operator(;) local_variable($output) operator(=) predefined(substr)operator(()local_variable($output)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(;) operator(}) reserved(foreach) operator(()predefined(explode)operator(()string<delimiter(")char(\\n)delimiter(")>operator(,) local_variable($output)operator(\)) reserved(as) local_variable($i) operator(=>) local_variable($line)operator(\)) operator({) local_variable($result)operator([)operator(]) operator(=) string<delimiter(")content(> )local_variable($line)delimiter(")>operator(;) operator(}) - predefined(return) predefined(implode)operator(()string<delimiter(")char(\\n)delimiter(")>operator(,) local_variable($result)operator(\)) operator(.) local_variable($newline)operator(;) + reserved(return) predefined(implode)operator(()string<delimiter(")char(\\n)delimiter(")>operator(,) local_variable($result)operator(\)) operator(.) local_variable($newline)operator(;) operator(}) operator(}) @@ -4863,7 +4863,7 @@ ident(ob_start)operator(()predefined(array)operator(()reserved(new) constant(Quo comment(// Act like /bin/cat.) reserved(while) operator(()operator(!)predefined(feof)operator(()constant(STDIN)operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()constant(STDIN)operator(\))operator(;) - reserved(if) operator(()local_variable($line) operator(===) reserved(false)operator(\)) reserved(break)operator(;) + reserved(if) operator(()local_variable($line) operator(===) pre_constant(false)operator(\)) reserved(break)operator(;) predefined(echo) local_variable($line)operator(;) operator(}) @@ -4891,7 +4891,7 @@ reserved(foreach) operator(()local_variable($filenames) reserved(as) local_varia reserved(if) operator(()local_variable($handle)operator(\)) operator({) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($handle)operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($handle)operator(\))operator(;) - reserved(if) operator(()local_variable($line) operator(===) reserved(false)operator(\)) reserved(break)operator(;) + reserved(if) operator(()local_variable($line) operator(===) pre_constant(false)operator(\)) reserved(break)operator(;) comment(// ...) operator(}) predefined(fclose)operator(()local_variable($handle)operator(\))operator(;) @@ -4901,34 +4901,34 @@ reserved(foreach) operator(()local_variable($filenames) reserved(as) local_varia operator(}) comment(// @@PLEAC@@_16.7) -local_variable($output) operator(=) error(`)ident(cmd) integer(2)operator(>)operator(&)integer(1)error(`)operator(;) comment(// with backticks) +local_variable($output) operator(=) string<delimiter(`)content(cmd 2>&1)delimiter(`)>operator(;) comment(// with backticks) comment(// or) local_variable($ph) operator(=) predefined(popen)operator(()string<delimiter(')content(cmd 2>&1)delimiter(')>operator(\))operator(;) comment(// with an open pipe) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($ph)operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($ph)operator(\))operator(;) operator(}) comment(// plus a read) comment(// -----------------------------) -local_variable($output) operator(=) error(`)ident(cmd) integer(2)operator(>)operator(/)ident(dev)operator(/)reserved(null)error(`)operator(;) comment(// with backticks) +local_variable($output) operator(=) string<delimiter(`)content(cmd 2>/dev/null)delimiter(`)>operator(;) comment(// with backticks) comment(// or) local_variable($ph) operator(=) predefined(popen)operator(()string<delimiter(')content(cmd 2>/dev/null)delimiter(')>operator(\))operator(;) comment(// with an open pipe) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($ph)operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($ph)operator(\))operator(;) operator(}) comment(// plus a read) comment(// -----------------------------) -local_variable($output) operator(=) error(`)ident(cmd) integer(2)operator(>)operator(&)integer(1) integer(1)operator(>)operator(/)ident(dev)operator(/)reserved(null)error(`)operator(;) comment(// with backticks) +local_variable($output) operator(=) string<delimiter(`)content(cmd 2>&1 1>/dev/null)delimiter(`)>operator(;) comment(// with backticks) comment(// or) local_variable($ph) operator(=) predefined(popen)operator(()string<delimiter(')content(cmd 2>&1 1>/dev/null)delimiter(')>operator(\))operator(;) comment(// with an open pipe) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($ph)operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($ph)operator(\))operator(;) operator(}) comment(// plus a read) comment(// -----------------------------) -local_variable($output) operator(=) error(`)ident(cmd) integer(3)operator(>)operator(&)integer(1) integer(1)operator(>)operator(&)integer(2) integer(2)operator(>)operator(&)integer(3) integer(3)operator(>)operator(&)operator(-)error(`)operator(;) comment(// with backticks) +local_variable($output) operator(=) string<delimiter(`)content(cmd 3>&1 1>&2 2>&3 3>&-)delimiter(`)>operator(;) comment(// with backticks) comment(// or) local_variable($ph) operator(=) predefined(popen)operator(()string<delimiter(')content(cmd 3>&1 1>&2 2>&3 3>&-|)delimiter(')>operator(\))operator(;) comment(// with an open pipe) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($ph)operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($ph)operator(\))operator(;) operator(}) comment(// plus a read) comment(// -----------------------------) predefined(exec)operator(()string<delimiter(')content(program args 1>/tmp/program.stdout 2>/tmp/program.stderr)delimiter(')>operator(\))operator(;) comment(// -----------------------------) -local_variable($output) operator(=) error(`)ident(cmd) integer(3)operator(>)operator(&)integer(1) integer(1)operator(>)operator(&)integer(2) integer(2)operator(>)operator(&)integer(3) integer(3)operator(>)operator(&)operator(-)error(`)operator(;) +local_variable($output) operator(=) string<delimiter(`)content(cmd 3>&1 1>&2 2>&3 3>&-)delimiter(`)>operator(;) comment(// -----------------------------) local_variable($fd3) operator(=) local_variable($fd1)operator(;) local_variable($fd1) operator(=) local_variable($fd2)operator(;) local_variable($fd2) operator(=) local_variable($fd3)operator(;) -local_variable($fd3) operator(=) reserved(null)operator(;) +local_variable($fd3) operator(=) pre_constant(null)operator(;) comment(// -----------------------------) predefined(exec)operator(()string<delimiter(')content(prog args 1>tmpfile 2>&1)delimiter(')>operator(\))operator(;) predefined(exec)operator(()string<delimiter(')content(prog args 2>&1 1>tmpfile)delimiter(')>operator(\))operator(;) @@ -4964,7 +4964,7 @@ local_variable($errlines) operator(=) predefined(array)operator(()operator(\))op predefined(exec)operator(()string<delimiter(")content(( )local_variable($cmd)content( | sed -e 's/^/stdout: /' \) 2>&1)delimiter(")>operator(,) local_variable($all)operator(\))operator(;) reserved(foreach) operator(()local_variable($all) reserved(as) local_variable($line)operator(\)) operator({) local_variable($pos) operator(=) predefined(strpos)operator(()local_variable($line)operator(,) string<delimiter(')content(stdout: )delimiter(')>operator(\))operator(;) - reserved(if) operator(()local_variable($pos) operator(!==) reserved(false) operator(&)operator(&) local_variable($pos) operator(==) integer(0)operator(\)) operator({) + reserved(if) operator(()local_variable($pos) operator(!==) pre_constant(false) operator(&&) local_variable($pos) operator(==) integer(0)operator(\)) operator({) local_variable($outlines)operator([)operator(]) operator(=) predefined(substr)operator(()local_variable($line)operator(,) integer(8)operator(\))operator(;) operator(}) reserved(else) operator({) local_variable($errlines)operator([)operator(]) operator(=) local_variable($line)operator(;) @@ -4992,7 +4992,7 @@ reserved(if) operator(()predefined(is_resource)operator(()local_variable($proc)o local_variable($outlines) operator(=) predefined(array)operator(()operator(\))operator(;) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($pipes)operator([)integer(1)operator(])operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($pipes)operator([)integer(1)operator(])operator(\))operator(;) - reserved(if) operator(()local_variable($line) operator(===) reserved(false)operator(\)) reserved(break)operator(;) + reserved(if) operator(()local_variable($line) operator(===) pre_constant(false)operator(\)) reserved(break)operator(;) local_variable($outlines)operator([)operator(]) operator(=) predefined(rtrim)operator(()local_variable($line)operator(\))operator(;) operator(}) @@ -5000,7 +5000,7 @@ reserved(if) operator(()predefined(is_resource)operator(()local_variable($proc)o local_variable($errlines) operator(=) predefined(array)operator(()operator(\))operator(;) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($pipes)operator([)integer(2)operator(])operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($pipes)operator([)integer(2)operator(])operator(\))operator(;) - reserved(if) operator(()local_variable($line) operator(===) reserved(false)operator(\)) reserved(break)operator(;) + reserved(if) operator(()local_variable($line) operator(===) pre_constant(false)operator(\)) reserved(break)operator(;) local_variable($errlines)operator([)operator(]) operator(=) predefined(rtrim)operator(()local_variable($line)operator(\))operator(;) operator(}) @@ -5032,12 +5032,12 @@ reserved(if) operator(()predefined(is_resource)operator(()local_variable($proc)o local_variable($readers) operator(=) predefined(array)operator(()local_variable($pipes)operator([)integer(1)operator(])operator(,) local_variable($pipes)operator([)integer(2)operator(])operator(\))operator(;) reserved(while) operator(()ident(stream_select)operator(()local_variable($read)operator(=)local_variable($readers)operator(,) - local_variable($write)operator(=)reserved(null)operator(,) - local_variable($except)operator(=)reserved(null)operator(,) + local_variable($write)operator(=)pre_constant(null)operator(,) + local_variable($except)operator(=)pre_constant(null)operator(,) integer(0)operator(,) integer(200000)operator(\)) operator(>) integer(0)operator(\)) operator({) reserved(foreach) operator(()local_variable($read) reserved(as) local_variable($stream)operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($stream)operator(\))operator(;) - reserved(if) operator(()local_variable($line) operator(!==) reserved(false)operator(\)) operator({) + reserved(if) operator(()local_variable($line) operator(!==) pre_constant(false)operator(\)) operator({) reserved(if) operator(()local_variable($stream) operator(===) local_variable($pipes)operator([)integer(1)operator(])operator(\)) operator({) predefined(print) string<delimiter(")content(STDOUT: )local_variable($line)delimiter(")>operator(;) operator(}) reserved(else) operator({) @@ -5169,10 +5169,10 @@ comment(// % mkfifo /path/to/named.pipe) comment(// -----------------------------) local_variable($fifo) operator(=) predefined(fopen)operator(()string<delimiter(')content(/path/to/named.pipe)delimiter(')>operator(,) string<delimiter(')content(r)delimiter(')>operator(\))operator(;) -reserved(if) operator(()local_variable($fifo) operator(!==) reserved(false)operator(\)) operator({) +reserved(if) operator(()local_variable($fifo) operator(!==) pre_constant(false)operator(\)) operator({) reserved(while) operator(()operator(!)predefined(feof)operator(()local_variable($fifo)operator(\))operator(\)) operator({) local_variable($line) operator(=) predefined(fgets)operator(()local_variable($fifo)operator(\))operator(;) - reserved(if) operator(()local_variable($line) operator(===) reserved(false)operator(\)) reserved(break)operator(;) + reserved(if) operator(()local_variable($line) operator(===) pre_constant(false)operator(\)) reserved(break)operator(;) predefined(echo) string<delimiter(")content(Got: )local_variable($line)delimiter(")>operator(;) operator(}) predefined(fclose)operator(()local_variable($fifo)operator(\))operator(;) @@ -5183,7 +5183,7 @@ operator(}) comment(// -----------------------------) local_variable($fifo) operator(=) predefined(fopen)operator(()string<delimiter(')content(/path/to/named.pipe)delimiter(')>operator(,) string<delimiter(')content(w)delimiter(')>operator(\))operator(;) -reserved(if) operator(()local_variable($fifo) operator(!==) reserved(false)operator(\)) operator({) +reserved(if) operator(()local_variable($fifo) operator(!==) pre_constant(false)operator(\)) operator({) predefined(fwrite)operator(()local_variable($fifo)operator(,) string<delimiter(")content(Smoke this.)char(\\n)delimiter(")>operator(\))operator(;) predefined(fclose)operator(()local_variable($fifo)operator(\))operator(;) operator(}) reserved(else) operator({) @@ -5196,10 +5196,10 @@ comment(// % mknod ~/.plan p # in case you don't have mkfifo) comment(// -----------------------------) comment(// dateplan - place current date and time in .plan file) -reserved(while) operator(()reserved(true)operator(\)) operator({) +reserved(while) operator(()pre_constant(true)operator(\)) operator({) local_variable($home) operator(=) predefined(getenv)operator(()string<delimiter(')content(HOME)delimiter(')>operator(\))operator(;) local_variable($fifo) operator(=) predefined(fopen)operator(()string<delimiter(")local_variable($home)content(/.plan)delimiter(")>operator(,) string<delimiter(')content(w)delimiter(')>operator(\))operator(;) - reserved(if) operator(()local_variable($fifo) operator(===) reserved(false)operator(\)) operator({) + reserved(if) operator(()local_variable($fifo) operator(===) pre_constant(false)operator(\)) operator({) predefined(die)operator(()string<delimiter(")content(Couldn't open )local_variable($home)content(/.plan for writing.)char(\\n)delimiter(")>operator(\))operator(;) operator(}) predefined(fwrite)operator(()local_variable($fifo)operator(,) @@ -5214,7 +5214,7 @@ comment(// -----------------------------) comment(// fifolog - read and record log msgs from fifo) -local_variable($fifo) operator(=) reserved(null)operator(;) +local_variable($fifo) operator(=) pre_constant(null)operator(;) reserved(declare)operator(()ident(ticks) operator(=) integer(1)operator(\))operator(;) reserved(function) ident(handle_alarm)operator(()local_variable($signal)operator(\)) operator({) @@ -5223,20 +5223,20 @@ reserved(function) ident(handle_alarm)operator(()local_variable($signal)operator operator(}) ident(pcntl_signal)operator(()constant(SIGALRM)operator(,) string<delimiter(')content(handle_alarm)delimiter(')>operator(\))operator(;) -reserved(while) operator(()reserved(true)operator(\)) operator({) +reserved(while) operator(()pre_constant(true)operator(\)) operator({) ident(pcntl_alarm)operator(()integer(0)operator(\))operator(;) comment(// turn off alarm for blocking open) local_variable($fifo) operator(=) predefined(fopen)operator(()string<delimiter(')content(/tmp/log)delimiter(')>operator(,) string<delimiter(')content(r)delimiter(')>operator(\))operator(;) - reserved(if) operator(()local_variable($fifo) operator(===) reserved(false)operator(\)) operator({) + reserved(if) operator(()local_variable($fifo) operator(===) pre_constant(false)operator(\)) operator({) predefined(die)operator(()string<delimiter(")content(can't open /tmp/log)delimiter(")>operator(\))operator(;) operator(}) ident(pcntl_alarm)operator(()integer(1)operator(\))operator(;) comment(// you have 1 second to log) local_variable($service) operator(=) predefined(fgets)operator(()local_variable($fifo)operator(\))operator(;) - reserved(if) operator(()local_variable($service) operator(===) reserved(false)operator(\)) reserved(continue)operator(;) comment(// interrupt or nothing logged) + reserved(if) operator(()local_variable($service) operator(===) pre_constant(false)operator(\)) reserved(continue)operator(;) comment(// interrupt or nothing logged) local_variable($service) operator(=) predefined(rtrim)operator(()local_variable($service)operator(\))operator(;) local_variable($message) operator(=) predefined(fgets)operator(()local_variable($fifo)operator(\))operator(;) - reserved(if) operator(()local_variable($message) operator(===) reserved(false)operator(\)) reserved(continue)operator(;) comment(// interrupt or nothing logged) + reserved(if) operator(()local_variable($message) operator(===) pre_constant(false)operator(\)) reserved(continue)operator(;) comment(// interrupt or nothing logged) local_variable($message) operator(=) predefined(rtrim)operator(()local_variable($message)operator(\))operator(;) ident(pcntl_alarm)operator(()integer(0)operator(\))operator(;) comment(// turn off alarms for message processing) @@ -5246,14 +5246,14 @@ reserved(while) operator(()reserved(true)operator(\)) operator({) operator(}) reserved(elseif) operator(()local_variable($service) operator(==) string<delimiter(')content(login)delimiter(')>operator(\)) operator({) comment(// log to /var/log/login) local_variable($log) operator(=) predefined(fopen)operator(()string<delimiter(')content(/var/log/login)delimiter(')>operator(,) string<delimiter(')content(a)delimiter(')>operator(\))operator(;) - reserved(if) operator(()local_variable($log) operator(!==) reserved(false)operator(\)) operator({) + reserved(if) operator(()local_variable($log) operator(!==) pre_constant(false)operator(\)) operator({) predefined(fwrite)operator(()local_variable($log)operator(,) predefined(strftime)operator(()string<delimiter(')content(%a, %d %b %Y %H:%M:%S %z)delimiter(')>operator(\)) operator(.) string<delimiter(")content( )local_variable($service)content( )local_variable($message)char(\\n)delimiter(")>operator(\))operator(;) predefined(fclose)operator(()local_variable($log)operator(\))operator(;) operator(}) reserved(else) operator({) predefined(trigger_error)operator(()string<delimiter(")content(Couldn't log )local_variable($service)content( )local_variable($message)content( to /var/log/login)char(\\n)delimiter(")>operator(,) - constant(E_USER_WARNING)operator(\))operator(;) + exception(E_USER_WARNING)operator(\))operator(;) operator(}) operator(}) operator(}) @@ -5281,7 +5281,7 @@ reserved(for) operator(()local_variable($i) operator(=) integer(0)operator(;) lo operator(}) operator(}) -reserved(while) operator(()reserved(true)operator(\)) operator({) +reserved(while) operator(()pre_constant(true)operator(\)) operator({) predefined(print) string<delimiter(')content(Buffer is )delimiter(')> operator(.) ident(shm_get_var)operator(()local_variable($buffer)operator(,) integer(1)operator(\)) operator(.) string<delimiter(")char(\\n)delimiter(")>operator(;) predefined(sleep)operator(()integer(1)operator(\))operator(;) operator(}) @@ -5292,7 +5292,7 @@ reserved(function) ident(squabble)operator(()operator(\)) operator({) reserved(global) local_variable($buffer)operator(;) local_variable($i) operator(=) integer(0)operator(;) local_variable($pid) operator(=) predefined(getmypid)operator(()operator(\))operator(;) - reserved(while) operator(()reserved(true)operator(\)) operator({) + reserved(while) operator(()pre_constant(true)operator(\)) operator({) reserved(if) operator(()predefined(preg_match)operator(()string<delimiter(")content(/^)local_variable($pid)char(\\\\)content(b/)delimiter(")>operator(,) ident(shm_get_var)operator(()local_variable($buffer)operator(,) integer(1)operator(\))operator(\))operator(\)) reserved(continue)operator(;) ident(sem_acquire)operator(()local_variable($handle)operator(\))operator(;) local_variable($i)operator(++)operator(;) @@ -5406,8 +5406,8 @@ reserved(function) ident(get_name)operator(()operator(\)) operator({) predefined(echo) string<delimiter(")content(Kindly Stranger, please enter your name: )delimiter(")>operator(;) reserved(while) operator(()operator(!)operator(@)ident(stream_select)operator(()local_variable($read)operator(=)predefined(array)operator(()constant(STDIN)operator(\))operator(,) - local_variable($write)operator(=)reserved(null)operator(,) - local_variable($except)operator(=)reserved(null)operator(,) + local_variable($write)operator(=)pre_constant(null)operator(,) + local_variable($except)operator(=)pre_constant(null)operator(,) integer(1)operator(\))operator(\)) operator({) comment(// allow signals to be observed) operator(}) @@ -5417,7 +5417,7 @@ reserved(function) ident(get_name)operator(()operator(\)) operator({) comment(// best we can do here is set it back to the default behavior.) ident(pcntl_signal)operator(()constant(SIGINT)operator(,) constant(SIG_DFL)operator(\))operator(;) - predefined(return) local_variable($name)operator(;) + reserved(return) local_variable($name)operator(;) operator(}) comment(// @@PLEAC@@_16.17) @@ -5430,16 +5430,16 @@ ident(pcntl_signal)operator(()constant(SIGINT)operator(,) string<delimiter(')con comment(// -----------------------------) reserved(declare)operator(()ident(ticks) operator(=) integer(1)operator(\))operator(;) -local_variable($interrupted) operator(=) reserved(false)operator(;) +local_variable($interrupted) operator(=) pre_constant(false)operator(;) reserved(function) ident(got_int)operator(()local_variable($signal)operator(\)) operator({) reserved(global) local_variable($interrupted)operator(;) - local_variable($interrupted) operator(=) reserved(true)operator(;) + local_variable($interrupted) operator(=) pre_constant(true)operator(;) comment(// The third argument to pcntl_signal(\) determines if system calls) comment(// should be restarted after a signal. It defaults to true.) - ident(pcntl_signal)operator(()constant(SIGINT)operator(,) string<delimiter(')content(got_int)delimiter(')>operator(,) reserved(false)operator(\))operator(;) comment(// or SIG_IGN) + ident(pcntl_signal)operator(()constant(SIGINT)operator(,) string<delimiter(')content(got_int)delimiter(')>operator(,) pre_constant(false)operator(\))operator(;) comment(// or SIG_IGN) operator(}) -ident(pcntl_signal)operator(()constant(SIGINT)operator(,) string<delimiter(')content(got_int)delimiter(')>operator(,) reserved(false)operator(\))operator(;) +ident(pcntl_signal)operator(()constant(SIGINT)operator(,) string<delimiter(')content(got_int)delimiter(')>operator(,) pre_constant(false)operator(\))operator(;) comment(// ... long-running code that you don't want to restart) @@ -5500,11 +5500,11 @@ comment(// PHP does not support sigprocmask(\).) comment(// @@PLEAC@@_16.21) reserved(declare)operator(()ident(ticks) operator(=) integer(1)operator(\))operator(;) -local_variable($aborted) operator(=) reserved(false)operator(;) +local_variable($aborted) operator(=) pre_constant(false)operator(;) reserved(function) ident(handle_alarm)operator(()local_variable($signal)operator(\)) operator({) reserved(global) local_variable($aborted)operator(;) - local_variable($aborted) operator(=) reserved(true)operator(;) + local_variable($aborted) operator(=) pre_constant(true)operator(;) operator(}) ident(pcntl_signal)operator(()constant(SIGALRM)operator(,) string<delimiter(')content(handle_alarm)delimiter(')>operator(\))operator(;) diff --git a/test/scanners/php/test.expected.raydebug b/test/scanners/php/test.expected.raydebug index de71c60..b6bdc9b 100644 --- a/test/scanners/php/test.expected.raydebug +++ b/test/scanners/php/test.expected.raydebug @@ -1,46 +1,46 @@ inline_delimiter(<?php) -comment(/*)comment(*) -comment( * Zip class file) -comment( *) -comment( * @package fnord.bb) -comment( * @subpackage archive) -comment( )comment(*/) +comment(/** + * Zip class file + * + * @package fnord.bb + * @subpackage archive + */) comment(// Unlock?) -reserved(if)operator(()operator(!)predefined(defined)operator(()string<delimiter(')content(UNLOCK)delimiter(')>operator(\)) operator(|)operator(|) operator(!)constant(UNLOCK)operator(\)) +reserved(if)operator(()operator(!)predefined(defined)operator(()string<delimiter(')content(UNLOCK)delimiter(')>operator(\)) operator(||) operator(!)constant(UNLOCK)operator(\)) predefined(die)operator(()operator(\))operator(;) comment(// Load the parent archive class) predefined(require_once)operator(()constant(ROOT_PATH)operator(.)string<delimiter(')content(/classes/archive.class.php)delimiter(')>operator(\))operator(;) -comment(/*)comment(*) -comment( * Zip class) -comment( *) -comment( * @author Manni <manni@fnord.name>) -comment( * @copyright Copyright (c\) 2006, Manni) -comment( * @version 1.0) -comment( * @link http://www.pkware.com/business_and_developers/developer/popups/appnote.txt) -comment( * @link http://mannithedark.is-a-geek.net/) -comment( * @since 1.0) -comment( * @package fnord.bb) -comment( * @subpackage archive) -comment( )comment(*/) +comment(/** + * Zip class + * + * @author Manni <manni@fnord.name> + * @copyright Copyright (c\) 2006, Manni + * @version 1.0 + * @link http://www.pkware.com/business_and_developers/developer/popups/appnote.txt + * @link http://mannithedark.is-a-geek.net/ + * @since 1.0 + * @package fnord.bb + * @subpackage archive + */) reserved(class) constant(Zip) reserved(extends) constant(Archive) operator({) - comment(/*)comment(*) -comment( * Outputs the zip file) -comment( *) -comment( * This function creates the zip file with the dirs and files given.) -comment( * If the optional parameter $file is given, the zip file is will be) -comment( * saved at that location. Otherwise the function returns the zip file's content.) -comment( *) -comment( * @access public) -comment( *) -comment( * @link http://www.pkware.com/business_and_developers/developer/popups/appnote.txt) -comment( * @param string $filename The path where the zip file will be saved) -comment( *) -comment( * @return bool|string Returns either true if the fil is sucessfully created or the content of the zip file) -comment( )comment(*/) - reserved(function) ident(out)operator(()local_variable($filename) operator(=) reserved(false)operator(\)) operator({) + comment(/** + * Outputs the zip file + * + * This function creates the zip file with the dirs and files given. + * If the optional parameter $file is given, the zip file is will be + * saved at that location. Otherwise the function returns the zip file's content. + * + * @access public + * + * @link http://www.pkware.com/business_and_developers/developer/popups/appnote.txt + * @param string $filename The path where the zip file will be saved + * + * @return bool|string Returns either true if the fil is sucessfully created or the content of the zip file + */) + reserved(function) ident(out)operator(()local_variable($filename) operator(=) pre_constant(false)operator(\)) operator({) comment(// Empty output) local_variable($file_data) operator(=) predefined(array)operator(()operator(\))operator(;) comment(// Data of the file part) local_variable($cd_data) operator(=) predefined(array)operator(()operator(\))operator(;) comment(// Data of the central directory) @@ -51,35 +51,35 @@ comment( )comment(*/) comment(// Handle dirs) reserved(foreach)operator(()local_variable($this)operator(->)ident(dirs) reserved(as) local_variable($dir)operator(\)) operator({) - local_variable($dir) operator(.)operator(=) string<delimiter(')content(/)delimiter(')>operator(;) + local_variable($dir) operator(.=) string<delimiter(')content(/)delimiter(')>operator(;) comment(// File part) comment(// Reset dir data) local_variable($dir_data) operator(=) string<delimiter(')delimiter(')>operator(;) comment(// Local file header) - local_variable($dir_data) operator(.)operator(=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x03)char(\\x04)delimiter(")>operator(;) comment(// Local file header signature) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(10)operator(\))operator(;) comment(// Version needed to extract) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compression method) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// crc-32) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($dir)operator(\))operator(\))operator(;) comment(// File name length) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Extra field length) - - local_variable($dir_data) operator(.)operator(=) local_variable($dir)operator(;) comment(// File name) - local_variable($dir_data) operator(.)operator(=) string<delimiter(')delimiter(')>operator(;) comment(// Extra field (is empty\)) + local_variable($dir_data) operator(.=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x03)char(\\x04)delimiter(")>operator(;) comment(// Local file header signature) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(10)operator(\))operator(;) comment(// Version needed to extract) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compression method) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// crc-32) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($dir)operator(\))operator(\))operator(;) comment(// File name length) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Extra field length) + + local_variable($dir_data) operator(.=) local_variable($dir)operator(;) comment(// File name) + local_variable($dir_data) operator(.=) string<delimiter(')delimiter(')>operator(;) comment(// Extra field (is empty\)) comment(// File data) - local_variable($dir_data) operator(.)operator(=) string<delimiter(')delimiter(')>operator(;) comment(// Dirs have no file data) + local_variable($dir_data) operator(.=) string<delimiter(')delimiter(')>operator(;) comment(// Dirs have no file data) comment(// Data descriptor) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// crc-32) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// crc-32) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) comment(// Save current offset) local_variable($offset) operator(=) predefined(strlen)operator(()predefined(implode)operator(()string<delimiter(')delimiter(')>operator(,) local_variable($file_data)operator(\))operator(\))operator(;) @@ -93,34 +93,34 @@ comment( )comment(*/) local_variable($dir_data) operator(=) string<delimiter(')delimiter(')>operator(;) comment(// File header) - local_variable($dir_data) operator(.)operator(=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x01)char(\\x02)delimiter(")>operator(;) comment(// Local file header signature) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Version made by) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(10)operator(\))operator(;) comment(// Version needed to extract) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compression method) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// crc-32) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($dir)operator(\))operator(\))operator(;) comment(// File name length) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Extra field length) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// File comment length) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Disk number start) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Internal file attributes) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(16)operator(\))operator(;) comment(// External file attributes) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) local_variable($offset)operator(\))operator(;) comment(// Relative offset of local header) - - local_variable($dir_data) operator(.)operator(=) local_variable($dir)operator(;) comment(// File name) - local_variable($dir_data) operator(.)operator(=) string<delimiter(')delimiter(')>operator(;) comment(// Extra field (is empty\)) - local_variable($dir_data) operator(.)operator(=) string<delimiter(')delimiter(')>operator(;) comment(// File comment (is empty\)) - - comment(/*) -comment( // Data descriptor) -comment( $dir_data .= pack("V", 0\); // crc-32) -comment( $dir_data .= pack("V", 0\); // Compressed size) -comment( $dir_data .= pack("V", 0\); // Uncompressed size) -comment( )comment(*/) + local_variable($dir_data) operator(.=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x01)char(\\x02)delimiter(")>operator(;) comment(// Local file header signature) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Version made by) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(10)operator(\))operator(;) comment(// Version needed to extract) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compression method) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// crc-32) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Compressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($dir)operator(\))operator(\))operator(;) comment(// File name length) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Extra field length) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// File comment length) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Disk number start) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Internal file attributes) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(16)operator(\))operator(;) comment(// External file attributes) + local_variable($dir_data) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) local_variable($offset)operator(\))operator(;) comment(// Relative offset of local header) + + local_variable($dir_data) operator(.=) local_variable($dir)operator(;) comment(// File name) + local_variable($dir_data) operator(.=) string<delimiter(')delimiter(')>operator(;) comment(// Extra field (is empty\)) + local_variable($dir_data) operator(.=) string<delimiter(')delimiter(')>operator(;) comment(// File comment (is empty\)) + + comment(/* + // Data descriptor + $dir_data .= pack("V", 0\); // crc-32 + $dir_data .= pack("V", 0\); // Compressed size + $dir_data .= pack("V", 0\); // Uncompressed size + */) comment(// Append dir data to the central directory data) local_variable($cd_data)operator([)operator(]) operator(=) local_variable($dir_data)operator(;) @@ -160,28 +160,28 @@ comment( )comment(*/) operator(}) comment(// Local file header) - local_variable($fd) operator(.)operator(=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x03)char(\\x04)delimiter(")>operator(;) comment(// Local file header signature) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(20)operator(\))operator(;) comment(// Version needed to extract) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) local_variable($method)operator(\))operator(;) comment(// Compression method) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($name)operator(\))operator(\))operator(;) comment(// File name length) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Extra field length) - - local_variable($fd) operator(.)operator(=) local_variable($name)operator(;) comment(// File name) - local_variable($fd) operator(.)operator(=) string<delimiter(')delimiter(')>operator(;) comment(// Extra field (is empty\)) + local_variable($fd) operator(.=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x03)char(\\x04)delimiter(")>operator(;) comment(// Local file header signature) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(20)operator(\))operator(;) comment(// Version needed to extract) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) local_variable($method)operator(\))operator(;) comment(// Compression method) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($name)operator(\))operator(\))operator(;) comment(// File name length) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Extra field length) + + local_variable($fd) operator(.=) local_variable($name)operator(;) comment(// File name) + local_variable($fd) operator(.=) string<delimiter(')delimiter(')>operator(;) comment(// Extra field (is empty\)) comment(// File data) - local_variable($fd) operator(.)operator(=) local_variable($compressed_data)operator(;) + local_variable($fd) operator(.=) local_variable($compressed_data)operator(;) comment(// Data descriptor) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) comment(// Save current offset) local_variable($offset) operator(=) predefined(strlen)operator(()predefined(implode)operator(()string<delimiter(')delimiter(')>operator(,) local_variable($file_data)operator(\))operator(\))operator(;) @@ -195,34 +195,34 @@ comment( )comment(*/) local_variable($fd) operator(=) string<delimiter(')delimiter(')>operator(;) comment(// File header) - local_variable($fd) operator(.)operator(=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x01)char(\\x02)delimiter(")>operator(;) comment(// Local file header signature) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Version made by) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(20)operator(\))operator(;) comment(// Version needed to extract) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) local_variable($method)operator(\))operator(;) comment(// Compression method) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($name)operator(\))operator(\))operator(;) comment(// File name length) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Extra field length) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// File comment length) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Disk number start) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Internal file attributes) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(32)operator(\))operator(;) comment(// External file attributes) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) local_variable($offset)operator(\))operator(;) comment(// Relative offset of local header) - - local_variable($fd) operator(.)operator(=) local_variable($name)operator(;) comment(// File name) - local_variable($fd) operator(.)operator(=) string<delimiter(')delimiter(')>operator(;) comment(// Extra field (is empty\)) - local_variable($fd) operator(.)operator(=) string<delimiter(')delimiter(')>operator(;) comment(// File comment (is empty\)) - - comment(/*) -comment( // Data descriptor) -comment( $fd .= pack("V", crc32($content\)\); // crc-32) -comment( $fd .= pack("V", strlen($compressed_data\)\); // Compressed size) -comment( $fd .= pack("V", strlen($content\)\); // Uncompressed size) -comment( )comment(*/) + local_variable($fd) operator(.=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x01)char(\\x02)delimiter(")>operator(;) comment(// Local file header signature) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Version made by) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(20)operator(\))operator(;) comment(// Version needed to extract) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) local_variable($method)operator(\))operator(;) comment(// Compression method) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($name)operator(\))operator(\))operator(;) comment(// File name length) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Extra field length) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// File comment length) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Disk number start) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Internal file attributes) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) integer(32)operator(\))operator(;) comment(// External file attributes) + local_variable($fd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) local_variable($offset)operator(\))operator(;) comment(// Relative offset of local header) + + local_variable($fd) operator(.=) local_variable($name)operator(;) comment(// File name) + local_variable($fd) operator(.=) string<delimiter(')delimiter(')>operator(;) comment(// Extra field (is empty\)) + local_variable($fd) operator(.=) string<delimiter(')delimiter(')>operator(;) comment(// File comment (is empty\)) + + comment(/* + // Data descriptor + $fd .= pack("V", crc32($content\)\); // crc-32 + $fd .= pack("V", strlen($compressed_data\)\); // Compressed size + $fd .= pack("V", strlen($content\)\); // Uncompressed size + */) comment(// Append file data to the central directory data) local_variable($cd_data)operator([)operator(]) operator(=) local_variable($fd)operator(;) @@ -230,9 +230,9 @@ comment( )comment(*/) comment(// Digital signature) local_variable($digital_signature) operator(=) string<delimiter(')delimiter(')>operator(;) - local_variable($digital_signature) operator(.)operator(=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x05)char(\\x05)delimiter(")>operator(;) comment(// Header signature) - local_variable($digital_signature) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Size of data) - local_variable($digital_signature) operator(.)operator(=) string<delimiter(')delimiter(')>operator(;) comment(// Signature data (is empty\)) + local_variable($digital_signature) operator(.=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x05)char(\\x05)delimiter(")>operator(;) comment(// Header signature) + local_variable($digital_signature) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Size of data) + local_variable($digital_signature) operator(.=) string<delimiter(')delimiter(')>operator(;) comment(// Signature data (is empty\)) local_variable($tmp_file_data) operator(=) predefined(implode)operator(()string<delimiter(')delimiter(')>operator(,) local_variable($file_data)operator(\))operator(;) comment(// File data) local_variable($tmp_cd_data) operator(=) predefined(implode)operator(()string<delimiter(')delimiter(')>operator(,) local_variable($cd_data)operator(\))operator(.) comment(// Central directory) @@ -240,15 +240,15 @@ comment( )comment(*/) comment(// End of central directory) local_variable($eof_cd) operator(=) string<delimiter(')delimiter(')>operator(;) - local_variable($eof_cd) operator(.)operator(=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x05)char(\\x06)delimiter(")>operator(;) comment(// End of central dir signature) - local_variable($eof_cd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Number of this disk) - local_variable($eof_cd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Number of the disk with the start of the central directory) - local_variable($eof_cd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(count)operator(()local_variable($cd_data)operator(\))operator(\))operator(;) comment(// Total number of entries in the central directory on this disk) - local_variable($eof_cd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(count)operator(()local_variable($cd_data)operator(\))operator(\))operator(;) comment(// Total number of entries in the central directory) - local_variable($eof_cd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($tmp_cd_data)operator(\))operator(\))operator(;) comment(// Size of the central directory) - local_variable($eof_cd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($tmp_file_data)operator(\))operator(\))operator(;) comment(// Offset of start of central directory with respect to the starting disk number) - local_variable($eof_cd) operator(.)operator(=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// .ZIP file comment length) - local_variable($eof_cd) operator(.)operator(=) string<delimiter(')delimiter(')>operator(;) comment(// .ZIP file comment (is empty\)) + local_variable($eof_cd) operator(.=) string<delimiter(")char(\\x50)char(\\x4b)char(\\x05)char(\\x06)delimiter(")>operator(;) comment(// End of central dir signature) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Number of this disk) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// Number of the disk with the start of the central directory) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(count)operator(()local_variable($cd_data)operator(\))operator(\))operator(;) comment(// Total number of entries in the central directory on this disk) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) predefined(count)operator(()local_variable($cd_data)operator(\))operator(\))operator(;) comment(// Total number of entries in the central directory) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($tmp_cd_data)operator(\))operator(\))operator(;) comment(// Size of the central directory) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()string<delimiter(")content(V)delimiter(")>operator(,) predefined(strlen)operator(()local_variable($tmp_file_data)operator(\))operator(\))operator(;) comment(// Offset of start of central directory with respect to the starting disk number) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()string<delimiter(")content(v)delimiter(")>operator(,) integer(0)operator(\))operator(;) comment(// .ZIP file comment length) + local_variable($eof_cd) operator(.=) string<delimiter(')delimiter(')>operator(;) comment(// .ZIP file comment (is empty\)) comment(// Content of the zip file) local_variable($data) operator(=) local_variable($tmp_file_data)operator(.) @@ -258,53 +258,53 @@ comment( )comment(*/) comment(// Return content?) reserved(if)operator(()operator(!)local_variable($filename)operator(\)) - predefined(return) local_variable($data)operator(;) + reserved(return) local_variable($data)operator(;) comment(// Write to file) - predefined(return) predefined(file_put_contents)operator(()local_variable($filename)operator(,) local_variable($data)operator(\))operator(;) + reserved(return) predefined(file_put_contents)operator(()local_variable($filename)operator(,) local_variable($data)operator(\))operator(;) operator(}) - comment(/*)comment(*) -comment( * Load a zip file) -comment( *) -comment( * This function loads the files and dirs from a zip file from the harddrive.) -comment( *) -comment( * @access public) -comment( *) -comment( * @param string $file The path to the zip file) -comment( * @param bool $reset Reset the files and dirs before adding the zip file's content?) -comment( *) -comment( * @return bool Returns true if the file was loaded sucessfully) -comment( )comment(*/) - reserved(function) predefined(load_file)operator(()local_variable($file)operator(,) local_variable($reset) operator(=) reserved(true)operator(\)) operator({) + comment(/** + * Load a zip file + * + * This function loads the files and dirs from a zip file from the harddrive. + * + * @access public + * + * @param string $file The path to the zip file + * @param bool $reset Reset the files and dirs before adding the zip file's content? + * + * @return bool Returns true if the file was loaded sucessfully + */) + reserved(function) predefined(load_file)operator(()local_variable($file)operator(,) local_variable($reset) operator(=) pre_constant(true)operator(\)) operator({) comment(// Check whether the file exists) reserved(if)operator(()operator(!)predefined(file_exists)operator(()local_variable($file)operator(\))operator(\)) - predefined(return) reserved(false)operator(;) + reserved(return) pre_constant(false)operator(;) comment(// Load the files content) local_variable($content) operator(=) operator(@)predefined(file_get_contents)operator(()local_variable($file)operator(\))operator(;) comment(// Return false if the file cannot be opened) reserved(if)operator(()operator(!)local_variable($content)operator(\)) - predefined(return) reserved(false)operator(;) + reserved(return) pre_constant(false)operator(;) comment(// Read the zip) - predefined(return) local_variable($this)operator(->)ident(load_string)operator(()local_variable($content)operator(,) local_variable($reset)operator(\))operator(;) + reserved(return) local_variable($this)operator(->)ident(load_string)operator(()local_variable($content)operator(,) local_variable($reset)operator(\))operator(;) operator(}) - comment(/*)comment(*) -comment( * Load a zip string) -comment( *) -comment( * This function loads the files and dirs from a string) -comment( *) -comment( * @access public) -comment( *) -comment( * @param string $string The string the zip is generated from) -comment( * @param bool $reset Reset the files and dirs before adding the zip file's content?) -comment( *) -comment( * @return bool Returns true if the string was loaded sucessfully) -comment( )comment(*/) - reserved(function) ident(load_string)operator(()local_variable($string)operator(,) local_variable($reset) operator(=) reserved(true)operator(\)) operator({) + comment(/** + * Load a zip string + * + * This function loads the files and dirs from a string + * + * @access public + * + * @param string $string The string the zip is generated from + * @param bool $reset Reset the files and dirs before adding the zip file's content? + * + * @return bool Returns true if the string was loaded sucessfully + */) + reserved(function) ident(load_string)operator(()local_variable($string)operator(,) local_variable($reset) operator(=) pre_constant(true)operator(\)) operator({) comment(// Reset the zip?) reserved(if)operator(()local_variable($reset)operator(\)) operator({) local_variable($this)operator(->)ident(dirs) operator(=) predefined(array)operator(()operator(\))operator(;) @@ -315,7 +315,7 @@ comment( )comment(*/) local_variable($start) operator(=) predefined(strpos)operator(()local_variable($string)operator(,) string<delimiter(")char(\\x50)char(\\x4b)char(\\x05)char(\\x06)delimiter(")>operator(\))operator(;) comment(// Error) - reserved(if)operator(()local_variable($start) operator(===) reserved(false)operator(\)) + reserved(if)operator(()local_variable($start) operator(===) pre_constant(false)operator(\)) predefined(die)operator(()string<delimiter(')content(Could not find the end of central directory record)delimiter(')>operator(\))operator(;) comment(// Get the ecdr) @@ -385,28 +385,28 @@ comment( )comment(*/) comment(// Valid header?) reserved(if)operator(()local_variable($header_info)operator([)string<delimiter(')content(header)delimiter(')>operator(]) operator(!=) integer(33639248)operator(\)) - predefined(return) reserved(false)operator(;) + reserved(return) pre_constant(false)operator(;) comment(// New position) - local_variable($pos) operator(+)operator(=) integer(46)operator(;) + local_variable($pos) operator(+=) integer(46)operator(;) comment(// Read out the file name) local_variable($header_info)operator([)string<delimiter(')content(name)delimiter(')>operator(]) operator(=) predefined(substr)operator(()local_variable($cdr)operator(,) local_variable($pos)operator(,) local_variable($header_info)operator([)string<delimiter(')content(name_length)delimiter(')>operator(])operator(\))operator(;) comment(// New position) - local_variable($pos) operator(+)operator(=) local_variable($header_info)operator([)string<delimiter(')content(name_length)delimiter(')>operator(])operator(;) + local_variable($pos) operator(+=) local_variable($header_info)operator([)string<delimiter(')content(name_length)delimiter(')>operator(])operator(;) comment(// Read out the extra stuff) local_variable($header_info)operator([)string<delimiter(')content(extra)delimiter(')>operator(]) operator(=) predefined(substr)operator(()local_variable($cdr)operator(,) local_variable($pos)operator(,) local_variable($header_info)operator([)string<delimiter(')content(extra_length)delimiter(')>operator(])operator(\))operator(;) comment(// New position) - local_variable($pos) operator(+)operator(=) local_variable($header_info)operator([)string<delimiter(')content(extra_length)delimiter(')>operator(])operator(;) + local_variable($pos) operator(+=) local_variable($header_info)operator([)string<delimiter(')content(extra_length)delimiter(')>operator(])operator(;) comment(// Read out the comment) local_variable($header_info)operator([)string<delimiter(')content(comment)delimiter(')>operator(]) operator(=) predefined(substr)operator(()local_variable($cdr)operator(,) local_variable($pos)operator(,) local_variable($header_info)operator([)string<delimiter(')content(comment_length)delimiter(')>operator(])operator(\))operator(;) comment(// New position) - local_variable($pos) operator(+)operator(=) local_variable($header_info)operator([)string<delimiter(')content(comment_length)delimiter(')>operator(])operator(;) + local_variable($pos) operator(+=) local_variable($header_info)operator([)string<delimiter(')content(comment_length)delimiter(')>operator(])operator(;) comment(// Append this file/dir to the entry list) local_variable($entries)operator([)operator(]) operator(=) local_variable($header_info)operator(;) @@ -414,7 +414,7 @@ comment( )comment(*/) comment(// Check whether all entries where read sucessfully) reserved(if)operator(()predefined(count)operator(()local_variable($entries)operator(\)) operator(!=) local_variable($cd_entries)operator(\)) - predefined(return) reserved(false)operator(;) + reserved(return) pre_constant(false)operator(;) comment(// Handle files/dirs) reserved(foreach)operator(()local_variable($entries) reserved(as) local_variable($entry)operator(\)) operator({) @@ -443,7 +443,7 @@ comment( )comment(*/) comment(// Valid header?) reserved(if)operator(()local_variable($header_info)operator([)string<delimiter(')content(header)delimiter(')>operator(]) operator(!=) integer(67324752)operator(\)) - predefined(return) reserved(false)operator(;) + reserved(return) pre_constant(false)operator(;) comment(// Get content start position) local_variable($start) operator(=) local_variable($entry)operator([)string<delimiter(')content(offset)delimiter(')>operator(]) operator(+) integer(30) operator(+) local_variable($header_info)operator([)string<delimiter(')content(name_length)delimiter(')>operator(]) operator(+) local_variable($header_info)operator([)string<delimiter(')content(extra_length)delimiter(')>operator(])operator(;) @@ -462,7 +462,7 @@ comment( )comment(*/) comment(// Gzip) reserved(case) integer(8)operator(:) reserved(if)operator(()operator(!)predefined(function_exists)operator(()string<delimiter(')content(gzinflate)delimiter(')>operator(\))operator(\)) - predefined(return) reserved(false)operator(;) + reserved(return) pre_constant(false)operator(;) comment(// Uncompress data) local_variable($content) operator(=) predefined(gzinflate)operator(()local_variable($data)operator(\))operator(;) @@ -471,7 +471,7 @@ comment( )comment(*/) comment(// Bzip2) reserved(case) integer(12)operator(:) reserved(if)operator(()operator(!)predefined(function_exists)operator(()string<delimiter(')content(bzdecompress)delimiter(')>operator(\))operator(\)) - predefined(return) reserved(false)operator(;) + reserved(return) pre_constant(false)operator(;) comment(// Decompress data) local_variable($content) operator(=) predefined(bzdecompress)operator(()local_variable($data)operator(\))operator(;) @@ -479,20 +479,20 @@ comment( )comment(*/) comment(// Compression not supported -> error) reserved(default)operator(:) - predefined(return) reserved(false)operator(;) + reserved(return) pre_constant(false)operator(;) operator(}) comment(// Try to add file) reserved(if)operator(()operator(!)local_variable($this)operator(->)ident(add_file)operator(()local_variable($entry)operator([)string<delimiter(')content(name)delimiter(')>operator(])operator(,) local_variable($content)operator(\))operator(\)) - predefined(return) reserved(false)operator(;) + reserved(return) pre_constant(false)operator(;) operator(}) - predefined(return) reserved(true)operator(;) + reserved(return) pre_constant(true)operator(;) operator(}) operator(}) reserved(function) operator(&)ident(byref)operator(()operator(\)) operator({) local_variable($x) operator(=) predefined(array)operator(()operator(\))operator(;) - predefined(return) local_variable($x)operator(;) + reserved(return) local_variable($x)operator(;) operator(}) inline_delimiter(?>) |