Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Zend/zend_language_parser.y | 20 ++++++++++----------
Zend/zend_language_scanner.l | 2 +-
ext/tokenizer/tests/001.phpt | 2 +-
ext/tokenizer/tokenizer_data.c | 6 +++---
ext/tokenizer/tokenizer_data_gen.sh | 6 +++---
5 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index c1ced9a35a..5b1a355b62 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -214,7 +214,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
%token T_END_HEREDOC "heredoc end (T_END_HEREDOC)"
%token T_DOLLAR_OPEN_CURLY_BRACES "${ (T_DOLLAR_OPEN_CURLY_BRACES)"
%token T_CURLY_OPEN "{$ (T_CURLY_OPEN)"
-%token T_PAAMAYIM_NEKUDOTAYIM ":: (T_PAAMAYIM_NEKUDOTAYIM)"
+%token T_DOUBLE_COLON ":: (T_DOUBLE_COLON)"
%token T_NAMESPACE "namespace (T_NAMESPACE)"
%token T_NS_C "__NAMESPACE__ (T_NS_C)"
%token T_NS_SEPARATOR "\\ (T_NS_SEPARATOR)"
@@ -808,7 +808,7 @@ trait_method_reference:
;
absolute_trait_method_reference:
- class_name T_PAAMAYIM_NEKUDOTAYIM identifier
+ class_name T_DOUBLE_COLON identifier
{ $$ = zend_ast_create(ZEND_AST_METHOD_REFERENCE, $1, $3); }
;
@@ -1081,9 +1081,9 @@ lexical_var:
function_call:
name argument_list
{ $$ = zend_ast_create(ZEND_AST_CALL, $1, $2); }
- | class_name T_PAAMAYIM_NEKUDOTAYIM member_name argument_list
+ | class_name T_DOUBLE_COLON member_name argument_list
{ $$ = zend_ast_create(ZEND_AST_STATIC_CALL, $1, $3, $4); }
- | variable_class_name T_PAAMAYIM_NEKUDOTAYIM member_name argument_list
+ | variable_class_name T_DOUBLE_COLON member_name argument_list
{ $$ = zend_ast_create(ZEND_AST_STATIC_CALL, $1, $3, $4); }
| callable_expr argument_list
{ $$ = zend_ast_create(ZEND_AST_CALL, $1, $2); }
@@ -1153,9 +1153,9 @@ constant:
;
class_constant:
- class_name T_PAAMAYIM_NEKUDOTAYIM identifier
+ class_name T_DOUBLE_COLON identifier
{ $$ = zend_ast_create_class_const_or_name($1, $3); }
- | variable_class_name T_PAAMAYIM_NEKUDOTAYIM identifier
+ | variable_class_name T_DOUBLE_COLON identifier
{ $$ = zend_ast_create_class_const_or_name($1, $3); }
;
@@ -1214,9 +1214,9 @@ simple_variable:
;
static_member:
- class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable
+ class_name T_DOUBLE_COLON simple_variable
{ $$ = zend_ast_create(ZEND_AST_STATIC_PROP, $1, $3); }
- | variable_class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable
+ | variable_class_name T_DOUBLE_COLON simple_variable
{ $$ = zend_ast_create(ZEND_AST_STATIC_PROP, $1, $3); }
;
@@ -1229,9 +1229,9 @@ new_variable:
{ $$ = zend_ast_create_ex(ZEND_AST_DIM, ZEND_DIM_ALTERNATIVE_SYNTAX, $1, $3); }
| new_variable T_OBJECT_OPERATOR property_name
{ $$ = zend_ast_create(ZEND_AST_PROP, $1, $3); }
- | class_name T_PAAMAYIM_NEKUDOTAYIM simple_variable
+ | class_name T_DOUBLE_COLON simple_variable
{ $$ = zend_ast_create(ZEND_AST_STATIC_PROP, $1, $3); }
- | new_variable T_PAAMAYIM_NEKUDOTAYIM simple_variable
+ | new_variable T_DOUBLE_COLON simple_variable
{ $$ = zend_ast_create(ZEND_AST_STATIC_PROP, $1, $3); }
;
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 232ccdf8be..d7f947ee53 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -1459,7 +1459,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
}
<ST_IN_SCRIPTING>"::" {
- RETURN_TOKEN(T_PAAMAYIM_NEKUDOTAYIM);
+ RETURN_TOKEN(T_DOUBLE_COLON);
}
<ST_IN_SCRIPTING>"\\" {
diff --git a/ext/tokenizer/tests/001.phpt b/ext/tokenizer/tests/001.phpt
index 8e58c81891..eb9ec354c2 100644
--- a/ext/tokenizer/tests/001.phpt
+++ b/ext/tokenizer/tests/001.phpt
@@ -111,7 +111,7 @@ echo token_name(T_END_HEREDOC), "\n";
echo token_name(T_DOLLAR_OPEN_CURLY_BRACES), "\n";
echo token_name(T_CURLY_OPEN), "\n";
echo token_name(T_PAAMAYIM_NEKUDOTAYIM), "\n";
-echo token_name(T_PAAMAYIM_NEKUDOTAYIM), "\n";
+echo token_name(T_DOUBLE_COLON), "\n";
echo token_name(T_ABSTRACT), "\n";
echo token_name(T_CATCH), "\n";
echo token_name(T_FINAL), "\n";
diff --git a/ext/tokenizer/tokenizer_data.c b/ext/tokenizer/tokenizer_data.c
index 7e580dd844..7bffa747c0 100644
--- a/ext/tokenizer/tokenizer_data.c
+++ b/ext/tokenizer/tokenizer_data.c
@@ -154,14 +154,14 @@ void tokenizer_register_constants(INIT_FUNC_ARGS) {
REGISTER_LONG_CONSTANT("T_START_HEREDOC", T_START_HEREDOC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_END_HEREDOC", T_END_HEREDOC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_DOLLAR_OPEN_CURLY_BRACES", T_DOLLAR_OPEN_CURLY_BRACES, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("T_DOUBLE_COLON", T_DOUBLE_COLON, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_CURLY_OPEN", T_CURLY_OPEN, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("T_PAAMAYIM_NEKUDOTAYIM", T_PAAMAYIM_NEKUDOTAYIM, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_NAMESPACE", T_NAMESPACE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_NS_C", T_NS_C, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_NS_SEPARATOR", T_NS_SEPARATOR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_ELLIPSIS", T_ELLIPSIS, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("T_BAD_CHARACTER", T_BAD_CHARACTER, CONST_CS | CONST_PERSISTENT);
- REGISTER_LONG_CONSTANT("T_DOUBLE_COLON", T_PAAMAYIM_NEKUDOTAYIM, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("T_PAAMAYIM_NEKUDOTAYIM", T_DOUBLE_COLON, CONST_CS | CONST_PERSISTENT);
}
char *get_token_type_name(int token_type)
@@ -298,7 +298,7 @@ char *get_token_type_name(int token_type)
case T_END_HEREDOC: return "T_END_HEREDOC";
case T_DOLLAR_OPEN_CURLY_BRACES: return "T_DOLLAR_OPEN_CURLY_BRACES";
case T_CURLY_OPEN: return "T_CURLY_OPEN";
- case T_PAAMAYIM_NEKUDOTAYIM: return "T_DOUBLE_COLON";
+ case T_DOUBLE_COLON: return "T_DOUBLE_COLON";
case T_NAMESPACE: return "T_NAMESPACE";
case T_NS_C: return "T_NS_C";
case T_NS_SEPARATOR: return "T_NS_SEPARATOR";
diff --git a/ext/tokenizer/tokenizer_data_gen.sh b/ext/tokenizer/tokenizer_data_gen.sh
index 4d5e97ddde..7005d44bff 100755
--- a/ext/tokenizer/tokenizer_data_gen.sh
+++ b/ext/tokenizer/tokenizer_data_gen.sh
@@ -48,7 +48,7 @@ awk '
/^ T_(NOELSE|ERROR)/ { next }
/^ T_/ { print " REGISTER_LONG_CONSTANT(\"" $1 "\", " $1 ", CONST_CS | CONST_PERSISTENT);" }
' < $infile >> $outfile
-echo ' REGISTER_LONG_CONSTANT("T_DOUBLE_COLON", T_PAAMAYIM_NEKUDOTAYIM, CONST_CS | CONST_PERSISTENT);' >> $outfile
+echo ' REGISTER_LONG_CONSTANT("T_PAAMAYIM_NEKUDOTAYIM", T_DOUBLE_COLON, CONST_CS | CONST_PERSISTENT);' >> $outfile
echo '}' >> $outfile
@@ -59,8 +59,8 @@ char *get_token_type_name(int token_type)
' >> $outfile
awk '
- /^ T_PAAMAYIM_NEKUDOTAYIM/ {
- print " case T_PAAMAYIM_NEKUDOTAYIM: return \"T_DOUBLE_COLON\";"
+ /^ T_DOUBLE_COLON/ {
+ print " case T_DOUBLE_COLON: return \"T_PAAMAYIM_NEKUDOTAYIM\";"
next
}
/^ T_(NOELSE|ERROR)/ { next }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment