Hi Xuefer, all,

Yeah, the re2c patch did change (or add?) a bit for handling the "#"
character (though I haven't investigated your example...).

However, I wanted to report that I just started playing with some changes to
the scanner (re2c), and am seeing weird (or "wired" re: subject :-P) stuff
too.  For example, with comments, I noticed that one-line // comments are
lost when they're on the last line, unless followed by ?> (verified with
tokenizer extension; fine before with flex scanner).  And multi-line /*
comments that aren't closed don't match either (and no warning about
"Unterminated comment..." anymore).  Verified that these rules are never
matched (in those cases) when they should be:

<ST_ONE_LINE_COMMENT>[^\n\r?%>]*{ANY_CHAR}
<ST_COMMENT,ST_DOC_COMMENT>[^*]+

I couldn't figure anything out...  Something with YYCURSOR/YYFILL()?
Something getting "stuck" at the last match if it's not in ST_IN_SCRIPTING
state?  I don't get it.  Marcus, Scott?


Thanks,
Matt


----- Original Message ----- 
From: "Xuefer"
Sent: Sunday, April 06, 2008

> i'm having trouble with the bug http://bugs.php.net/bug.php?id=44654 i
> just reported. i'm not sure if it's a expected behavoir or a bug
> introduced by re2c or whatever patch.
>
> On Sun, Apr 6, 2008 at 10:19 PM, PHP Bug Database
> <[EMAIL PROTECTED]> wrote:
> > From:             xuefer at gmail dot com
> >  Operating system:
> >  PHP version:      5.3CVS-2008-04-06 (CVS)
> >  PHP Bug Type:     Compile Failure
> >  Bug description:  wired syntax error for #
> >
> >  Description:
> >  ------------
> >  $ php -r 'if (1) { ?>#<?php }'
> >
> >  Parse error: syntax error, unexpected $end in Command line code on line
1
> >
> >
> >  note that you cannot reproduce with ?> #<?php (with a space before #
> >
> >  Reproduce code:
> >  ---------------
> >  1.php
> >
> >  <?php if (1) { ?>#<?php } ?>
> >
> >  2.php
> >  #<?php echo 1; ?>
> >  #<?php echo 1; ?>
> >
> >  expected:
> >  #1#1
> >  actual:
> >  #<?php echo 1; ?>
> >  #<?php echo 1; ?>
> >
> >
> >  Expected result:
> >  ----------------
> >  used to work in php5.2 IIRC and echo # character
> >
> >  Actual result:
> >  --------------
> >  Parse error: syntax error, unexpected $end in Command line code on line
1


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to