Commit Graph

78 Commits

Author SHA1 Message Date
Nikita Popov
96b1c2145c Provide more macros for handling of interned strings
* str_erealloc behaves like erealloc for normal strings, but will
   use emalloc+memcpy for interned strings.
 * str_estrndup behaves like estrndup for normal strings, but will
   not copy interned strings.
 * str_strndup behaves like zend_strndup for normal strings, but
   will not copy interned strings.
 * str_efree_rel behaves like efree_rel for normal strings, but
   will not free interned strings.
 * str_hash will return INTERNED_HASH for interned strings and
   compute it using zend_hash_func for normal strings.
2013-09-13 19:42:10 +02:00
Nikita Popov
d2950ac279 Make use of Z_*VAL and ZVAL_* in language scanner 2013-09-13 15:08:01 +02:00
Stanislav Malyshev
ac343d5c1f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64936 - clean doc comment state at the beginning and end of the scan
  ws fix

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner.l
	Zend/zend_language_scanner_defs.h
2013-06-16 15:29:25 -07:00
Stanislav Malyshev
2208447d42 Fix bug #64936 - clean doc comment state at the beginning and end of the scan 2013-06-16 15:22:23 -07:00
Stanislav Malyshev
ac0aa5737e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix bug #64660 - yyparse can return 2, not only 1

Conflicts:
	Zend/zend_language_scanner.c
2013-05-20 00:57:34 -07:00
Stanislav Malyshev
fb58e69a84 fix bug #64660 - yyparse can return 2, not only 1 2013-05-20 00:52:38 -07:00
Dmitry Stogov
6e8aa09696 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64529 (Ran out of opcode space)

Conflicts:
	NEWS
	Zend/zend_execute_API.c
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
2013-03-28 00:08:11 +04:00
Dmitry Stogov
85e5e60777 Fixed bug #64529 (Ran out of opcode space) 2013-03-28 00:03:40 +04:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Sebastian Bergmann
8ca4288fd2 Leftover: Invoke re2c with --no-generation-date to prevent unintentional / unnecessary changes in generated files. 2012-12-06 09:43:27 +01:00
Dmitry Stogov
ba8a06fd95 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed compiler reenterability
  Fixed compiler reenterability

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
2012-11-14 18:03:38 +04:00
Dmitry Stogov
f99befadbd Fixed compiler reenterability 2012-11-14 17:47:27 +04:00
Nikita Popov
1823b16fa1 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
Merging master to fix Windows build

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_vm_def.h
2012-08-20 13:37:53 +02:00
Stanislav Malyshev
3336e1e78c Merge branch 'pull-request/31'
* pull-request/31:
  Fix lexing of nested heredoc strings in token_get_all()
2012-08-19 21:43:04 -07:00
Nikita Popov
f4ce364628 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
This is just an intial merge. It does not yet make generators and finally
work together.

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	Zend/zend_vm_execute.skl
	Zend/zend_vm_opcodes.h
2012-08-13 16:54:53 +02:00
Xinchen Hui
80d5ae3cea Implemented 'finally' keywords for php
RFC: https://wiki.php.net/rfc/finally
FR: https://bugs.php.net/bug.php?id=32100
and I have got some improvment ideas(performance), will implemented
later. thanks
2012-08-13 21:48:39 +08:00
Nikita Popov
d939d2dee5 Add sceleton for yield* expression
This does not yet actually implement any delegation.
2012-06-19 00:37:31 +02:00
Nikita Popov
9b101ac8b3 Add T_YIELD "yield" keyword 2012-05-15 18:30:48 +02:00
Felipe Pena
1c2c620a58 - Regenerated files 2012-04-30 15:57:09 -03:00
Felipe Pena
4deb0f1a0a - Regenerated files 2012-04-30 15:57:00 -03:00
Felipe Pena
1622843162 - Regenerated files 2012-04-30 10:35:28 -03:00
Felipe Pena
ea23192910 - Regenerated files 2012-04-30 10:35:11 -03:00
Nikita Popov
b233de098d Fix bug #61681: Malformed grammar
Generate T_STRING_VARNAME only if it actually is one. This is only the case
for "${varname}" and "${varname[offset]}" so we can just add a check for
} or [ after the LABEL.
2012-04-09 18:26:38 +02:00
Nikita Popov
4cf90e06c9 Fix lexing of nested heredoc strings in token_get_all()
This fixes bug #60097.

Before two global variables CG(heredoc) and CG(heredoc_len) were used to
track the current heredoc label. In order to support nested heredoc
strings the *previous* heredoc label was assigned as the token value of
T_START_HEREDOC and the language_parser.y assigned that to CG(heredoc).

This created a dependency of the lexer on the parser. Thus the
token_get_all() function, which accesses the lexer directly without
also running the parser, was not able to tokenize nested heredoc strings
(and leaked memory). Same applies for the source-code highlighting
functions.

The new approach is to maintain a heredoc_label_stack in the lexer, which
contains all active heredoc labels.

As it is no longer required, T_START_HEREDOC and T_END_HEREDOC now don't
carry a token value anymore.

In order to make the work with zend_ptr_stack in this context more
convenient I added a new function zend_ptr_stack_top(), which retrieves the
top element of the stack (similar to zend_stack_top()).
2012-03-31 21:53:30 +02:00
Gustavo André dos Santos Lopes
68990224be Merge branch '5.3' into 5.4
Zend/zend_language_scanner.c and Zend/zend_language_scanner_defs.h had to be changed manually.
2012-03-28 08:57:19 +01:00
Gustavo André dos Santos Lopes
c6e15455a3 Revert "- fix bug #61504, fix build errors on windows and possibly other"
This reverts commit 74ee335e3a.
2012-03-28 08:41:18 +01:00
Pierre Joye
74ee335e3a - fix bug #61504, fix build errors on windows and possibly other 2012-03-28 01:59:41 +02:00
Etienne Kneuss
86fcb9659e Fix #61095 (Lexing 0x0*+<NUM> incorrectly) 2012-02-20 18:28:57 +00:00
Nuno Lopes
71843491d3 regen for r321655 2012-01-01 22:52:23 +00:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Ilia Alshanetsky
3f5ad237e1 Fixed Bug #53629 (memory leak inside highlight_string()). 2011-01-03 14:39:48 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
4e606e3ceb - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3) 2010-06-30 02:45:10 +00:00
Felipe Pena
96bb25e8e7 - Reverted fix for bug #48930 (due binary compatibility breakage) 2010-06-29 11:37:13 +00:00
Felipe Pena
9b07568c43 - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3) 2010-06-27 21:46:16 +00:00
Pierre Joye
15a3c450b7 - those are in 5.3.2 now, merge to 5.3.2 section is coming 2010-02-11 21:17:13 +00:00
Sebastian Bergmann
d2281d1dff sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
Felipe Pena
5dd6b9ffa9 - Fixed bug #50145 (crash while running bug35634.phpt) 2009-11-17 11:18:40 +00:00
Jani Taskinen
0f1b93a1ca - Fix skips 2009-09-10 15:05:34 +00:00
Matt Wilmas
e7c5f3cfa4 Regenerate 2009-05-05 01:44:52 +00:00
Dmitry Stogov
7ef3db0e4e Fixed bug #47516 (nowdoc can not be embed in heredoc but can be embed in double quote) 2009-03-26 12:37:54 +00:00
Dmitry Stogov
bcd9099b28 Fixed bug #47038 (Memory leak in include) 2009-03-25 15:23:58 +00:00
Brian Shire
dd031eee68 MFH: Fix scanner handling of NULL values in heredoc, nowdoc, strings, comments, and non-parsed content. 2009-03-16 01:40:14 +00:00
Brian Shire
9c16bfa194 MFH: Add proper EOF handling for language scanner. Fixes bug #46817. 2009-03-11 22:11:53 +00:00
Rasmus Lerdorf
8eea998406 Unmangle 2009-02-14 21:20:16 +00:00
Rasmus Lerdorf
70ecb3074a 2.4.1 is safe 2009-02-14 21:08:02 +00:00
Ilia Alshanetsky
71ea95354b MFH: Corrected fix for bug #46844 to only trigger on the 1st line of CLI
opened files.
2009-01-09 17:21:12 +00:00
Felipe Pena
bfcea7ffa8 - MFH: Year++ 2009-01-02 20:45:43 +00:00
Ilia Alshanetsky
fec58a89ee Fixed bug #46844 (php scripts or included files with first line starting
with # have the 1st line missed from the output).
2009-01-01 20:16:24 +00:00