Skip to content

Commit e96d634

Browse files
authored
Merge pull request #4786 from KuzinAndrey/php-syntax
php.syntax: grep real list of core reserved constants from documentation
2 parents 95441f7 + 48eac57 commit e96d634

File tree

1 file changed

+68
-3
lines changed

1 file changed

+68
-3
lines changed

misc/syntax/php.syntax

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3056,11 +3056,76 @@ context default
30563056
# predefined constants
30573057
# core
30583058

3059-
keyword whole PHP\_\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_\] white
3060-
keyword whole E\_\[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_\] white
3059+
# Helper command:
3060+
# wget -q -O - https://www.php.net/manual/en/reserved.constants.php | \
3061+
# grep -Eo "<strong><code><a href=.*>(PHP|ZEND|DEBUG|PEAR|DEFAULT|E)_.*</a></code></strong>" | \
3062+
# grep -Eo '(PHP_|ZEND_|DEBUG_|PEAR_|DEFAULT_|E_)[_A-Z]*' | \
3063+
# sort -u | sed 's/\(.*\)/ keyword whole \1 white/g'
3064+
#
3065+
keyword whole DEBUG_BACKTRACE_IGNORE_ARGS white
3066+
keyword whole DEBUG_BACKTRACE_PROVIDE_OBJECT white
30613067
keyword whole DEFAULT_INCLUDE_PATH white
3062-
keyword whole PEAR_INSTALL_DIR white
3068+
keyword whole E_ALL white
3069+
keyword whole E_COMPILE_ERROR white
3070+
keyword whole E_COMPILE_WARNING white
3071+
keyword whole E_CORE_ERROR white
3072+
keyword whole E_CORE_WARNING white
3073+
keyword whole E_DEPRECATED white
3074+
keyword whole E_ERROR white
3075+
keyword whole E_NOTICE white
3076+
keyword whole E_PARSE white
3077+
keyword whole E_RECOVERABLE_ERROR white
3078+
keyword whole E_STRICT white
3079+
keyword whole E_USER_DEPRECATED white
3080+
keyword whole E_USER_ERROR white
3081+
keyword whole E_USER_NOTICE white
3082+
keyword whole E_USER_WARNING white
3083+
keyword whole E_WARNING white
30633084
keyword whole PEAR_EXTENSION_DIR white
3085+
keyword whole PEAR_INSTALL_DIR white
3086+
keyword whole PHP_BINARY white
3087+
keyword whole PHP_BINDIR white
3088+
keyword whole PHP_CLI_PROCESS_TITLE white
3089+
keyword whole PHP_CONFIG_FILE_PATH white
3090+
keyword whole PHP_CONFIG_FILE_SCAN_DIR white
3091+
keyword whole PHP_DATADIR white
3092+
keyword whole PHP_DEBUG white
3093+
keyword whole PHP_EOL white
3094+
keyword whole PHP_EXTENSION_DIR white
3095+
keyword whole PHP_EXTRA_VERSION white
3096+
keyword whole PHP_FD_SETSIZE white
3097+
keyword whole PHP_FLOAT_DIG white
3098+
keyword whole PHP_FLOAT_EPSILON white
3099+
keyword whole PHP_FLOAT_MAX white
3100+
keyword whole PHP_FLOAT_MIN white
3101+
keyword whole PHP_INT_MAX white
3102+
keyword whole PHP_INT_MIN white
3103+
keyword whole PHP_INT_SIZE white
3104+
keyword whole PHP_LIBDIR white
3105+
keyword whole PHP_LOCALSTATEDIR white
3106+
keyword whole PHP_MAJOR_VERSION white
3107+
keyword whole PHP_MANDIR white
3108+
keyword whole PHP_MAXPATHLEN white
3109+
keyword whole PHP_MINOR_VERSION white
3110+
keyword whole PHP_OS white
3111+
keyword whole PHP_OS_FAMILY white
3112+
keyword whole PHP_PREFIX white
3113+
keyword whole PHP_RELEASE_VERSION white
3114+
keyword whole PHP_SAPI white
3115+
keyword whole PHP_SBINDIR white
3116+
keyword whole PHP_SHLIB_SUFFIX white
3117+
keyword whole PHP_SYSCONFDIR white
3118+
keyword whole PHP_VERSION white
3119+
keyword whole PHP_VERSION_ID white
3120+
keyword whole PHP_WINDOWS_EVENT_CTRL_BREAK white
3121+
keyword whole PHP_WINDOWS_EVENT_CTRL_C white
3122+
keyword whole PHP_ZTS white
3123+
keyword whole ZEND_DEBUG_BUILD white
3124+
keyword whole ZEND_THREAD_SAFE white
3125+
3126+
keyword whole STDIN white
3127+
keyword whole STDOUT white
3128+
keyword whole STDERR white
30643129

30653130
####################################
30663131
# expressions, operators and other

0 commit comments

Comments
 (0)