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

Bug #18454 single quote is not escaped properly in yy_global_pattern
Submitted: 2011-04-19 02:01 UTC
From: urkle Assigned:
Status: Open Package: PHP_LexerGenerator (version 0.4.0)
PHP Version: 5.3.6 OS: Mac OS X
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 37 + 37 = ?

 
 [2011-04-19 02:01 UTC] urkle (Edward Rudd)
Description: ------------ In revision 246683, a change was made to use single quotes instead of double quotes to wrap the $yy_global_pattern variable contents.. However the content quoting was not changed.. (Double quotes are escaped and single quotes are NOT escaped.). This needs to be adjusted so that single quotes are escaped when placed in that string.

Comments

 [2011-07-14 23:31 UTC] michaelchisari (Michael Chisari)
Small fix for bug #18454 File: LexerGenerator/Regex/Parser.php Line #: 1247 + $this->yystack[$this->yyidx + 0]->minor->string = str_replace('\'', '\\\'', $this->yystack[$this->yyidx + 0]->minor->string); This will escape single-quotes properly in the pattern.