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

Bug #9211 Typos
Submitted: 2006-11-01 20:59 UTC
From: vishvananda at yahoo dot com Assigned: cellog
Status: Closed Package: PHP_LexerGenerator (version 0.3.0)
PHP Version: Irrelevant OS: N/A
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 : 34 + 27 = ?

 
 [2006-11-01 20:59 UTC] vishvananda at yahoo dot com (Vishvananda Ishaya)
Description: ------------ I found some typos in the Lexer Generator version 0.3.0 causing the line numbers to break: in Parser.php there are various instances of the following: ' . $this->line . ' += substr_count("\n", ' . $this->value . '); which doesn't work because the haystack comes first in substr_count. They should say: ' . $this->line . ' += substr_count($this->value, ' . "\n" . '); also, the function doLongestMatch does not have the following code from doFirstMatch: if (' . $this->counter . ' >= strlen(' . $this->input . ')) { return false; // end of input } which means that doLongestMatch will throw an error when it reaches the end of input instead of returning false. Is this intended behavior? If so, how does one know to stop calling the yylex function?

Comments

 [2006-11-01 21:07 UTC] vishvananda at yahoo dot com
er sorry, it should say: ' . $this->line . ' += substr_count(' . $this->value . ', "\n");
 [2006-12-16 00:13 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!