PHP Developer - June 25th, 2006
Greg Beaver has blogged today with more about the port he’s been wokring on of the Lemon parser generator to PHP5, this time discussion the creation of two packages - PHP_ParserGenerator and PHP_LexerGenerator.
Last week, I blogged about completing a port of the Lemon parser generator to PHP 5, which I thought was pretty cool. However, in an email, Alex Merz pointed out that without a lexer generator to accompany lemon, it’s pretty difficult to write a decent parser.
After Alex’s email, I started thinking about what it would take to write a lexer generator. Basically, a lexer generator requires parsing and compiling regular expressions, then scanning the source one character at a time to find matches. So, it occurred to me that perhaps simply combining regular expressions with sub-patterns could accomplish this task quite easily.
He goes on to explain this process, showing how a simple regular expresion call (and a look at its return arguments) could create a simple, easy solution. Since the re2c format is still unsupported in PHP (without a goto to go to), he opts to stick with the regular expressions and creates a “lex2php” format instead.
He’s packaged up both halves of this setup and has already posted proposals for them to the PEAR site:
Continue Reading ·
PHP Developer - June 25th, 2006
The latest offering from the php|architect A/R/T article repository is this column from the editor, Marco Tabini. In it, he asks (and answers) the question “Are We Losing LAMP?”.
In a recent post to a blog that was reported in our news, author Cliff Wells claims that the light has gone out on LAMP. I have addressed enough of these articles in the past–as have many others who know a log more about technology than I do–and I am not really going to address another one here. In fact, I am only going to use it for that most human of human forms of expression: imitation.
Marco talks about how, while the PHP community on the whole has been lucky as far as its partnerships and contributions from larger entities, there might come a time later on when these same alliances could stir up trouble. He does suggest somewhat of a solution, though - three actually, some a bit more plausable than others. (You’ll have to check out the article to get those, though!)
Continue Reading ·
PHP Developer - June 25th, 2006
Jim Plush talks in his latest blog entry about being a “baker” with CakePHP, detailing some of his first forays into the CakePHP framework.
I’ve always dreaded frameworks. Ususually it takes longer to learn a framework than to actually code the project in the first place. Over the years I’ve checked out various frameworks and all fell short when I tried to do something that needs to be done in the real world. There’s always some tradeoff that needs to be made.
Now Zend Framework will no doubt be successfull and most likely in a year from now should have a pretty good feature set but for today it looks like there is a king of the hill for PHP frameworks(for me anyway). CakePHP.
He talks about some of the major advantages that he sees for the project, including its documentation, built-in pagination support, and Active Record functionality. There was an issue with the last of them that he noticed as his code got a bit more complex - performance issues with the Active Record implementation. Outside of that, though, he only found goodness inside of this cake.
Continue Reading ·