Xinchen Hui
4e84f72554
Fix test failed due to new Token T_YIELD
2012-09-02 13:15:23 +08: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
5ee3bf1647
add finally
2012-08-19 21:43:16 -07: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
99f93dd9a8
Add T_YIELD in tokenizer_data.c
...
Also had to fix up some tokenizer tests that were affected by the token
number changes.
2012-07-22 20:32:56 +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
Felipe Pena
8775a37559
- Year++
2012-01-01 13:15:04 +00:00
Stanislav Malyshev
0d591e599f
Fixed bug #54084 (token_get_all with regards to __halt_compiler is not binary safe)
2011-11-08 04:59:17 +00:00
Felipe Pena
8db63e8874
- Drop T_SCALAR_CAST
2011-08-16 12:13:35 +00:00
Hannes Magnusson
306c42023e
Callable typehint following the rules of is_callable($arg, false);
2011-08-16 10:44:47 +00:00
Stefan Marr
dbc6849bca
Added __TRAIT__ magic constant [TRAITS] [DOC]
...
# __TRAIT__ behaves like __CLASS__ more or less but is constraint to traits.
# Since traits are not types, there are not many valid use cases, and trying
# to use __TRAIT__ to make traits more like classes is discouraged.
2011-07-31 17:39:30 +00:00
Stefan Marr
03f514d0a0
Added: SKIP when tokenizer extension is not available
2011-07-31 16:35:09 +00:00
Felipe Pena
da376383e8
- Make usage of new PHP_FE_END macro
2011-07-25 11:35:02 +00:00
Stanislav Malyshev
aa29bd5d73
and clean the tokenizer too
2011-06-03 01:16:01 +00:00
Stanislav Malyshev
b7ed1bcb20
forgot tokenizer...
2011-05-15 00:48:05 +00:00
Ilia Alshanetsky
1d984a7ffd
Fixed bug #54089 (token_get_all() does not stop after __halt_compiler).
2011-02-28 15:18:27 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +00:00
Johannes Schlüter
ebb978df61
Set svn properties
2010-11-22 22:27:06 +00:00
Johannes Schlüter
a876e54196
- Update tokenizer data
2010-11-22 21:56:18 +00:00
Johannes Schlüter
27299b7e40
- token_get_all now returns false on error, not "", returns array on success
2010-05-30 09:34:02 +00:00
Ilia Alshanetsky
847f519d41
Fixed tests
2010-05-24 18:52:36 +00:00
Ilia Alshanetsky
6ce4737d94
Fixed tests
2010-05-20 22:53:38 +00:00
Rob Richards
0a34d10783
revert change #298288 : Remove old dsp/dsw/makefile files
2010-04-28 14:41:51 +00:00
Felipe Pena
78f43a53f7
- Fixed tests
2010-04-26 14:15:44 +00:00
Kalle Sommer Nielsen
518a17e7bf
Remove old dsp/dsw/makefile files, these arent used by the build system anymore and are barely updated nor available for all extensions
2010-04-21 23:36:49 +00:00
Sebastian Bergmann
9ba1e81665
sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
2010-01-03 09:23:27 +00:00
Dmitry Stogov
bcd9099b28
Fixed bug #47038 (Memory leak in include)
2009-03-25 15:23:58 +00:00
Brian Shire
2a6006c4e6
MFH: fix tokenizer makefile dependencies on parser/scanner files when built dynamically. (See bug #38762 )
2009-03-02 03:54:04 +00:00
Sebastian Bergmann
08659c2dcd
MFH: Bump copyright year, 3 of 3.
2008-12-31 11:15:49 +00:00
Felipe Pena
cfe152206c
- Bug #46957 (The tokenizer returns deprecated values)
2008-12-27 23:16:56 +00:00
Felipe Pena
fc2fb50d09
- MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro
2008-11-17 11:28:01 +00:00
Felipe Pena
7a37fa2d6b
- Revert ZEND_BEGIN_ARG_INFO change
2008-11-02 21:19:39 +00:00
Felipe Pena
df10005563
- MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro
2008-10-24 14:35:40 +00:00
Dmitry Stogov
478acfd8b4
. Added support for using static HEREDOCs to initialize static variables and class members or constants. (Matt)
...
. Improved syntax highlighting and consistency for variables in double-quoted strings and literal text in HEREDOCs and backticks. (Matt)
. Optimized interpolated strings to use one less opcode. (Matt)
2008-07-26 15:30:28 +00:00
Moriyoshi Koizumi
bb35ab45bb
- MFH: suppress signedness warnings
2008-07-25 03:42:01 +00:00
Felipe Pena
f2d0da3c29
- Fixed folding
2008-06-23 17:28:06 +00:00
Felipe Pena
ca0166605c
- Added arginfo
2008-06-23 17:17:46 +00:00
Dmitry Stogov
8d260b6b71
Fixed memory leak
2008-06-11 07:45:44 +00:00
Felipe Pena
f8b3482861
Fix WS.
...
# My editor accidentally changed tab to space, sorry.
2008-03-30 22:01:44 +00:00
Felipe Pena
b3ded59e3e
- Added T_GOTO
...
- Fixed tests
2008-03-30 21:48:24 +00:00
Steve Seear
4c2b3336a2
Adding tokenizer test
2008-03-19 17:43:50 +00:00
Marcus Boerger
af316021e8
- Rewrite scanner to be based on re2c instead of flex
...
The full patch is available as:
http://php.net/~helly/php-re2c-5.3-20080316.diff.txt
This is against php-re2c repository version 98
An older patch against version 97 is available under:
http://php.net/~helly/php-re2c-97-20080316.diff.txt
2008-03-16 21:06:55 +00:00
Dmitry Stogov
82b31e01ae
Added NOWDOC
2008-02-12 09:28:01 +00:00
Stanislav Malyshev
ad7e2f8712
HNY
2008-02-12 00:45:14 +00:00
Stanislav Malyshev
3ffa0df5e7
add T_DIR
2008-02-12 00:42:20 +00:00
Nuno Lopes
61eb7ae554
remove unused PHP_EXTNAME_API macros.
...
#in preparation for the gcc 4 visibility patch
2008-01-03 16:20:33 +00:00
Sebastian Bergmann
d1dded8751
MFH: Bump copyright year, 2 of 2.
2007-12-31 07:17:19 +00:00
Hannes Magnusson
70b10b2b39
Fix test
2007-12-16 19:17:54 +00:00
Raghubansh Kumar
035dc8bdf6
New testcases for token_get_all() function
2007-12-14 16:21:33 +00:00
Antony Dovgal
90e650fb25
T_IMPORT nuked
2007-11-07 09:18:52 +00:00