Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.0

Bug #8259 Strange regex generated
Submitted: 2006-07-20 15:52 UTC
From: mansion Assigned: cellog
Status: Closed Package: PHP_LexerGenerator (version 0.2.1)
PHP Version: 5.1.2 OS: OSX
Roadmaps: (Not assigned)    

 [2006-07-20 15:52 UTC] mansion (Bertrand Mansion)
Description: ------------ variable = @/?:([a-zA-Z0-9_]+)/?@ will generate : $yy_global_pattern = "/^(\?:([a-zA-Z0-9_]+)\?)|^(([^\]+))/"; The slashes are replaced by antislashes. The @ delimiter is replaced by a slash (which I can understand if it's a documented standard). Not sure if this is a bug or an error on my side as I am pretty new to the package. Test script: --------------- /*!lex2php %input $this->data %counter $this->N %token $this->token %value $this->value %line $this->line variable = @/?:([a-zA-Z0-9_]+)/?@ */


 [2006-07-21 08:57 UTC] mansion at php dot net (Bertrand Mansion)
in Parser.y, line 548, 551, 559, 562 should use \/ instead of \\.
 [2006-07-27 23:42 UTC] cellog (Greg Beaver)
the replacement with // is indeed expected behavior. The regex is in fact parsed and then regenerated. I will fix the other problem when I have the time. Thanks for the report.
 [2006-08-30 20:11 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.