summaryrefslogtreecommitdiff
path: root/ext/tokenizer
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge branch 'PHP-7.4'Nikita Popov2019-09-141-0/+31
|\ \ | |/
| * Fix double-free on invalid large octal with separatorsNikita Popov2019-09-141-0/+31
| | | | | | | | | | | | | | | | To clean up the mess here a bit, check for invalid octal digits with an explicit loop instead of mixing this into the string to number conversion. Also clean up some type usage.
* | Merge branch 'PHP-7.4'Christoph M. Becker2019-09-044-0/+8
|\ \ | |/ | | | | | | * PHP-7.4: Add the last missing SKIPIF
| * Add the last missing SKIPIFFabien Villepinte2019-09-044-0/+8
| |
* | Merge branch 'PHP-7.4'Nikita Popov2019-08-271-4/+4
|\ \ | |/
| * Don't specify precedence for T_INC/T_DECNikita Popov2019-08-271-4/+4
| | | | | | | | | | As these do not operate on expressions, precedence is meaningless for them.
* | Arginfo stubs for tokenizerStephen Reay2019-08-113-11/+17
| |
* | Merge branch 'PHP-7.4'Nikita Popov2019-07-161-0/+19
|\ \ | |/
| * Support <?php followed by EOFNikita Popov2019-07-161-0/+19
| | | | | | | | This is an annoying edge-case for canonicalization.
* | Merge branch 'PHP-7.4'Nikita Popov2019-07-152-0/+49
|\ \ | |/
| * Emit T_BAD_CHARACTER for unexpected charactersNikita Popov2019-07-152-0/+49
| | | | | | | | | | Avoid having holes in the token stream which are annoying and inefficient to reconstruct on the consumer side.
* | Merge branch 'PHP-7.4'Nikita Popov2019-07-121-0/+24
|\ \ | |/
| * Don't split T_INLINE_HTML at partial PHP tagNikita Popov2019-07-121-0/+24
| | | | | | | | | | If <?php occurs without required trailing whitespace, we should keep it as part of a single T_INLINE_HTML region.
* | Merge branch 'PHP-7.4'Nikita Popov2019-06-171-116/+96
|\ \ | |/
| * Remove unnecessary short_open_tags use in tokenizer testGeorge Peter Banyard2019-06-171-116/+96
| |
* | Merge branch 'PHP-7.4'Nikita Popov2019-06-111-2/+0
|\ \ | |/
| * Remove unnecessary short_open_tag INI directive in testsGeorge Peter Banyard2019-06-111-2/+0
| | | | | | | | Closes GH-4249.
* | Merge branch 'PHP-7.4'Peter Kokot2019-05-141-20/+23
|\ \ | |/ | | | | | | * PHP-7.4: Enhance the tokenizer data generator script
| * Enhance the tokenizer data generator scriptPeter Kokot2019-05-141-20/+23
| | | | | | | | | | | | | | Changes: - executable from any location (for example, project root) - some minor common shell scripts CS fixes - error reporting done based on the presence of the parser file
* | Merge branch 'PHP-7.4'Peter Kokot2019-05-121-2/+0
|\ \ | |/ | | | | | | * PHP-7.4: Normalize comments in *nix build system m4 files
| * Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-2/+0
| | | | | | | | | | | | | | | | | | Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
* | Merge branch 'PHP-7.4'Nikita Popov2019-05-021-0/+2
|\ \ | |/
| * Implement arrow functionsNikita Popov2019-05-021-0/+2
| | | | | | | | | | | | | | Per RFC: https://wiki.php.net/rfc/arrow_functions_v2 Co-authored-by: Levi Morrison <levim@php.net> Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
* | Merge branch 'PHP-7.4'Nikita Popov2019-03-281-4/+11
|\ \ | |/
| * Revert "Switch to bison location tracking"Nikita Popov2019-03-281-4/+11
| | | | | | | | | | | | | | | | | | | | | | This reverts commit e528762c1c59bc0bd0bd6d78246c14269630cf0f. Dmitry reports that this has a non-trivial impact on parsing overhead, especially on 32-bit systems. As we don't have a strong need for this change right now, I'm reverting it. See also comments on https://github.com/php/php-src/commit/e528762c1c59bc0bd0bd6d78246c14269630cf0f.
* | Merge branch 'PHP-7.4'Peter Kokot2019-03-242-22/+22
|\ \ | |/ | | | | | | * PHP-7.4: Fix tokenizer_data_gen.sh for non-posix bison
| * Fix tokenizer_data_gen.sh for non-posix bisonGuilliam Xavier2019-03-242-22/+22
| | | | | | | | | | And run it to update tokenizer_data.c after recent changes in zend_language_parser.y that reordered some tokens
* | Merge branch 'PHP-7.4'Nikita Popov2019-03-211-11/+4
|\ \ | |/
| * Switch to bison location trackingNikita Popov2019-03-211-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Locations for AST nodes are now tracked with the help of bison location tracking. This is more accurate than what we currently do and easier to extend with more information. A zend_ast_loc structure is introduced, which is used for the location stack. Currently it only holds the start lineno, but can be extended to also hold end lineno and offset/column information in the future. All AST constructors now accept a zend_ast_loc* as first argument, and will use it to determine their lineno. Previously this used either the CG(zend_lineno), or the smallest AST lineno of child nodes. On the parser side, the location structure for a whole rule can be obtained using the &@$ character salad.
* | Merge branch 'PHP-7.4'Dmitry Stogov2019-03-121-6/+0
|\ \ | |/ | | | | | | * PHP-7.4: Cleanup unused module globals
| * Cleanup unused module globalsDmitry Stogov2019-03-121-6/+0
| |
* | Adjust tests for zpp TypeError changeNikita Popov2019-03-112-15/+0
|/
* More zpp error/variation test removalsNikita Popov2019-03-081-37/+0
|
* Clean *nix build systemPeter Kokot2019-03-071-2/+0
| | | | | | | | - remove some outdated and not used macro calls - remove some unused variables - Remove not needed comment from tokenizer config.m4 - Remove not needed comment - remove not needed local variables for editors and syntax highlighting
* Add AS_HELP_STRING to *nix build configure optionsPeter Kokot2019-03-071-2/+5
| | | | | | | | The Autoconf's default AS_HELP_STRING macro can properly format help strings [1] so watching out if columns are aligned manually is not anymore. [1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
* Remove zpp variation testsNikita Popov2019-02-051-287/+0
|
* Remove local variablesPeter Kokot2019-02-032-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* Remove yearly range from copyright noticeZeev Suraski2019-01-304-4/+4
|
* Implement ??= operatorNikita Popov2019-01-221-0/+3
| | | | | | | | | RFC: https://wiki.php.net/rfc/null_coalesce_equal_operator $a ??= $b is $a ?? ($a = $b), with the difference that $a is only evaluated once, to the degree that this is possible. In particular in $a[foo()] ?? $b function foo() is only ever called once. However, the variable access themselves will be reevaluated.
* Make tokenizer test robust against token renumberingNikita Popov2019-01-221-26/+5
|
* Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-153-3/+3
| | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Trim trailing whitespace in *.phptPeter Kokot2018-10-1414-25/+25
|
* Trim trailing whitespace in testsGabriel Caruso2018-10-145-9/+9
|
* Sync leading and final newlines in source code filesPeter Kokot2018-10-142-3/+0
| | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Fixed bug #76991Nikita Popov2018-10-101-0/+38
| | | | | Back up exceptions while the scan-ahead loop, to avoid an early bail out.
* Run tokenizer_data_gen.sh to reorganize tokensGabriel Caruso2018-07-291-70/+70
| | | | This will help us in future PRs, reducing the numbers of changed lines
* Remove unused Git attributes identPeter Kokot2018-07-256-10/+0
| | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized ↵Dmitry Stogov2018-07-041-3/+3
| | | | | | | destructors. zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places. Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
* Fix typos...Nikita Popov2018-06-271-1/+1
|
* Fixed bug #76538Nikita Popov2018-06-272-9/+22
|