History log of /PHP-Parser/grammar/rebuildParsers.php (Results 1 – 25 of 35)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 3c3bcd31 29-Aug-2022 Nikita Popov

Also format the grammar directory


# 0ea134a5 19-Jun-2022 Nikita Popov

Add PHP 8 parser with correct concatenation precedence

The PHP 7 and PHP 8 parsers use the same grammar file and only
differ in token precedence.


# a38a60b7 19-Jun-2022 Nikita Popov

Move Tokens::T_* to Php7::T_*

Drop the separate tokens class, move them into the parser.


# d3d1297c 06-Jun-2022 Nikita Popov

Remove PHP 5 parser


# 2a4bb7ef 10-Apr-2021 Miguel

Moved phpy pseudo lang functions to separate file


# 4c22c627 13-Sep-2020 Tomas Votruba

[PHP 8.0] Add attributes support (#661)

Adds support for PHP 8 attributes, represented using `AttrGroup` nodes
containing `Attribute` nodes. The `attrGroup` subnode is added to all
n

[PHP 8.0] Add attributes support (#661)

Adds support for PHP 8 attributes, represented using `AttrGroup` nodes
containing `Attribute` nodes. The `attrGroup` subnode is added to all
nodes that can have attributes.

This is still missing FPPP support.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

show more ...


# d8b19d79 16-Jul-2020 Mikaël Mayer

Fixed rebuildParsers.php (#686)

phpyacc is a sh file and should not be run via the php interpreter, but directly.


# 46cbd939 09-Feb-2020 Nikita Popov

Place Nop nodes more precisely

If the Nop is created to collect comments, place it directly after
the comment, instead of at the next non-whitespace character.


Revision tags: v4.3.0, v4.2.5
# eacc5dbe 19-Oct-2019 Nikita Popov

Default to using php-yacc to generate the parsers


# 3226eb40 19-Oct-2019 Nikita Popov

Accept KMYACC env var in rebuildParsers.php


# 54c37f6b 19-Oct-2019 Nikita Popov

Remove -l flag from kmyacc invocation

For PHP this doesn't do anything anyway.


Revision tags: v4.2.4, v4.2.3, v4.2.2
# 60d025a9 11-May-2019 Nikita Popov

Fix attributes for zero-length nop nodes

Previously zero-length nop nodes used the lookahead start attributes
and current end attributes. This choice ends up being somewhat weird,
be

Fix attributes for zero-length nop nodes

Previously zero-length nop nodes used the lookahead start attributes
and current end attributes. This choice ends up being somewhat weird,
because the end attributes will be the at the last non-whitespace,
non-comment token, which might be quite far back. More problematically,
we may not have encountered any non-discarded token if we're at the
start of the file, in which case we will have no end attributes to
assign.

Change things to use a canonical "zero-length" node representation,
where the end position (token & file) will be exactly one before the
start position.

Fixes #589.

show more ...


Revision tags: v4.2.1, v4.2.0, v4.1.1, v4.1.0
# 5f73c4de 21-Sep-2018 Nikita Popov

Flexible doc: Validate end label indentation

Move doc string parsing logic from rebuildParsers.php and
String_::parseDocString() into ParserAbstract. This stuff is
going to get compl

Flexible doc: Validate end label indentation

Move doc string parsing logic from rebuildParsers.php and
String_::parseDocString() into ParserAbstract. This stuff is
going to get complicated now.

For now only implement the validation of the indentation on the
end label.

show more ...


Revision tags: v4.0.4, v4.0.3, v4.0.2, v4.0.1, v4.0.0, v3.1.5, v4.0.0beta1, v3.1.4, v4.0.0alpha3, v3.1.3, v4.0.0alpha2, v3.1.2, v4.0.0alpha1
# d418bf39 01-Oct-2017 Nikita Popov

Preserve comments on empty blocks (#382)


Revision tags: v3.1.1, v3.1.0, v3.0.6
# a6846e3b 28-Apr-2017 Nikita Popov

Always use Identifier nodes

The parser will now always generate Identifier nodes (for
non-namespaced identifiers). This obsoletes the useIdentifierNodes
parser option.

Node

Always use Identifier nodes

The parser will now always generate Identifier nodes (for
non-namespaced identifiers). This obsoletes the useIdentifierNodes
parser option.

Node constructors still accepts strings and will implicitly create
an Identifier wrapper. Identifier implement __toString(), so that
outside of strict-mode many things continue to work without changes.

show more ...


Revision tags: v3.0.5, v3.0.4, v3.0.3
# 414adfb1 20-Jan-2017 Nikita Popov

Drop useNopStatements option


# b5fb6f2d 20-Jan-2017 Nikita Popov

Don't require useNopStatements=false for format preservation

Instead assign attributes on Nop nodes and in the pretty printer
specially handle end<start offsets. It's a somewhat weird ca

Don't require useNopStatements=false for format preservation

Instead assign attributes on Nop nodes and in the pretty printer
specially handle end<start offsets. It's a somewhat weird case,
but not wrong per se given the meaning the offsets have.

show more ...


# 48d3243a 19-Jan-2017 Nikita Popov

Drop last vestiges of consistent var mode flag


# 1bfbd7bc 19-Jan-2017 Nikita Popov

Make useExpressionStatement only supported mode


# 4d2a4d02 23-Dec-2016 Nikita Popov

Add first shot at format preserving pretty printer


# 9b2d35d1 24-Dec-2016 Nikita Popov

Add expression statement mode


# 0f582e17 23-Dec-2016 Nikita Popov

Add VarLikeIdentifier

For representing Identifiers that have an implicit leading $.

With this done, maybe go one step further?
* Rename VarLikeIdentifier -> VarIdentifier / Var

Add VarLikeIdentifier

For representing Identifiers that have an implicit leading $.

With this done, maybe go one step further?
* Rename VarLikeIdentifier -> VarIdentifier / VarName
* Use VarIdentifier / VarName also as an inner node in Variable.
Not sure if this adds any real value.

show more ...


# a947e731 22-Dec-2016 Nikita Popov

Add useConsistentVariableNodes mode

The parameter case is a bit weird, because the subnode is called
"name" here, rather than "var". Nothing we can do about that in
this version thou

Add useConsistentVariableNodes mode

The parameter case is a bit weird, because the subnode is called
"name" here, rather than "var". Nothing we can do about that in
this version though.

The two parser options might be merged. I've kept it separate,
because I think this variable representation should become the
default (or even only representation) in the future, while I'm
less sure about the Identifier thing.

show more ...


# 6bcc6c31 22-Dec-2016 Nikita Popov

Add useIdentifierNodes mode to parser

In this mode non-namespaced names that are currently represented
using strings will be represented using Identifier nodes instead.
Identifier no

Add useIdentifierNodes mode to parser

In this mode non-namespaced names that are currently represented
using strings will be represented using Identifier nodes instead.
Identifier nodes have a string $name subnode and coerce to string.

This allows preserving attributes and in particular location
information on identifiers.

show more ...


Revision tags: v3.0.2, v3.0.1, v3.0.0, v3.0.0beta2
# f6eb341b 08-Oct-2016 Nikita Popov

Fix GroupUse prefix attribute assignment


12