History log of /PHP-8.2/Zend/zend_language_parser.y (Results 26 – 50 of 627)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 55717656 19-Jun-2020 Nikita Popov

Forbid use of <?= as a semi-reserved identifier

One of the weirdest pieces of PHP code I've ever seen. In terms
of tokens, this gets internally translated to

use x as y; ech

Forbid use of <?= as a semi-reserved identifier

One of the weirdest pieces of PHP code I've ever seen. In terms
of tokens, this gets internally translated to

use x as y; echo as my_echo;

On master it crashes because this "echo" does not have attached
identifier metadata. Make sure it is added and then reject the
use of "<?=" as an identifier inside zend_lex_tstring.

Fixes oss-fuzz #23547.

show more ...

# 2a3ac4a8 08-Jun-2020 Ilija Tovilo

Add missing terminators in zend_language_parser.y

Closes GH-5688

# 3d4f79d6 08-Jun-2020 Nikita Popov

Don't allow variables as attribute name

Attributes require a static class name...

This fixes https://oss-fuzz.com/testcase-detail/6267052359942144.

# b03cafd1 05-Jun-2020 Nikita Popov

Fix bug #77966: Cannot alias a method named "namespace"

This is a bit tricky: In this cases we have "namespace as", which
means that we will only recognize "namespace" as an identifier w

Fix bug #77966: Cannot alias a method named "namespace"

This is a bit tricky: In this cases we have "namespace as", which
means that we will only recognize "namespace" as an identifier when
the lookahead token is already at the "as". This means that
zend_lex_tstring picks up the wrong identifier.

We solve this by actually assigning the identifier as the semantic
value on the parser stack -- as in almost all cases we will not
actually need the identifier, this is just an (offset, size)
reference, not a copy of the string.

Additionally, we need to teach the lexer feedback mechanism used
by tokenizer TOKEN_PARSE mode to apply feedback to something
other than the very last token. To that purpose we pass through
the token text and check the tokens in reverse order to find the
right one.

Closes GH-5668.

show more ...

# 064b4644 24-Mar-2020 Nikita Popov

Implement "Constructor Promotion" RFC

RFC: https://wiki.php.net/rfc/constructor_promotion

Closes GH-5291.

# a7908c2d 24-May-2020 Benjamin Eberlei

Add Attributes

Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>

# 23ee4d4b 03-Apr-2020 Max Semenik

Support catching exceptions without capturing them to variables

RFC: https://wiki.php.net/rfc/non-capturing_catches

Closes GH-5345.

# f545ee2c 26-Mar-2020 Nikita Popov

Allow optional trailing comma in parameter list

RFC: https://wiki.php.net/rfc/trailing_comma_in_parameter_list

Closes GH-5306.

# 0810fcd0 18-Mar-2020 Ilija Tovilo

Make throw statement an expression

RFC: https://wiki.php.net/rfc/throw_expression

This has an open issue with temporaries that are live at the time
of the throw being leaked. La

Make throw statement an expression

RFC: https://wiki.php.net/rfc/throw_expression

This has an open issue with temporaries that are live at the time
of the throw being leaked. Landing this now for easier testing and
will revert if we cannot resolve the issue.

Closes GH-5279.

show more ...

# 43443857 07-Jan-2020 Nikita Popov

Add static return type

RFC: https://wiki.php.net/rfc/static_return_type

The "static" type is represented as MAY_BE_STATIC, rather than
a class type like "self" and "parent", as

Add static return type

RFC: https://wiki.php.net/rfc/static_return_type

The "static" type is represented as MAY_BE_STATIC, rather than
a class type like "self" and "parent", as it has special
resolution semantics, and cannot be cached in the runtime cache.

Closes GH-5062.

show more ...

# c141ee3f 06-Jan-2020 Nikita Popov

Allow arbitrary expressions in new/instanceof using () syntax

# 357fbc99 06-Jan-2020 Nikita Popov

Treat magic constants like normal constants

# ab154b7a 06-Jan-2020 Nikita Popov

Make class constants fully dereferencable

# de7c7efe 06-Jan-2020 Nikita Popov

Unify array and object dereferencability

# 465e6f53 06-Jan-2020 Nikita Popov

Split into fully_dereferencable and array_dereferencable

# cf5689e9 06-Jan-2020 Nikita Popov

Split class_constant from constant production

# 24e365f9 06-Jan-2020 Nikita Popov

Make encapsed strings fully dereferencable

This allows operations that were previously allowed on constant
strings on interpolated strings as well.

# 4cbffd89 01-Feb-2020 Akim Demaille

Clean up the generation of the parsers

Prefer '%define api.value.type' to '#define YYSTYPE', so that Bison
know the type.

Use '%code requires' to declare what is needed to defin

Clean up the generation of the parsers

Prefer '%define api.value.type' to '#define YYSTYPE', so that Bison
know the type.

Use '%code requires' to declare what is needed to define the api.value.type
(that code is output in the generated header before the generated
definition of YYSTYPE).

Prefer '%define api.prefix' inside the grammar file to '-p' outside,
as anyway the functions defined in the file actually use this prefix.

Prefer `%param` to both `%parse-param` and `%lex-param`.

Closes GH-5138

show more ...

# 2127a37b 01-Feb-2020 Akim Demaille

Bison: enable all the warnings and fix them

First, fix 5547d361208d90e12d53bb62bb2ffbbff9b93ca0: the definition of
YFLAGS was not passed into the Makefile: AC_SUBST does not suffice, we

Bison: enable all the warnings and fix them

First, fix 5547d361208d90e12d53bb62bb2ffbbff9b93ca0: the definition of
YFLAGS was not passed into the Makefile: AC_SUBST does not suffice, we
need PHP_SUBST_OLD. While at it, allow to pass variable and value at
the same time.

Then pass -Wall to bison, rather than only -Wempty-rules.

Use %precedence where associativity is useless.

Remove useless %precedence.
GH-5138

show more ...

# 37d0f7d3 30-Jan-2020 Akim Demaille

Use "%empty" in the parsers, instead of comments

The annotation %empty is properly enforced: warnings when it's
missing, and errors when it's inappropriate. Support for %empty was
i

Use "%empty" in the parsers, instead of comments

The annotation %empty is properly enforced: warnings when it's
missing, and errors when it's inappropriate. Support for %empty was
introduced in Bison 3.0.

Pass -Wempty-rule to Bison.

Closes GH-5134

show more ...

# a73df8e5 29-Jan-2020 Nikita Popov

Merge branch 'PHP-7.4'

* PHP-7.4:
Use "%define parse.error verbose"


# 5265fabc 28-Jan-2020 Akim Demaille

Use "%define parse.error verbose"

The YYERROR_VERBOSE macro will no longer be supported in Bison 3.6.
It was superseded by the "%error-verbose" directive in Bison 1.875
(2003-01-01).

Use "%define parse.error verbose"

The YYERROR_VERBOSE macro will no longer be supported in Bison 3.6.
It was superseded by the "%error-verbose" directive in Bison 1.875
(2003-01-01). Bison 2.6 (2012-07-19) clearly announced that support
for YYERROR_VERBOSE would be removed. Note that since Bison 3.0
(2013-07-25), "%error-verbose" is deprecated in favor of "%define
parse.error verbose".

Closes GH-5125.

show more ...

# 1caf0951 13-Jan-2020 Nikita Popov

Handle one more case I missed

# 5d869df7 13-Jan-2020 Nikita Popov

Make class name references use the class_name production

Throw a compile error for "static" references instead, where it
isn't already the case.

Also extract the code that does

Make class name references use the class_name production

Throw a compile error for "static" references instead, where it
isn't already the case.

Also extract the code that does that -- we have quite a few places
where we get a const class ref and require it to be default.

show more ...

# 2a3e37a4 13-Jan-2020 Nikita Popov

Don't use yystrlen()

This is unnecessary and not available when GLR is used.

12345678910>>...26