FAQ
Hi all,

First, I just realized while going through the scanner code after the re2c
changes that there's a bug with heredoc handling (from my code changes last
year, oops) on something like:

<<<EOT
text
fooEOT
text
EOT;

Patch for 5.2 with just that fix:
http://realplain.com/php/heredoc_fix_5_2.diff

For 5.3 and HEAD, I fixed problems with yyleng (some would only affect
highlighting, tokenizer ext, etc.) Double quoted heredocs with tabs/spaces
wouldn't work right (ex: <<< "EOT"). Updated some comments. And this
rule that was added...

<ST_LOOKING_FOR_PROPERTY>{WHITESPACE}+ {
/* do nothing */
goto restart;
}

Would lose that whitespace in highlighter, etc. or miss counting line
numbers. Speaking of line numbers, I also removed the
CG(comment_start_line) variable since I can't see that it's needed anywhere,
and CG(zend_lineno) works for the "Unterminated comment..." warning (which
isn't working right now anyway :-)).

In HEAD I also tidied up the LNUM/HNUM rules which lost their tabs and Z_*
macros a year ago (v1.164).

http://realplain.com/php/scanner_fixes.diff
http://realplain.com/php/scanner_fixes_5_3.diff


- Matt

Search Discussions

  • Scott MacVicar at Apr 8, 2008 at 4:12 pm
    Thanks Matt,

    I'll review these and merge them in with my other scanner fixes.

    Scott

    Matt Wilmas wrote:
    Hi all,

    First, I just realized while going through the scanner code after the re2c
    changes that there's a bug with heredoc handling (from my code changes last
    year, oops) on something like:

    <<<EOT
    text
    fooEOT
    text
    EOT;

    Patch for 5.2 with just that fix:
    http://realplain.com/php/heredoc_fix_5_2.diff

    For 5.3 and HEAD, I fixed problems with yyleng (some would only affect
    highlighting, tokenizer ext, etc.) Double quoted heredocs with tabs/spaces
    wouldn't work right (ex: <<< "EOT"). Updated some comments. And this
    rule that was added...

    <ST_LOOKING_FOR_PROPERTY>{WHITESPACE}+ {
    /* do nothing */
    goto restart;
    }

    Would lose that whitespace in highlighter, etc. or miss counting line
    numbers. Speaking of line numbers, I also removed the
    CG(comment_start_line) variable since I can't see that it's needed anywhere,
    and CG(zend_lineno) works for the "Unterminated comment..." warning (which
    isn't working right now anyway :-)).

    In HEAD I also tidied up the LNUM/HNUM rules which lost their tabs and Z_*
    macros a year ago (v1.164).

    http://realplain.com/php/scanner_fixes.diff
    http://realplain.com/php/scanner_fixes_5_3.diff


    - Matt
  • Matt Wilmas at Apr 10, 2008 at 1:50 pm
    Hi Scott,

    I noticed that Nuno changed yyless() to be like flex after your commit (not
    in HEAD? I considered that, but figured you guys wanted it different :-)),
    but now the heredoc end part is wrong again (hehe), and I see Tony reported
    the broken tests... Attached patch puts it back to pre-re2c state. Also
    remembered a useless "case EOF;" to remove in zendlex() to match HEAD's
    (added at end of '05 (v1.647.2.18) for bug #35382, later fixed in the
    scanner; doesn't look like it ever did much anyway).

    BTW, maybe you could change the name in that 5.2 NEWS entry to just "Matt"?
    No big deal, but that's what it's been other than the first few entries. :-)


    Thanks,
    Matt


    ----- Original Message -----
    From: "Scott MacVicar"
    Sent: Tuesday, April 08, 2008
    Thanks Matt,

    I'll review these and merge them in with my other scanner fixes.

    Scott
  • Nuno Lopes at Apr 10, 2008 at 7:20 pm
    Patch applied, thanks!
    I haven't merged my other patch to HEAD yet, but I'll do so ASAP.

    Thanks,
    Nuno

    ----- Original Message -----
    Hi Scott,

    I noticed that Nuno changed yyless() to be like flex after your commit
    (not
    in HEAD? I considered that, but figured you guys wanted it different
    :-)),
    but now the heredoc end part is wrong again (hehe), and I see Tony
    reported
    the broken tests... Attached patch puts it back to pre-re2c state. Also
    remembered a useless "case EOF;" to remove in zendlex() to match HEAD's
    (added at end of '05 (v1.647.2.18) for bug #35382, later fixed in the
    scanner; doesn't look like it ever did much anyway).

    BTW, maybe you could change the name in that 5.2 NEWS entry to just
    "Matt"?
    No big deal, but that's what it's been other than the first few entries.
    :-)


    Thanks,
    Matt


    ----- Original Message -----
    From: "Scott MacVicar"
    Sent: Tuesday, April 08, 2008
    Thanks Matt,

    I'll review these and merge them in with my other scanner fixes.

    Scott
  • Marcus Boerger at Apr 10, 2008 at 4:48 pm
    Hello Matt,

    Thursday, April 10, 2008, 3:50:41 PM, you wrote:
    Hi Scott,
    I noticed that Nuno changed yyless() to be like flex after your commit (not
    in HEAD? I considered that, but figured you guys wanted it different :-)),
    but now the heredoc end part is wrong again (hehe), and I see Tony reported
    the broken tests... Attached patch puts it back to pre-re2c state. Also
    remembered a useless "case EOF;" to remove in zendlex() to match HEAD's
    (added at end of '05 (v1.647.2.18) for bug #35382, later fixed in the
    scanner; doesn't look like it ever did much anyway).
    BTW, maybe you could change the name in that 5.2 NEWS entry to just "Matt"?
    No big deal, but that's what it's been other than the first few entries. :-)
    We use short names only for people with a php.net account.

    Thanks for the fixes anyway.
    Thanks,
    Matt
    ----- Original Message -----
    From: "Scott MacVicar"
    Sent: Tuesday, April 08, 2008
    Thanks Matt,

    I'll review these and merge them in with my other scanner fixes.

    Scott


    Best regards,
    Marcus
  • Philip Olson at Apr 10, 2008 at 5:15 pm

    On 10 Apr 2008, at 09:48, Marcus Boerger wrote:
    Hello Matt,

    Thursday, April 10, 2008, 3:50:41 PM, you wrote:
    Hi Scott,
    I noticed that Nuno changed yyless() to be like flex after your
    commit (not
    in HEAD? I considered that, but figured you guys wanted it
    different :-)),
    but now the heredoc end part is wrong again (hehe), and I see Tony
    reported
    the broken tests... Attached patch puts it back to pre-re2c
    state. Also
    remembered a useless "case EOF;" to remove in zendlex() to match
    HEAD's
    (added at end of '05 (v1.647.2.18) for bug #35382, later fixed in the
    scanner; doesn't look like it ever did much anyway).
    BTW, maybe you could change the name in that 5.2 NEWS entry to just
    "Matt"?
    No big deal, but that's what it's been other than the first few
    entries. :-)
    We use short names only for people with a php.net account.
    Hello Matt-

    Just in case you've not seen this page yet, please go here and apply :)

    http://php.net/cvs-php.php

    Regards,
    Philip
  • Matt Wilmas at Apr 17, 2008 at 10:55 am
    Hello guys,

    ----- Original Message -----
    From: "Philip Olson"
    Sent: Thursday, April 10, 2008
    On 10 Apr 2008, at 09:48, Marcus Boerger wrote:
    Hello Matt,

    Thursday, April 10, 2008, 3:50:41 PM, you wrote:
    Hi Scott,
    [...]
    BTW, maybe you could change the name in that 5.2 NEWS entry to just
    "Matt"?
    No big deal, but that's what it's been other than the first few
    entries. :-)
    We use short names only for people with a php.net account.
    Well, now that I have a php.net account, and 5.2.6 will be released, can
    someone change my name? :-) Unless I'm granted access to do it myself...?

    Didn't know that about short names -- I see my name 11 times in the 5.2
    NEWS, and the last 6 are just Matt. I think Ilia just started using that
    after the first 5. :-P
    Hello Matt-

    Just in case you've not seen this page yet, please go here and apply :)

    http://php.net/cvs-php.php
    Yeah thanks, I knew about the CVS request page, just never applied before!
    Regards,
    Philip
    Thanks,
    Matt
  • Antony Dovgal at Apr 17, 2008 at 11:49 am

    On 17.04.2008 14:54, Matt Wilmas wrote:
    Well, now that I have a php.net account, and 5.2.6 will be released, can
    someone change my name? :-) Unless I'm granted access to do it myself...? Done =)
    Didn't know that about short names -- I see my name 11 times in the 5.2
    NEWS, and the last 6 are just Matt. I think Ilia just started using that
    after the first 5. :-P
    --
    Wbr,
    Antony Dovgal
  • Matt Wilmas at Apr 17, 2008 at 12:12 pm
    Thanks Tony!

    ----- Original Message -----
    From: "Antony Dovgal"
    Sent: Thursday, April 17, 2008
    On 17.04.2008 14:54, Matt Wilmas wrote:
    Well, now that I have a php.net account, and 5.2.6 will be released, can
    someone change my name? :-) Unless I'm granted access to do it
    myself...?
    Done =)
    Didn't know that about short names -- I see my name 11 times in the 5.2
    NEWS, and the last 6 are just Matt. I think Ilia just started using
    that
    after the first 5. :-P
    --
    Wbr,
    Antony Dovgal

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedApr 8, '08 at 3:59p
activeApr 17, '08 at 12:12p
posts9
users6
websitephp.net

People

Translate

site design / logo © 2019 Grokbase