summaryrefslogtreecommitdiff
path: root/ext/tokenizer/tokenizer.c
Commit message (Collapse)AuthorAgeFilesLines
* Make sure TOKEN_PARSE mode is thread safeNikita Popov2016-07-231-8/+10
| | | | | | Introduce an on_event_context passed to the on_event hook. Use this context to pass along the token array. Previously this was stored in a non-tls global :/
* Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
| * bump yearXinchen Hui2015-01-151-1/+1
| |
* | Don't return T_ERROR from token_get_all()Nikita Popov2015-07-091-3/+3
| | | | | | | | | | | | This turned out to be rather inconvenient after all. Instead just return the same output we did on PHP 5. If people want to have an error, use TOKEN_PARSE.
* | Fix bug #69430Nikita Popov2015-07-091-20/+9
| | | | | | | | | | Don't throw from token_get_all() unless TOKEN_PARSE is used. Errors are reported as T_ERROR tokens.
* | Update token_get_all() arginfoNikita Popov2015-07-091-1/+2
| |
* | Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few ↵Dmitry Stogov2015-06-121-2/+3
| | | | | | | | | | | | places). Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
* | ext tokenizer port + cleanup unused lexer statesMárcio Almada2015-04-301-17/+115
| | | | | | | | | | | | | | | | | | | | | | we basically added a mechanism to store the token stream during parsing and exposed the entire parser stack on the tokenizer extension through an opt in flag: token_get_all($src, TOKEN_PARSE). this change allows easy future language enhancements regarding context aware parsing & scanning without further maintance on the tokenizer extension while solves known inconsistencies "parseless" tokenizer extension has when it handles `__halt_compiler()` presence.
* | fix indentation + remove c++ commentsMárcio Almada2015-04-301-5/+5
| |
* | Throw ParseException from lexerNikita Popov2015-04-021-0/+2
| | | | | | | | | | | | | | Primarily to avoid getting fatal errors from token_get_all(). Implemented using a magic E_ERROR token, which the lexer emits to force a parser failure.
* | cleanup mod version macros and mod defs, round xAnatol Belski2015-03-231-5/+1
| |
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | trailing whitespace removalStanislav Malyshev2015-01-101-1/+1
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-9/+9
| |
* | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| |
* | Avoid double IS_INTERNED() checkDmitry Stogov2014-09-191-1/+1
| |
* | master renames phase 1Anatol Belski2014-08-251-7/+7
| |
* | fixes to tokenizerAnatol Belski2014-08-191-2/+2
| |
* | basic macro replacements, all at onceAnatol Belski2014-08-191-4/+4
| |
* | Cleanup (1-st round)Dmitry Stogov2014-04-151-3/+3
| |
* | Port tokenizer extensionNikita Popov2014-04-101-24/+20
|/
* Bump yearXinchen Hui2014-01-031-1/+1
|
* Happy New YearXinchen Hui2013-01-011-1/+1
|
* Fix lexing of nested heredoc strings in token_get_all()Nikita Popov2012-03-311-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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()).
* - Year++Felipe Pena2012-01-011-1/+1
|
* Fixed bug #54084 (token_get_all with regards to __halt_compiler is not ↵Stanislav Malyshev2011-11-081-6/+26
| | | | binary safe)
* - Make usage of new PHP_FE_END macroFelipe Pena2011-07-251-1/+1
|
* Fixed bug #54089 (token_get_all() does not stop after __halt_compiler).Ilia Alshanetsky2011-02-281-0/+4
|
* - Year++Felipe Pena2011-01-011-1/+1
|
* - token_get_all now returns false on error, not "", returns array on successJohannes Schlüter2010-05-301-2/+3
|
* sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-031-1/+1
|
* Fixed bug #47038 (Memory leak in include)Dmitry Stogov2009-03-251-4/+1
|
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|
* - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macroFelipe Pena2008-11-171-2/+0
|
* - Revert ZEND_BEGIN_ARG_INFO changeFelipe Pena2008-11-021-0/+2
|
* - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macroFelipe Pena2008-10-241-2/+0
|
* . Added support for using static HEREDOCs to initialize static variables and ↵Dmitry Stogov2008-07-261-1/+1
| | | | | | | | 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)
* - MFH: suppress signedness warningsMoriyoshi Koizumi2008-07-251-2/+2
|
* - Fixed foldingFelipe Pena2008-06-231-1/+1
|
* - Added arginfoFelipe Pena2008-06-231-2/+14
|
* Fixed memory leakDmitry Stogov2008-06-111-0/+4
|
* - Rewrite scanner to be based on re2c instead of flexMarcus Boerger2008-03-161-60/+2
| | | | | | | | | 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
* Added NOWDOCDmitry Stogov2008-02-121-1/+1
|
* MFH: Bump copyright year, 2 of 2.Sebastian Bergmann2007-12-311-1/+1
|
* Improved memory usage by movig constants to read only memory. (Dmitry, Pierre)Dmitry Stogov2007-09-271-1/+1
|
* - MFH: Use a script to generate tokenizer data from zend_language_parser.hJohannes Schlüter2007-07-311-244/+1
|
* Improved compilation of heredocs and interpolated strings. (Matt, Dmitry)Dmitry Stogov2007-05-181-5/+8
|
* - MFH: Added linenumbers to array returned by token_get_all()Johannes Schlüter2007-04-081-0/+4
|
* MFH: nuke skeleton leftoversAntony Dovgal2007-01-121-35/+0
|