Hi all,
Brian, not sure if you're still trying to work on other scanner changes to
fix things, but wanted to say that I should have something (soon, whenever)
to fix the issues with \0 in strings/comments and/or YYFILL returning too
soon (maybe that's fixed, don't know). Basically, my idea is to just do a
"manual scan" in a few places, and take re2c out of the equation there.
Would also make code smaller/simpler, and maybe a bit faster. e.g. good even
if re2c is fixed.
Actually... I guess my idea wouldn't affect YYFILL's behavior, but it may
make it easier to fix if you don't have to worry about matching \0 in an
re2c rule (because manual scan)? So the problem would just be with other
variable length patterns trying to match at EOF -- labels, numbers,
WHITESPACE, etc.
Like I've said previously, I don't understand how re2c can't correctly deal
with EOF. In the simplest form, if you had one re2c rule:
[a-z]+
It wouldn't even match with "foo" as the input string! :-/
- Matt
----- Original Message -----
From: "Lukas Kahwe Smith"
Sent: Thursday, March 26, 2009
Bringing this back to the list since its still relevant apparently.
On 26.03.2009, at 19:43, shire wrote:
Lukas Kahwe Smith wrote:
Also Marcus had some comments about your
"ZendEngine2/zend_language_scanner.c" change:
" thanks for looking into this. The patch looks pretty good for the
most
part. But you effectively create a BC issue here becuase you no longer
allow \0 inside a php file or string. You might want to test whether
a length check in your NULL rules fixes that. That check would either
return the \0 if inside the code or return 0 if in the lookahead
block."
Did the above things get fixed yet?
Yes, these where both the same issue and have been fixed (allowing nulls
in the code). I think we could probably make better changes here but it
will be fine for the time being
Ok.
There was another bug here http://bugs.php.net/bug.php?id=47596 that is
slightly related, I made an update in the comments. Dmitry just put in
a temporary fix so that we can release this way if needed, however we
should make a longer term fix for the actual problem at some point.
Dmitry?
regards,
Lukas Kahwe Smith
m...@pooteeweet.org
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php