From a40476dc4a91737182f78fe939e1d91bd644ea99 Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 22 Apr 2009 01:05:21 +0000 Subject: Lots of improvements for the PHP scanner. --- lib/coderay/scanners/php.rb | 231 ++++++----- test/scanners/php/pleac.expected.raydebug | 650 +++++++++++++++--------------- 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 = /<<> & | ^ . % - ! - - 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 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(=) stringoperator(;) comment(# two characters, \\ and an n) -local_variable($string) operator(=) stringoperator(;) comment(# literal single quotes) +local_variable($string) operator(=) stringoperator(;) comment(# literal single quotes) local_variable($string) operator(=) stringoperator(;) comment(# literal double quotes) comment(#-----------------------------) local_variable($string) operator(=) stringoperator(;) comment(# a "newline" character) @@ -104,11 +104,11 @@ reserved(function) ident(cut2fmt)operator(()operator(\)) operator({) local_variable($template) operator(=) stringoperator(;) 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 operator(.) operator(()local_variable($place) operator(-) local_variable($lastpos)operator(\)) operator(.) stringoperator(;) + local_variable($template) operator(.=) string operator(.) operator(()local_variable($place) operator(-) local_variable($lastpos)operator(\)) operator(.) stringoperator(;) local_variable($lastpos) operator(=) local_variable($place)operator(;) operator(}) - local_variable($template) operator(.)operator(=) stringoperator(;) - predefined(return) local_variable($template)operator(;) + local_variable($template) operator(.=) stringoperator(;) + 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(=) stringoperator(;) +local_variable($foo) operator(=) local_variable($bar) operator(||) local_variable($foo) operator(=) stringoperator(;) comment(#-----------------------------) -local_variable($dir) operator(=) predefined(array_shift)operator(()local_variable($_SERVER)operator([)stringoperator(])operator(\)) operator(|)operator(|) local_variable($dir) operator(=) stringoperator(;) +local_variable($dir) operator(=) predefined(array_shift)operator(()local_variable($_SERVER)operator([)stringoperator(])operator(\)) operator(||) local_variable($dir) operator(=) stringoperator(;) comment(#-----------------------------) -local_variable($dir) operator(=) local_variable($_SERVER)operator([)stringoperator(])operator([)integer(0)operator(]) operator(|)operator(|) local_variable($dir) operator(=) stringoperator(;) +local_variable($dir) operator(=) local_variable($_SERVER)operator([)stringoperator(])operator([)integer(0)operator(]) operator(||) local_variable($dir) operator(=) stringoperator(;) comment(#-----------------------------) local_variable($dir) operator(=) predefined(defined)operator(()local_variable($_SERVER)operator([)stringoperator(])operator([)integer(0)operator(])operator(\)) operator(?) predefined(array_shift)operator(()local_variable($_SERVER)operator([)stringoperator(])operator(\)) operator(:) stringoperator(;) 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([)stringoperator(]) - operator(|)operator(|) local_variable($user) operator(=) local_variable($_ENV)operator([)stringoperator(]) - 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(=) stringoperator(;) + operator(||) local_variable($user) operator(=) local_variable($_ENV)operator([)stringoperator(]) + 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(=) stringoperator(;) comment(#-----------------------------) -local_variable($starting_point) operator(|)operator(|) local_variable($starting_point) operator(=) stringoperator(;) +local_variable($starting_point) operator(||) local_variable($starting_point) operator(=) stringoperator(;) 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(()stringoperator(,) 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) stringoperator(;) 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(,) stringoperator(\))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(()stringoperator(,) predefined(fgets)operator(()local_variable($handle)operator(\))operator(\))operator(\))operator(\))operator(;) + local_variable($checksum) operator(+=) operator(()predefined(array_sum)operator(()predefined(unpack)operator(()stringoperator(,) 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) stringoperator(;) comment(# @@INCLUDE@@ include/php/slowcat.php) @@ -296,7 +296,7 @@ local_variable($text) operator(=) predefined(preg_replace)operator(()stringoperator(,)stringoperator(,) local_variable($text)operator(\))operator(;) +local_variable($text) operator(=) predefined(preg_replace)operator(()stringoperator(,)stringoperator(,) 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(()stringoperator(,) stringoperator(,) local_variable($var)operator(\))operator(;) +local_variable($var) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) local_variable($var)operator(\))operator(;) comment(// double) local_variable($var) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) local_variable($var)operator(\))operator(;) comment(#-----------------------------) local_variable($var) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) local_variable($var)operator(\))operator(;) comment(#-----------------------------) -local_variable($string) operator(=) stringoperator(;) -local_variable($string) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) local_variable($string)operator(\))operator(;) +local_variable($string) operator(=) stringoperator(;) +local_variable($string) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) local_variable($string)operator(\))operator(;) comment(// in PHP you can also use the addslashes(\) function) comment(#-----------------------------) -local_variable($string) operator(=) stringoperator(;) -local_variable($string) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) local_variable($string)operator(\))operator(;) +local_variable($string) operator(=) stringoperator(;) +local_variable($string) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) local_variable($string)operator(\))operator(;) comment(#-----------------------------) -local_variable($string) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) local_variable($string)operator(\))operator(;) +local_variable($string) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) local_variable($string)operator(\))operator(;) comment(#-----------------------------) comment(// PHP does not have the \\Q and \\E string metacharacters) local_variable($string) operator(=) stringoperator(;) comment(// PHP's quotemeta(\) function is not the same as perl's quotemeta(\) function) -local_variable($string) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) stringoperator(\))operator(;) +local_variable($string) operator(=) predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) stringoperator(\))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(()stringoperator(,) stringoperator(,) 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(()stringoperator(,) 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) stringoperator(;) @@ -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(()stringoperator(,) local_variable($fullname)operator(,) local_variable($matches)operator(\))operator(;) + predefined(preg_match)operator(()stringoperator(,) 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(()stringoperator(,) 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(=) stringoperator(;) -predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(&)operator(&) predefined(die)operator(()stringoperator(\))operator(;) -predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) -predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) -predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) -predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) -predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) -predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(&&) predefined(die)operator(()stringoperator(\))operator(;) +predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()stringoperator(\))operator(;) +predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()stringoperator(\))operator(;) +predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()stringoperator(\))operator(;) +predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()stringoperator(\))operator(;) +predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()stringoperator(\))operator(;) +predefined(preg_match)operator(()stringoperator(,) local_variable($s)operator(\)) operator(||) predefined(die)operator(()stringoperator(\))operator(;) comment(// ----------------------------) reserved(function) ident(getnum)operator(()local_variable($s)operator(\)) operator({) - predefined(sscanf)operator(()local_variable($s)operator(,) stringoperator(,) 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(,) stringoperator(,) 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(.) stringoperator(;) 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) stringoperator(;) +predefined(echo) stringchar(\\n)content(Rounded: )inlinechar(\\n)delimiter(")>operator(;) local_variable($a) operator(=) float(0.255)operator(;) local_variable($b) operator(=) predefined(sprintf)operator(()stringoperator(,) local_variable($a)operator(\))operator(;) -predefined(echo) stringoperator(;) +predefined(echo) stringchar(\\n)content(Rounded: )inlinechar(\\n)delimiter(")>operator(;) local_variable($a) operator(=) float(0.255)operator(;) predefined(printf)operator(()stringoperator(,) 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) stringoperator(;) reserved(foreach)operator(()predefined(range)operator(()integer(0)operator(,) integer(2)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) stringoperator(;) -predefined(echo) stringoperator(;) reserved(foreach)operator(()predefined(range)operator(()integer(3)operator(,) integer(4)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) stringoperator(;) -predefined(echo) stringoperator(;) reserved(foreach)operator(()predefined(range)operator(()integer(5)operator(,) integer(12)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) stringoperator(;) +predefined(echo) stringoperator(;) reserved(foreach)operator(()predefined(range)operator(()integer(0)operator(,) integer(2)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) stringchar(\\n)delimiter(")>operator(;) +predefined(echo) stringoperator(;) reserved(foreach)operator(()predefined(range)operator(()integer(3)operator(,) integer(4)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) stringchar(\\n)delimiter(")>operator(;) +predefined(echo) stringoperator(;) reserved(foreach)operator(()predefined(range)operator(()integer(5)operator(,) integer(12)operator(\)) reserved(as) local_variable($i)operator(\)) predefined(echo) stringchar(\\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(=) stringoperator(;) 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(()stringoperator(,) 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(,) stringoperator(,) stringoperator(\))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(,) stringoperator(,) stringoperator(\))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(()stringoperator(,) stringoperator(,) predefined(strrev)operator(()local_variable($s)operator(\))operator(\))operator(\))operator(;) + reserved(return) predefined(strrev)operator(()predefined(preg_replace)operator(()stringoperator(,) stringoperator(,) 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 operator(,) local_variable($plural)operator(=)stringoperator(\)) 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(()stringoperator(,) 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 operator(=>) integer(1)operator(,) string operator(=>) integer(60)operator(,) string operator(=>) integer(3600)operator(,) string operator(=>) integer(86400)operator(,) string 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(()stringoperator(,) 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(()stringoperator(,) local_variable($today)operator([)stringoperator(])operator(\))operator(;) comment(// @@PLEAC@@_3.1) @@ -986,14 +986,14 @@ local_variable($year) operator(=) local_variable($today)operator([)stringoperator(;) +predefined(echo) stringinlineinlineinlineinlinechar(\\n)delimiter(")>operator(;) comment(// or simply concatenate:) predefined(echo) string operator(.) local_variable($year) operator(.) constant(SEP) operator(.) local_variable($month) operator(.) constant(SEP) operator(.) local_variable($day) operator(.) stringoperator(;) 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([)stringoperator(])operator(;) local_variable($month) operator(=) local_variable($today)operator([)stringoperator(]) operator(+) integer(1)operator(;) @@ -1007,7 +1007,7 @@ local_variable($format) operator(=) string o local_variable($today) operator(=) predefined(date)operator(()local_variable($format)operator(\))operator(;) -predefined(echo) stringoperator(;) +predefined(echo) stringchar(\\n)delimiter(")>operator(;) comment(// ------------) @@ -1015,7 +1015,7 @@ local_variable($sep) operator(=) constant(SEP)operator(;) local_variable($today) operator(=) predefined(strftime)operator(()stringoperator(\))operator(;) -predefined(echo) stringoperator(;) +predefined(echo) stringchar(\\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(()stringoperator(,) local_variable($birthtime)operator(\)) operator(+) local_variable($yroff)operator(;) local_variable($mon) operator(=) predefined(date)operator(()stringoperator(,) local_variable($birthtime)operator(\)) operator(+) local_variable($monoff)operator(;) @@ -1100,7 +1100,7 @@ local_variable($min) operator(=) predefined(date)operator(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(\))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(()stringoperator(])operator(})content( in week )operator({)local_variable($weeknumber)operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) stringinlineinlineinlineinlinecontent( was a )inlineoperator(])delimiter(})>content( in week )inlinechar(\\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 operator(.) local_variable($date)operator([)stringoperator(]) @@ -1231,7 +1231,7 @@ operator({) operator(}) reserved(else) operator({) - predefined(echo) stringoperator(])operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) stringoperator(])delimiter(})>char(\\n)delimiter(")>operator(;) operator(}) operator(}) reserved(else) @@ -1264,22 +1264,22 @@ predefined(strftime)operator(()string comment(// ----------------------------) comment(// 'mktime' creates a local time timestamp) -local_variable($t) operator(=) predefined(strftime)operator(()stringoperator(,) 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) stringoperator(;) +local_variable($t) operator(=) predefined(strftime)operator(()stringoperator(,) 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) stringchar(\\n)delimiter(")>operator(;) comment(// 'gmmktime' creates a GMT time timestamp) local_variable($t) operator(=) predefined(strftime)operator(()stringoperator(,) 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) stringoperator(;) +predefined(echo) stringchar(\\n)delimiter(")>operator(;) comment(// ----------------------------) comment(// 'strtotime' parses a textual date expression, and generates a timestamp ) local_variable($t) operator(=) predefined(strftime)operator(()stringoperator(,) predefined(strtotime)operator(()stringoperator(\))operator(\))operator(;) -predefined(echo) stringoperator(;) +predefined(echo) stringchar(\\n)delimiter(")>operator(;) comment(// This should generate output identical to previous example) -local_variable($t) operator(=) predefined(strftime)operator(()stringoperator(,) 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) stringoperator(;) +local_variable($t) operator(=) predefined(strftime)operator(()stringoperator(,) 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) stringchar(\\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(()stringoperator(,) 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(=) stringoperator(;) -local_variable($banner) operator(=) stringoperator(;) +local_variable($banner) operator(=) stringcontent(, and enter!)delimiter(")>operator(;) local_variable($banner) operator(=) string operator(.) predefined(escapeshellarg)operator(()local_variable($name)operator(\)) operator(.) stringoperator(;) @@ -1374,11 +1374,11 @@ comment(// ------------) local_variable($his_host) operator(=) stringoperator(;) -local_variable($host_info) operator(=) error(`)ident(nslookup) local_variable($his_host)error(`)operator(;) +local_variable($host_info) operator(=) stringoperator(;) -local_variable($cmd) operator(=) string operator(.) ident(posix_getpid)operator(()operator(\))operator(;) local_variable($perl_info) operator(=) error(`)local_variable($cmd)error(`)operator(;) +local_variable($cmd) operator(=) string operator(.) ident(posix_getpid)operator(()operator(\))operator(;) local_variable($perl_info) operator(=) stringoperator(;) -local_variable($shell_info) operator(=) error(`)ident(ps) error($)error($)error(`)operator(;) +local_variable($shell_info) operator(=) stringoperator(;) 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 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 operator(.) local_variable($series)operator([)integer(1)operator(])operator(;) - predefined(return) predefined(join)operator(()stringoperator(,) predefined(array_slice)operator(()local_variable($series)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\)) operator(.) string operator(.) local_variable($series)operator([)local_variable($n) operator(-) integer(1)operator(])operator(;) + reserved(return) predefined(join)operator(()stringoperator(,) predefined(array_slice)operator(()local_variable($series)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\)) operator(.) string 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(,) stringoperator(\)) operator(===) reserved(false)operator(\)) reserved(continue)operator(;) + reserved(if) operator(()predefined(strpos)operator(()local_variable($str)operator(,) stringoperator(\)) operator(===) pre_constant(false)operator(\)) reserved(continue)operator(;) local_variable($sepchar) operator(=) stringoperator(;) 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 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 operator(.) local_variable($arr)operator([)integer(1)operator(])operator(;) - predefined(return) predefined(join)operator(()stringoperator(,) predefined(array_slice)operator(()local_variable($arr)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\)) operator(.) string operator(.) local_variable($arr)operator([)local_variable($n) operator(-) integer(1)operator(])operator(;) + reserved(return) predefined(join)operator(()stringcontent( )delimiter(")>operator(,) predefined(array_slice)operator(()local_variable($arr)operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(\)) operator(.) stringcontent( 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) stringoperator(;) + predefined(echo) stringcontent(=)inlinechar(\\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) stringoperator(;) + predefined(echo) stringcontent(=)inlinechar(\\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(()stringoperator(;) + predefined(echo) stringcontent( 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) stringoperator(;) + predefined(echo) stringcontent( tastes good in a pie.)char(\\n)delimiter(")>operator(;) operator(}) comment(// ----------------------------) @@ -1601,13 +1601,13 @@ local_variable($namelist)operator([)stringoperator(]) reserved(as) operator(&)local_variable($cat)operator(\)) operator({) - local_variable($cat) operator(.)operator(=) stringoperator(;) + local_variable($cat) operator(.=) stringoperator(;) operator(}) comment(// Via array reference) reserved(foreach)operator(()local_variable($namelist)operator([)stringoperator(]) reserved(as) local_variable($cat)operator(\)) operator({) - predefined(echo) stringoperator(;) + predefined(echo) stringcontent( purrs hypnotically.)char(\\n)delimiter(")>operator(;) operator(}) predefined(echo) stringoperator(;) @@ -1615,7 +1615,7 @@ predefined(echo) stringoperator(; comment(// Original array) reserved(foreach)operator(()local_variable($rogue_cats) reserved(as) local_variable($cat)operator(\)) operator({) - predefined(echo) stringoperator(;) + predefined(echo) stringcontent( 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(()stringoperator(,) 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(()stringoperator(,) stringoperator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\)) reserved(as) local_variable($user_entry)operator(\)) operator({) local_variable($user) operator(=) predefined(preg_split)operator(()stringoperator(,) 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) local_variable($cnt)operator(\)) operator({) - predefined(echo) string )operator({)local_variable($cnt)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) stringcontent( => )inlinechar(\\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(()stringoperator(;) +predefined(echo) stringcontent( )inlinechar(\\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(,) stringoperator(\))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(,) stringoperator(\))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(()stringoperator(,) 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(()stringoperator(,) error(`)ident(who) operator(-)ident(u)error(`)operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(,) stringoperator(\))operator(;) +local_variable($pigs) operator(=) predefined(array_filter)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()stringoperator(,) stringoperator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(,) stringoperator(\))operator(;) comment(// ------------) -local_variable($matching) operator(=) predefined(array_filter)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()stringoperator(,) error(`)ident(who)error(`)operator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(,) - ident(create_function)operator(()stringoperator(,) stringoperator(\))operator(\))operator(;) +local_variable($matching) operator(=) predefined(array_filter)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()stringoperator(,) stringoperator(\))operator(,) integer(0)operator(,) operator(-)integer(1)operator(\))operator(,) + ident(create_function)operator(()stringoperator(,) stringoperator(\))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(()stringoperator(,) 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(()stringoperator(,) predefined(array_slice)operator(()predefined(preg_split)operator(()stringoperator(,) 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(()stringoperator(,) predefined(array_slice)operator(()predefined(preg_split)operator(()stringoperator(,) stringoperator(\))operator(,) integer(1)operator(,) operator(-)integer(1)operator(\))operator(\))operator(;) predefined(sort)operator(()local_variable($processes)operator(\))operator(;) predefined(echo) predefined(join)operator(()stringoperator(,) local_variable($processes)operator(\)) operator(.) stringoperator(;) @@ -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)ident(name)operator(})content( earns )content(\\$)operator({)local_variable($employee)operator(->)ident(salary)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string)ident(name)delimiter(})>content( earns )content(\\$)inline)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)ident(name)operator(})content( got a bonus of: )content(\\$)operator({)local_variable($amount)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) string)ident(name)delimiter(})>content( got a bonus of: )content(\\$)inlinechar(\\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(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(\))operator(,) stringoperator(\)) reserved(as) local_variable($entry)operator(\)) local_variable($users)operator([)operator(]) operator(=) predefined(split)operator(()stringoperator(,) 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(()stringoperator(,) string $right[0];)delimiter(')>operator(\))operator(\))operator(;) -reserved(foreach)operator(()local_variable($users) reserved(as) local_variable($user)operator(\)) predefined(echo) stringoperator(;) +reserved(foreach)operator(()local_variable($users) reserved(as) local_variable($user)operator(\)) predefined(echo) stringchar(\\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) stringoperator(;) + predefined(echo) stringchar(\\n)delimiter(")>operator(;) predefined(sleep)operator(()integer(1)operator(\))operator(;) operator(}) @@ -2408,7 +2408,7 @@ local_variable($food_colour) operator(=) predefined(array)operator(()stringoperator(]) operator(=) stringoperator(;) predefined(echo) stringoperator(;) -reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) predefined(echo) stringoperator(;) +reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) predefined(echo) stringchar(\\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(()stringoperator(,) stringoperator(\)) 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) stringoperator(;) + predefined(echo) stringcontent( is a food.)char(\\n)delimiter(")>operator(;) reserved(else) - predefined(echo) stringoperator(;) + predefined(echo) stringcontent( is a drink.)char(\\n)delimiter(")>operator(;) operator(}) comment(// ----------------------------) -local_variable($age) operator(=) predefined(array)operator(()string operator(=>) integer(3)operator(,) string operator(=>) integer(0)operator(,) string operator(=>) reserved(NULL)operator(\))operator(;) +local_variable($age) operator(=) predefined(array)operator(()string operator(=>) integer(3)operator(,) string operator(=>) integer(0)operator(,) string operator(=>) pre_constant(NULL)operator(\))operator(;) reserved(foreach)operator(()predefined(array)operator(()stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(\)) reserved(as) local_variable($thing)operator(\)) operator({) - predefined(echo) stringoperator(;) + predefined(echo) stringcontent(:)delimiter(")>operator(;) reserved(if) operator(()predefined(array_key_exists)operator(()local_variable($thing)operator(,) local_variable($age)operator(\))operator(\)) predefined(echo) stringoperator(;) reserved(if) operator(()predefined(isset)operator(()local_variable($age)operator([)local_variable($thing)operator(])operator(\))operator(\)) predefined(echo) stringoperator(;) reserved(if) operator(()local_variable($age)operator([)local_variable($thing)operator(])operator(\)) predefined(echo) stringoperator(;) @@ -2470,7 +2470,7 @@ operator({) local_variable($foods) operator(=) predefined(array_keys)operator(()local_variable($food_colour)operator(\))operator(;) predefined(echo) stringoperator(;) - reserved(foreach)operator(()local_variable($foods) reserved(as) local_variable($food)operator(\)) predefined(echo) stringoperator(;) + reserved(foreach)operator(()local_variable($foods) reserved(as) local_variable($food)operator(\)) predefined(echo) stringdelimiter(")>operator(;) predefined(echo) stringoperator(;) 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) stringoperator(;) + predefined(echo) stringchar(\\n)delimiter(")>operator(;) reserved(else) predefined(echo) stringoperator(;) operator(}) @@ -2492,7 +2492,7 @@ local_variable($food_colour) operator(=) predefined(array)operator(()stringoperator(;) ident(print_foods)operator(()operator(\))operator(;) comment(// Nullify an entry) -local_variable($food_colour)operator([)stringoperator(]) operator(=) reserved(NULL)operator(;) +local_variable($food_colour)operator([)stringoperator(]) operator(=) pre_constant(NULL)operator(;) predefined(echo) stringoperator(;) ident(print_foods)operator(()operator(\))operator(;) @@ -2530,12 +2530,12 @@ local_variable($food_colour) operator(=) predefined(array)operator(()string) local_variable($colour)operator(\)) operator({) - predefined(echo) stringoperator(;) + predefined(echo) stringcontent( is )inlinechar(\\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) stringoperator(;) + predefined(echo) stringcontent( is )inlinechar(\\n)delimiter(")>operator(;) operator(}) comment(// ----------------------------) @@ -2549,7 +2549,7 @@ operator({) reserved(if) operator(()predefined(preg_match)operator(()stringoperator(,) 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) stringoperator(;) - reserved(foreach)operator(()local_variable($from) reserved(as) local_variable($sender) operator(=>) local_variable($count)operator(\)) predefined(echo) stringoperator(;) + reserved(foreach)operator(()local_variable($from) reserved(as) local_variable($sender) operator(=>) local_variable($count)operator(\)) predefined(echo) stringcontent( : )inlinechar(\\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 )local_variable($value)char(\\n)delimiter(")>operator(;) + predefined(echo) stringcontent( => )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 )operator({)local_variable($hash)operator([)local_variable($key)operator(])operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) stringcontent( => )inlinechar(\\n)delimiter(")>operator(;) operator(}) comment(// Sorted by values) @@ -2631,7 +2631,7 @@ operator({) local_variable($arr)operator([)local_variable($arg)operator(]) operator(=) stringoperator(;) 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) stringoperator(;) -reserved(foreach)operator(()local_variable($food_colour) reserved(as) local_variable($food) operator(=>) local_variable($colour)operator(\)) predefined(echo) string )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) stringcontent( => )inlinechar(\\n)delimiter(")>operator(;) local_variable($foods) operator(=) predefined(array_keys)operator(()local_variable($food_colour)operator(\))operator(;) predefined(echo) stringoperator(;) -reserved(foreach)operator(()local_variable($foods) reserved(as) local_variable($food)operator(\)) predefined(echo) string )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) stringcontent( => )inlinechar(\\n)delimiter(")>operator(;) comment(// @@PLEAC@@_5.7) -reserved(foreach)operator(()predefined(array_slice)operator(()predefined(preg_split)operator(()stringoperator(,) 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(()stringoperator(,) stringoperator(\))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(()stringoperator(,) 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 operator(.) predefined(join)operator(()stringoperator(,) local_variable($all_ttys)operator(\)) operator(.) stringoperator(;) + predefined(echo) stringcontent(: )delimiter(")> operator(.) predefined(join)operator(()stringoperator(,) local_variable($all_ttys)operator(\)) operator(.) stringoperator(;) operator(}) comment(// ------------) reserved(foreach)operator(()local_variable($ttys) reserved(as) local_variable($user) operator(=>) local_variable($all_ttys)operator(\)) operator({) - predefined(echo) string operator(.) predefined(join)operator(()stringoperator(,) local_variable($all_ttys)operator(\)) operator(.) stringoperator(;) + predefined(echo) stringcontent(: )delimiter(")> operator(.) predefined(join)operator(()stringoperator(,) local_variable($all_ttys)operator(\)) operator(.) stringoperator(;) reserved(foreach)operator(()local_variable($all_ttys) reserved(as) local_variable($tty)operator(\)) operator({) local_variable($stat) operator(=) predefined(stat)operator(()stringoperator(\))operator(;) local_variable($pwent) operator(=) ident(posix_getpwuid)operator(()local_variable($stat)operator([)stringoperator(])operator(\))operator(;) local_variable($user) operator(=) predefined(isset)operator(()local_variable($pwent)operator([)stringoperator(])operator(\)) operator(?) local_variable($pwent)operator([)stringoperator(]) operator(:) stringoperator(;) - predefined(echo) stringoperator(;) + predefined(echo) stringcontent( owned by: )inlinechar(\\n)delimiter(")>operator(;) operator(}) operator(}) @@ -2702,11 +2702,11 @@ comment(// ----------------------------) local_variable($surname) operator(=) predefined(array)operator(()string operator(=>) stringoperator(,) string operator(=>) stringoperator(\))operator(;) local_variable($first_name) operator(=) predefined(array_flip)operator(()local_variable($surname)operator(\))operator(;) -predefined(echo) stringoperator(])operator(})char(\\n)delimiter(")>operator(;) +predefined(echo) stringoperator(])delimiter(})>char(\\n)delimiter(")>operator(;) comment(// ----------------------------) -local_variable($argc) operator(==) integer(2) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()stringcontent( 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(()stringoperator(;) + predefined(echo) stringcontent( is a food with colour: )inlinechar(\\n)delimiter(")>operator(;) reserved(if) operator(()predefined(isset)operator(()local_variable($food)operator([)local_variable($given)operator(])operator(\))operator(\)) - predefined(echo) stringoperator(;) + predefined(echo) stringcontent( is a food with colour: )inlinechar(\\n)delimiter(")>operator(;) comment(// ----------------------------) @@ -2732,7 +2732,7 @@ operator({) operator(}) local_variable($colour) operator(=) stringoperator(;) -predefined(echo) string operator(.) predefined(join)operator(()stringoperator(,) local_variable($foods_with_colour)operator([)local_variable($colour)operator(])operator(\)) operator(.) stringoperator(;) +predefined(echo) stringcontent( were: )delimiter(")> operator(.) predefined(join)operator(()stringoperator(,) local_variable($foods_with_colour)operator([)local_variable($colour)operator(])operator(\)) operator(.) stringoperator(;) 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(,) stringoperator(\))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) stringoperator(;) + predefined(echo) stringcontent( is )inlinechar(\\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) stringoperator(;) + predefined(echo) stringcontent( is )inlinechar(\\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) stringoperator(;) + predefined(echo) stringcontent( 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 operator(=>) stringoperator(,) string operator(=>) stringoperator(,) string operator(=>) stringoperator(\))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 operator(=>) stringoperator(,) string operator(=>) stringoperator(,) string operator(=>) stringoperator(,) string operator(=>) stringoperator(,) @@ -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) stringoperator(;) @@ -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(()stringoperator(;) reserved(continue)operator(;) operator(}) - reserved(if) operator(()operator(!)operator(()local_variable($fh) operator(=) predefined(fopen)operator(()local_variable($file)operator(,) stringoperator(\))operator(\))operator(\)) operator({) predefined(echo) stringoperator(;) reserved(continue)operator(;) operator(}) + reserved(if) operator(()operator(!)predefined(is_file)operator(()local_variable($file)operator(\))operator(\)) operator({) predefined(echo) stringchar(\\n)delimiter(")>operator(;) reserved(continue)operator(;) operator(}) + reserved(if) operator(()operator(!)operator(()local_variable($fh) operator(=) predefined(fopen)operator(()local_variable($file)operator(,) stringoperator(\))operator(\))operator(\)) operator({) predefined(echo) stringchar(\\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(')>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(,) stringoperator(\))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(==) stringoperator(\)) operator({) local_variable($status) operator(=) reserved(TRUE)operator(;) reserved(break)operator(;) operator(}) + reserved(if) operator(()local_variable($char) operator(==) stringoperator(\)) 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(==) stringoperator(\))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 operator(.) predefined(escapeshellarg)operator(()local_variable($file)operator(\))operator(\))operator(\)) operator(==) stringoperator(;) + reserved(return) predefined(exec)operator(()predefined(trim)operator(()string operator(.) predefined(escapeshellarg)operator(()local_variable($file)operator(\))operator(\))operator(\)) operator(==) stringoperator(;) operator(}) comment(// ----) -ident(containsText)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +ident(containsText)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(||) predefined(die)operator(()stringcontent( 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(()stringoperator(\))operator(;) +ident(isTextFile)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(||) predefined(die)operator(()stringcontent( doesn't have any text in it)char(\\n)delimiter(")>operator(\))operator(;) comment(// ----------------------------) local_variable($dirname) operator(=) stringoperator(;) -operator(()local_variable($dirhdl) operator(=) predefined(opendir)operator(()local_variable($dirname)operator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +operator(()local_variable($dirhdl) operator(=) predefined(opendir)operator(()local_variable($dirname)operator(\))operator(\)) operator(||) predefined(die)operator(()stringchar(\\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(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()stringcontent( 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(()stringoperator(\)) operator(.) string 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(()stringoperator(\))operator(;) +predefined(touch)operator(()local_variable($filename)operator(,) local_variable($mtime)operator(,) local_variable($atime)operator(\)) operator(||) predefined(die)operator(()stringcontent(!)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(=) stringoperator(;) -operator(@)predefined(unlink)operator(()local_variable($filename)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +operator(@)predefined(unlink)operator(()local_variable($filename)operator(\)) operator(||) predefined(die)operator(()stringcontent(!)char(\\n)delimiter(")>operator(\))operator(;) comment(// ------------) local_variable($files) operator(=) predefined(glob)operator(()stringoperator(\))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(()stringoperator(\))operator(;) +operator(()local_variable($count) operator(==) local_variable($toBeDeleted)operator(\)) operator(||) predefined(die)operator(()stringcontent( of )inlinecontent( files)char(\\n)delimiter(")>operator(\))operator(;) comment(// @@PLEAC@@_9.3) local_variable($oldfile) operator(=) stringoperator(;) local_variable($newfile) operator(=) stringoperator(;) -predefined(copy)operator(()local_variable($oldfile)operator(,) local_variable($newfile)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +predefined(copy)operator(()local_variable($oldfile)operator(,) local_variable($newfile)operator(\)) operator(||) predefined(die)operator(()stringoperator(\))operator(;) comment(// ----------------------------) @@ -3216,7 +3216,7 @@ local_variable($oldfile) operator(=) stringoperator(\))operator(;) + predefined(die)operator(()stringcontent( to file )inlinechar(\\n)delimiter(")>operator(\))operator(;) comment(// ------------) @@ -3231,12 +3231,12 @@ comment(// ------------) comment(// As above, but with some error checking / handling) local_variable($oldfile) operator(=) stringoperator(;) local_variable($newfile) operator(=) stringoperator(;) -operator(()local_variable($oh) operator(=) predefined(fopen)operator(()local_variable($oldfile)operator(,) stringoperator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) -operator(()local_variable($nh) operator(=) predefined(fopen)operator(()local_variable($newfile)operator(,) stringoperator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +operator(()local_variable($oh) operator(=) predefined(fopen)operator(()local_variable($oldfile)operator(,) stringoperator(\))operator(\)) operator(||) predefined(die)operator(()stringchar(\\n)delimiter(")>operator(\))operator(;) +operator(()local_variable($nh) operator(=) predefined(fopen)operator(()local_variable($newfile)operator(,) stringoperator(\))operator(\)) operator(||) predefined(die)operator(()stringchar(\\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(()stringoperator(\))operator(;) + predefined(fwrite)operator(()local_variable($nh)operator(,) predefined(fread)operator(()local_variable($oh)operator(,) local_variable($filesize)operator(\))operator(\)) operator(||) predefined(die)operator(()stringoperator(\))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(=) stringoperator(;) local_variable($newfile) operator(=) stringoperator(;) -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 operator(.) predefined(escapeshellarg)operator(()local_variable($oldfile)operator(\)) operator(.) string operator(.) predefined(escapeshellarg)operator(()local_variable($newfile)operator(\))operator(\))operator(\))operator(;) -predefined(is_file)operator(()local_variable($newfile)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +predefined(is_file)operator(()local_variable($newfile)operator(\)) operator(||) predefined(die)operator(()stringcontent( to file )inlinechar(\\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([)stringoperator(]) operator(.) local_variable($fs)operator([)stringoperator(])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([)stringoperator(]) operator(.) local_variable($fs)operator([)stringoperator(])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(()stringop reserved(foreach)operator(()local_variable($seen) reserved(as) local_variable($devino) operator(=>) local_variable($count)operator(\)) operator({) - predefined(echo) string )operator({)local_variable($count)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) stringcontent( -> )inlinechar(\\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 )operator({)local_variable($count)operator(})char(\\n)delimiter(")>operator(;) + predefined(echo) stringcontent( -> )inlinechar(\\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(=) stringoperator(;) -operator(()local_variable($dirhdl) operator(=) predefined(opendir)operator(()local_variable($dirname)operator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +operator(()local_variable($dirhdl) operator(=) predefined(opendir)operator(()local_variable($dirname)operator(\))operator(\)) operator(||) predefined(die)operator(()stringchar(\\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(=) stringoperator(;) -predefined(echo) stringoperator(;) +predefined(echo) stringcontent(:)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(.) stringoperator(;) + 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(.) stringoperator(;) 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(.) stringoperator(\))operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) + operator(()local_variable($dirlist) operator(=) predefined(glob)operator(()local_variable($dirname) operator(.) stringoperator(\))operator(\)) operator(||) predefined(die)operator(()stringchar(\\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(,) stringoperator(\))operator(;) + reserved(return) predefined(array_filter)operator(()local_variable($dirlist)operator(,) stringoperator(\))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 operator(|)operator(|) local_variable($entry) operator(==) stringoperator(\)) reserved(continue)operator(;) + reserved(if) operator(()local_variable($entry) operator(==) string operator(||) local_variable($entry) operator(==) stringoperator(\)) reserved(continue)operator(;) local_variable($func_args)operator([)integer(0)operator(]) operator(=) local_variable($current) operator(.) string 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 operator(|)operator(|) local_variable($file) operator(==) stringoperator(\)) reserved(continue)operator(;) + reserved(if) operator(()local_variable($file) operator(==) string operator(||) local_variable($file) operator(==) stringoperator(\)) reserved(continue)operator(;) comment(// Apply function to process the file / directory) ident(pf)operator(()local_variable($dir) operator(.) string 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(()stringoperator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()stringcontent( 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(()stringoperator(\))operator(;) +predefined(is_dir)operator(()local_variable($dir)operator(\)) operator(||) predefined(die)operator(()stringcontent( 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(()stringoperator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()stringcontent( 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(()stringoperator(\))operator(;) +predefined(is_dir)operator(()local_variable($dir)operator(\)) operator(||) predefined(die)operator(()stringcontent( 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(()stringoperator(,) 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(()stringoperator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()stringcontent( 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(()stringoperator(\))operator(;) +predefined(is_dir)operator(()local_variable($dir)operator(\)) operator(||) predefined(die)operator(()stringcontent( 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(()stringoperator(,) 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 operator(&)operator(&) local_variable($item) operator(!=) stringoperator(\)) + reserved(if) operator(()local_variable($item) operator(!=) string operator(&&) local_variable($item) operator(!=) stringoperator(\)) operator({) local_variable($subdir) operator(=) local_variable($dir) operator(.) string operator(.) stringoperator(;) @@ -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(==) stringoperator(\)) 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(==) stringoperator(\)) 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(()stringoperator(\))operator(;) +local_variable($argc) operator(==) integer(2) operator(||) predefined(die)operator(()stringoperator(\))operator(;) -ident(rmtree)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +ident(rmtree)operator(()local_variable($argv)operator([)integer(1)operator(])operator(\)) operator(||) predefined(die)operator(()stringchar(\\n)delimiter(")>operator(\))operator(;) comment(// @@PLEAC@@_9.9) local_variable($filepairs) operator(=) predefined(array)operator(()string operator(=>) stringoperator(,) string operator(=>) stringoperator(,) string operator(=>) stringoperator(\))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(()stringoperator(,) 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(()stringoperator(,) 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(=) stringoperator(;) local_variable($newfile) operator(=) stringoperator(;) -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 operator(.) predefined(escapeshellarg)operator(()local_variable($oldfile)operator(\)) operator(.) string operator(.) predefined(escapeshellarg)operator(()local_variable($newfile)operator(\))operator(\))operator(\))operator(;) -predefined(is_file)operator(()local_variable($oldfile)operator(\)) operator(|)operator(|) predefined(die)operator(()stringoperator(\))operator(;) +predefined(is_file)operator(()local_variable($oldfile)operator(\)) operator(||) predefined(die)operator(()stringcontent( to file )inlinechar(\\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(()stringoperator(\))operator(;) +local_variable($argc) operator(>) integer(2) operator(||) predefined(die)operator(()stringoperator(\))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(()stringoperator(,) 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(()stringoperator(,) 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(=) stringoperator(\)) operator({) - predefined(return) predefined(end)operator(()predefined(split)operator(()operator(()string operator(.) local_variable($separator)operator(\))operator(,) local_variable($filename)operator(\))operator(\))operator(;) + reserved(return) predefined(end)operator(()predefined(split)operator(()operator(()string 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) stringoperator(;) + predefined(echo) stringcontent( times)char(\\n)delimiter(")>operator(;) operator(}) comment(// ------------) ident(hello)operator(()operator(\))operator(;) local_variable($greetings) operator(=) ident(howManyGreetings)operator(()operator(\))operator(;) -predefined(echo) stringoperator(;) +predefined(echo) stringcontent( 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(()stringoperator(,) stringoperator(\))operator(,) local_variable($arr)operator(\))operator(;) + reserved(return) predefined(array_map)operator(()ident(create_function)operator(()stringoperator(,) stringoperator(\))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(=) stringoperator(;) - predefined(echo) stringoperator(;) + predefined(echo) stringchar(\\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(()stringoperator(\))operator(;) +predefined(count)operator(()local_variable($arr1)operator(\)) operator(==) predefined(count)operator(()local_variable($arr2)operator(\)) operator(||) predefined(die)operator(()stringoperator(\))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) stringoperator(;) + reserved(return) stringoperator(;) 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 operator(=>) integer(1)operator(,) string 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 operator(=>) integer(1)operator(,) string 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(()stringoperator(\))operator(;) +ident(a_func)operator(()operator(\)) operator(||) predefined(die)operator(()stringoperator(\))operator(;) reserved(if) operator(()operator(!)ident(a_func)operator(()operator(\))operator(\)) predefined(die)operator(()stringoperator(\))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)local_variable($text)content()delimiter(")>operator(;) operator(}) +reserved(function) ident(red)operator(()local_variable($text)operator(\)) operator({) reserved(return) string)local_variable($text)content()delimiter(")>operator(;) operator(}) predefined(echo) ident(red)operator(()stringoperator(\)) operator(.) stringoperator(;) @@ -4506,12 +4506,12 @@ comment(// ------------) local_variable($colour) operator(=) stringoperator(;) -error($)local_variable($colour) operator(=) ident(create_function)operator(()stringoperator(,) string$text";)delimiter(')>operator(\))operator(;) +operator($)local_variable($colour) operator(=) ident(create_function)operator(()stringoperator(,) string$text";)delimiter(')>operator(\))operator(;) -predefined(echo) error($)local_variable($colour)operator(()stringoperator(\)) operator(.) stringoperator(;) +predefined(echo) operator($)local_variable($colour)operator(()stringoperator(\)) operator(.) stringoperator(;) -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(()stringoperator(,) string$text";)delimiter(')>operator(\))operator(;) + operator($)local_variable($colour) operator(=) ident(create_function)operator(()stringoperator(,) string$text";)delimiter(')>operator(\))operator(;) operator(}) -reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) operator({) predefined(echo) error($)local_variable($colour)operator(()stringoperator(\)) operator(.) stringoperator(;) operator(}) +reserved(foreach) operator(()local_variable($colours) reserved(as) local_variable($colour)operator(\)) operator({) predefined(echo) operator($)local_variable($colour)operator(()stringoperator(\)) operator(.) stringoperator(;) 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(()stringoperator(\))operator(;) + predefined(die)operator(()stringcontent( not found - aborting)char(\\n)delimiter(")>operator(\))operator(;) operator(}) reserved(else) operator({) @@ -4567,8 +4567,8 @@ local_variable($colours) operator(=) predefined(array)operator(()stringoperator(,) string$text";)delimiter(')>operator(\))operator(;) + operator($)local_variable($colour) operator(=) ident(create_function)operator(()stringoperator(,) string$text";)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(,) stringoperator(,) string$text";)delimiter(')>operator(\))operator(;) + operator($)local_variable($colour) operator(=) ident(create_function)operator(()stringoperator(,) string$text";)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(()stringoperator(\)) operator(.) stringoperator(;) + predefined(echo) operator($)local_variable($colour)operator(()stringoperator(\)) operator(.) stringoperator(;) 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(()stringoperator(\))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(=) stringoperator(;) 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(()stringoperator(,) stringoperator(\))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(()stringoperator(\))operator(;) reserved(if) operator(()operator(!)local_variable($pager)operator(\)) local_variable($pager) operator(=) stringoperator(;) comment(// XXX: might not exist) local_variable($pipe) operator(=) predefined(popen)operator(()local_variable($pager)operator(,) stringoperator(\))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(=) stringoperator(;) - 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(==) stringoperator(\)) 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(==) stringoperator(\)) operator({) local_variable($newline) operator(=) stringoperator(;) 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(()stringoperator(,) local_variable($result)operator(\)) operator(.) local_variable($newline) operator(:) stringoperator(;) + reserved(return) local_variable($result) operator(?) predefined(implode)operator(()stringoperator(,) local_variable($result)operator(\)) operator(.) local_variable($newline) operator(:) stringoperator(;) 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(=) stringoperator(;) - 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(==) stringoperator(\)) 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(==) stringoperator(\)) operator({) local_variable($newline) operator(=) stringoperator(;) 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 operator(.) local_variable($line)operator(;) operator(}) - predefined(return) predefined(implode)operator(()stringoperator(,) local_variable($result)operator(\)) operator(.) local_variable($newline)operator(;) + reserved(return) predefined(implode)operator(()stringoperator(,) 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(=) stringoperator(;) - 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(==) stringoperator(\)) 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(==) stringoperator(\)) operator({) local_variable($newline) operator(=) stringoperator(;) 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(()stringoperator(,) local_variable($output)operator(\)) reserved(as) local_variable($i) operator(=>) local_variable($line)operator(\)) operator({) local_variable($result)operator([)operator(]) operator(=) string )local_variable($line)delimiter(")>operator(;) operator(}) - predefined(return) predefined(implode)operator(()stringoperator(,) local_variable($result)operator(\)) operator(.) local_variable($newline)operator(;) + reserved(return) predefined(implode)operator(()stringoperator(,) 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&1)delimiter(`)>operator(;) comment(// with backticks) comment(// or) local_variable($ph) operator(=) predefined(popen)operator(()string&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/dev/null)delimiter(`)>operator(;) comment(// with backticks) comment(// or) local_variable($ph) operator(=) predefined(popen)operator(()string/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&1 1>/dev/null)delimiter(`)>operator(;) comment(// with backticks) comment(// or) local_variable($ph) operator(=) predefined(popen)operator(()string&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&1 1>&2 2>&3 3>&-)delimiter(`)>operator(;) comment(// with backticks) comment(// or) local_variable($ph) operator(=) predefined(popen)operator(()string&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/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&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(()stringtmpfile 2>&1)delimiter(')>operator(\))operator(;) predefined(exec)operator(()string&1 1>tmpfile)delimiter(')>operator(\))operator(;) @@ -4964,7 +4964,7 @@ local_variable($errlines) operator(=) predefined(array)operator(()operator(\))op predefined(exec)operator(()string&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(,) stringoperator(\))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) stringoperator(;) operator(}) reserved(else) operator({) @@ -5169,10 +5169,10 @@ comment(// % mkfifo /path/to/named.pipe) comment(// -----------------------------) local_variable($fifo) operator(=) predefined(fopen)operator(()stringoperator(,) stringoperator(\))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) stringoperator(;) operator(}) predefined(fclose)operator(()local_variable($fifo)operator(\))operator(;) @@ -5183,7 +5183,7 @@ operator(}) comment(// -----------------------------) local_variable($fifo) operator(=) predefined(fopen)operator(()stringoperator(,) stringoperator(\))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(,) stringoperator(\))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(()stringoperator(\))operator(;) local_variable($fifo) operator(=) predefined(fopen)operator(()stringoperator(,) stringoperator(\))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(()stringoperator(\))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(,) stringoperator(\))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(()stringoperator(,) stringoperator(\))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(()stringoperator(\))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(==) stringoperator(\)) operator({) comment(// log to /var/log/login) local_variable($log) operator(=) predefined(fopen)operator(()stringoperator(,) stringoperator(\))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(()stringoperator(\)) operator(.) stringoperator(\))operator(;) predefined(fclose)operator(()local_variable($log)operator(\))operator(;) operator(}) reserved(else) operator({) predefined(trigger_error)operator(()stringoperator(,) - 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 operator(.) ident(shm_get_var)operator(()local_variable($buffer)operator(,) integer(1)operator(\)) operator(.) stringoperator(;) 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(()stringoperator(,) 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) stringoperator(;) 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(,) stringoperator(,) reserved(false)operator(\))operator(;) comment(// or SIG_IGN) + ident(pcntl_signal)operator(()constant(SIGINT)operator(,) stringoperator(,) pre_constant(false)operator(\))operator(;) comment(// or SIG_IGN) operator(}) -ident(pcntl_signal)operator(()constant(SIGINT)operator(,) stringoperator(,) reserved(false)operator(\))operator(;) +ident(pcntl_signal)operator(()constant(SIGINT)operator(,) stringoperator(,) 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(,) stringoperator(\))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(operator(\)) operator(|)operator(|) operator(!)constant(UNLOCK)operator(\)) +reserved(if)operator(()operator(!)predefined(defined)operator(()stringoperator(\)) operator(||) operator(!)constant(UNLOCK)operator(\)) predefined(die)operator(()operator(\))operator(;) comment(// Load the parent archive class) predefined(require_once)operator(()constant(ROOT_PATH)operator(.)stringoperator(\))operator(;) -comment(/*)comment(*) -comment( * Zip class) -comment( *) -comment( * @author Manni ) -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 + * @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(=) stringoperator(;) + local_variable($dir) operator(.=) stringoperator(;) comment(// File part) comment(// Reset dir data) local_variable($dir_data) operator(=) stringoperator(;) comment(// Local file header) - local_variable($dir_data) operator(.)operator(=) stringoperator(;) comment(// Local file header signature) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(10)operator(\))operator(;) comment(// Version needed to extract) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compression method) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// crc-32) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($dir)operator(\))operator(\))operator(;) comment(// File name length) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) 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(=) stringoperator(;) comment(// Extra field (is empty\)) + local_variable($dir_data) operator(.=) stringoperator(;) comment(// Local file header signature) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(10)operator(\))operator(;) comment(// Version needed to extract) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compression method) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// crc-32) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($dir)operator(\))operator(\))operator(;) comment(// File name length) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) 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(.=) stringoperator(;) comment(// Extra field (is empty\)) comment(// File data) - local_variable($dir_data) operator(.)operator(=) stringoperator(;) comment(// Dirs have no file data) + local_variable($dir_data) operator(.=) stringoperator(;) comment(// Dirs have no file data) comment(// Data descriptor) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// crc-32) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// crc-32) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) comment(// Save current offset) local_variable($offset) operator(=) predefined(strlen)operator(()predefined(implode)operator(()stringoperator(,) local_variable($file_data)operator(\))operator(\))operator(;) @@ -93,34 +93,34 @@ comment( )comment(*/) local_variable($dir_data) operator(=) stringoperator(;) comment(// File header) - local_variable($dir_data) operator(.)operator(=) stringoperator(;) comment(// Local file header signature) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Version made by) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(10)operator(\))operator(;) comment(// Version needed to extract) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compression method) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// crc-32) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($dir)operator(\))operator(\))operator(;) comment(// File name length) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Extra field length) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// File comment length) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Disk number start) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Internal file attributes) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(16)operator(\))operator(;) comment(// External file attributes) - local_variable($dir_data) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) 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(=) stringoperator(;) comment(// Extra field (is empty\)) - local_variable($dir_data) operator(.)operator(=) stringoperator(;) 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(.=) stringoperator(;) comment(// Local file header signature) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Version made by) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(10)operator(\))operator(;) comment(// Version needed to extract) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compression method) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// crc-32) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Compressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Uncompressed size) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($dir)operator(\))operator(\))operator(;) comment(// File name length) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Extra field length) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// File comment length) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Disk number start) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Internal file attributes) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) integer(16)operator(\))operator(;) comment(// External file attributes) + local_variable($dir_data) operator(.=) predefined(pack)operator(()stringoperator(,) 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(.=) stringoperator(;) comment(// Extra field (is empty\)) + local_variable($dir_data) operator(.=) stringoperator(;) 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(=) stringoperator(;) comment(// Local file header signature) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(20)operator(\))operator(;) comment(// Version needed to extract) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) local_variable($method)operator(\))operator(;) comment(// Compression method) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($name)operator(\))operator(\))operator(;) comment(// File name length) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) 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(=) stringoperator(;) comment(// Extra field (is empty\)) + local_variable($fd) operator(.=) stringoperator(;) comment(// Local file header signature) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(20)operator(\))operator(;) comment(// Version needed to extract) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) local_variable($method)operator(\))operator(;) comment(// Compression method) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($name)operator(\))operator(\))operator(;) comment(// File name length) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Extra field length) + + local_variable($fd) operator(.=) local_variable($name)operator(;) comment(// File name) + local_variable($fd) operator(.=) stringoperator(;) 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(()stringoperator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) 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(()stringoperator(,) local_variable($file_data)operator(\))operator(\))operator(;) @@ -195,34 +195,34 @@ comment( )comment(*/) local_variable($fd) operator(=) stringoperator(;) comment(// File header) - local_variable($fd) operator(.)operator(=) stringoperator(;) comment(// Local file header signature) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Version made by) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(20)operator(\))operator(;) comment(// Version needed to extract) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) local_variable($method)operator(\))operator(;) comment(// Compression method) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($name)operator(\))operator(\))operator(;) comment(// File name length) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Extra field length) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// File comment length) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Disk number start) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Internal file attributes) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(32)operator(\))operator(;) comment(// External file attributes) - local_variable($fd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) 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(=) stringoperator(;) comment(// Extra field (is empty\)) - local_variable($fd) operator(.)operator(=) stringoperator(;) 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(.=) stringoperator(;) comment(// Local file header signature) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Version made by) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(20)operator(\))operator(;) comment(// Version needed to extract) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// General purpose bit flag) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) local_variable($method)operator(\))operator(;) comment(// Compression method) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file time) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Last mod file date) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(crc32)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// crc-32) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($compressed_data)operator(\))operator(\))operator(;) comment(// Compressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($content)operator(\))operator(\))operator(;) comment(// Uncompressed size) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) predefined(strlen)operator(()local_variable($name)operator(\))operator(\))operator(;) comment(// File name length) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Extra field length) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// File comment length) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Disk number start) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Internal file attributes) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(32)operator(\))operator(;) comment(// External file attributes) + local_variable($fd) operator(.=) predefined(pack)operator(()stringoperator(,) 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(.=) stringoperator(;) comment(// Extra field (is empty\)) + local_variable($fd) operator(.=) stringoperator(;) 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(=) stringoperator(;) - local_variable($digital_signature) operator(.)operator(=) stringoperator(;) comment(// Header signature) - local_variable($digital_signature) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Size of data) - local_variable($digital_signature) operator(.)operator(=) stringoperator(;) comment(// Signature data (is empty\)) + local_variable($digital_signature) operator(.=) stringoperator(;) comment(// Header signature) + local_variable($digital_signature) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Size of data) + local_variable($digital_signature) operator(.=) stringoperator(;) comment(// Signature data (is empty\)) local_variable($tmp_file_data) operator(=) predefined(implode)operator(()stringoperator(,) local_variable($file_data)operator(\))operator(;) comment(// File data) local_variable($tmp_cd_data) operator(=) predefined(implode)operator(()stringoperator(,) 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(=) stringoperator(;) - local_variable($eof_cd) operator(.)operator(=) stringoperator(;) comment(// End of central dir signature) - local_variable($eof_cd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Number of this disk) - local_variable($eof_cd) operator(.)operator(=) predefined(pack)operator(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(,) integer(0)operator(\))operator(;) comment(// .ZIP file comment length) - local_variable($eof_cd) operator(.)operator(=) stringoperator(;) comment(// .ZIP file comment (is empty\)) + local_variable($eof_cd) operator(.=) stringoperator(;) comment(// End of central dir signature) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Number of this disk) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()stringoperator(,) integer(0)operator(\))operator(;) comment(// Number of the disk with the start of the central directory) + local_variable($eof_cd) operator(.=) predefined(pack)operator(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(,) 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(()stringoperator(,) integer(0)operator(\))operator(;) comment(// .ZIP file comment length) + local_variable($eof_cd) operator(.=) stringoperator(;) 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(,) stringoperator(\))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(()stringoperator(\))operator(;) comment(// Get the ecdr) @@ -385,28 +385,28 @@ comment( )comment(*/) comment(// Valid header?) reserved(if)operator(()local_variable($header_info)operator([)stringoperator(]) 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([)stringoperator(]) operator(=) predefined(substr)operator(()local_variable($cdr)operator(,) local_variable($pos)operator(,) local_variable($header_info)operator([)stringoperator(])operator(\))operator(;) comment(// New position) - local_variable($pos) operator(+)operator(=) local_variable($header_info)operator([)stringoperator(])operator(;) + local_variable($pos) operator(+=) local_variable($header_info)operator([)stringoperator(])operator(;) comment(// Read out the extra stuff) local_variable($header_info)operator([)stringoperator(]) operator(=) predefined(substr)operator(()local_variable($cdr)operator(,) local_variable($pos)operator(,) local_variable($header_info)operator([)stringoperator(])operator(\))operator(;) comment(// New position) - local_variable($pos) operator(+)operator(=) local_variable($header_info)operator([)stringoperator(])operator(;) + local_variable($pos) operator(+=) local_variable($header_info)operator([)stringoperator(])operator(;) comment(// Read out the comment) local_variable($header_info)operator([)stringoperator(]) operator(=) predefined(substr)operator(()local_variable($cdr)operator(,) local_variable($pos)operator(,) local_variable($header_info)operator([)stringoperator(])operator(\))operator(;) comment(// New position) - local_variable($pos) operator(+)operator(=) local_variable($header_info)operator([)stringoperator(])operator(;) + local_variable($pos) operator(+=) local_variable($header_info)operator([)stringoperator(])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([)stringoperator(]) 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([)stringoperator(]) operator(+) integer(30) operator(+) local_variable($header_info)operator([)stringoperator(]) operator(+) local_variable($header_info)operator([)stringoperator(])operator(;) @@ -462,7 +462,7 @@ comment( )comment(*/) comment(// Gzip) reserved(case) integer(8)operator(:) reserved(if)operator(()operator(!)predefined(function_exists)operator(()stringoperator(\))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(()stringoperator(\))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([)stringoperator(])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(?>) -- cgit v1.2.1