Commit Graph

144 Commits

Author SHA1 Message Date
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Ferenc Kovacs
1e2a4a67dd use ./tokenizer_data_gen.sh to for adding T_POW & T_POW_EQUAL 2014-06-08 00:01:01 +02:00
Ferenc Kovacs
016b1f089e Fix bug #67392: token_name() does not return name for T_POW and T_POW_EQUAL token 2014-06-07 15:27:54 +02:00
Lior Kaplan
23d952ed60 Merge branch 'PHP-5.5' into PHP-5.6 2014-02-14 17:15:35 +02:00
Lior Kaplan
c09bd9def0 Merge branch 'PHP-5.4' into PHP-5.5 2014-02-14 15:30:00 +02:00
Veres Lajos
35101e9ef4 a few typofixes 2014-02-14 14:51:10 +02:00
datibbaw
aff56f3c45 add T_POW (**) operator
Fixed recognition of the operator

Added opcode, still doing multiply instead of pow()

opcode now always returns int(42)

The right answer, but always a float

Yanked code from pow() implementation.

Should not handle negative long as exponent ourselves

Added test cases from pow()

Moved precedence higher than '~'

Added GMP operator overloading

Added ZEND_ASSIGN_POW (**=) operator.

Added pow() as a language construct.

Adjusted test cases for changed precedence.

Reduced pow() to shell function around ZEND_API pow_function()

Reduced test case to only contain edge cases
Added overloading test case

Moved unary minus above T_POW

Revert "Added pow() as a language construct."

Bad bad bad idea.

This reverts commit f60b98cf7a8371233d800a6faa286ddba4432d02.

Reverted unary minus behaviour due to previous revert.
Convert arrays to int(0)
Exponent with array as a base becomes int(0)

Rebase against master

Fixed tokenizer test case
2014-02-06 14:41:21 +01:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Nikita Popov
0d7a638866 Implement variadic function syntax
As per RFC: https://wiki.php.net/rfc/variadics
2013-09-26 18:39:17 +02: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
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
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Stanislav Malyshev
5063a77128 Fixed bug #54084 (token_get_all with regards to __halt_compiler is not binary safe) 2011-11-08 04:59:17 +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
Felipe Pena
17abf879ed - 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
Hannes Magnusson
550980cfe5 Callable typehint following the rules of is_callable($arg, false); 2011-08-16 10:44:47 +00:00
Stefan Marr
0158804a15 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
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
7e5a214251 Added: SKIP when tokenizer extension is not available 2011-07-31 16:35:09 +00:00
Stefan Marr
03f514d0a0 Added: SKIP when tokenizer extension is not available 2011-07-31 16:35:09 +00:00
Felipe Pena
4b30846b50 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00
Felipe Pena
da376383e8 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00
Stanislav Malyshev
aea69cb06a and clean the tokenizer too 2011-06-03 01:16:01 +00:00
Stanislav Malyshev
aa29bd5d73 and clean the tokenizer too 2011-06-03 01:16:01 +00:00
Stanislav Malyshev
654aa838cd forgot tokenizer... 2011-05-15 00:48:05 +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