Hi,

On Wed, Feb 11, 2015 at 3:08 PM, Ulya Fokanova <skvad...@gmail.com> wrote:

>   We use re2c in PHP quite a lot as you probably know (one of your tests
> is for zend_language_scanner...). I think there are 4 scanners (language,
> ini system, phar path check and serialization) in PHP 5. I have recently
> added another one which is a json scanner (
> https://github.com/php/php-src/blob/master/ext/json/json_scanner.re )
> which will be part of upcoming PHP 7.
>
> I'll add all five to re2c test collection (and update the existing one).
> If you have some other valuable re2c code, I can add it either.
>

That's great! There are actually few more than that. :) Here is the list
with all that I found

flags: --case-inverted -cbdFt
https://github.com/php/php-src/blob/master/Zend/zend_language_scanner.l
https://github.com/php/php-src/blob/master/Zend/zend_ini_scanner.l

flags: -cbdf
https://github.com/php/php-src/blob/master/sapi/phpdbg/phpdbg_lexer.l

flags: -b
https://github.com/php/php-src/blob/master/ext/standard/var_unserializer.re
https://github.com/php/php-src/blob/master/ext/standard/url_scanner_ex.re
https://github.com/php/php-src/blob/master/ext/phar/phar_path_check.re
https://github.com/php/php-src/blob/master/ext/date/lib/parse_iso_intervals.re

flags: -bci
https://github.com/php/php-src/blob/master/ext/json/json_scanner.re


If I missed some flag than the Makefiles for all of them can be found:
https://github.com/php/php-src/blob/master/Makefile.frag
https://github.com/php/php-src/blob/master/sapi/phpdbg/Makefile.frag
https://github.com/php/php-src/blob/master/ext/standard/Makefile.frag
https://github.com/php/php-src/blob/master/ext/phar/Makefile.frag
https://github.com/php/php-src/blob/master/ext/json/Makefile.frag

Thanks a lot.

If you see something wrong (some mistakes or things that should be
deprecated) especially in json, please let me know and I will try to sort
it out. ;)


>   This will basically break all our scanners. I don't think that it's a
> good idea to break it without giving any time for preparation. We could
> just add switch for specific version and keep the old name. However I don't
> think that this is a good solution of the migration problem.I think it
> would be good to allow both definition. You could basically generate
> something like this:
>
>  #ifndef RE2C_CURSOR
>  #define RE2C_CURSOR YYCURSOR
>  #endif
>
> The problem is, YYCURSOR doesn't have to be defined as a macro, it can be
> defined as a variable:
>
> YYCTYPE * YYCURSOR;
>
> or as an inplace configuration:
>
> YYCTYPE * cursor;
> ...
> /*!re2c
> ...
>     re2c:define:YYCURSOR = cursor;
> ...
> */
>
> So there is no easy way to migrate.
>

Oh forgot about that. Apology for that!

Thanks a again.

Jakub
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Re2c-general mailing list
Re2c-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/re2c-general

Reply via email to