Closed ju1ius closed 12 years ago
Hmm. The naming on these classes would have to change. There's a patch floating around that adds namespacing, that I think I'd pull in before starting on this.
Generally a good idea though. I'd make a Peg\Parser\Parser.php though - the Parser class isn't any more special than Packrat, etc.
I'd make a Peg\Parser\Parser.php though - the Parser class isn't any more special than Packrat, etc.
Well PackratParser extends Parser so it seems more logical to have the directory structure reflect the class hierarchy (IMHO).
This is now in master, all be it a slightly different organisation from that above. Thanks for the suggestion & the initial work.
For better integration with other libraries, using the psr-0 standard would be really usefull. It would also simplify development and testing a lot, by giving a more organized directory structure.
I'm currently working on improving the library, by adding new features, like arbitrary quantifiers in the pcre form (
{2,4}
,{4,}
, etc...), case insensitive literals (globally or case by case), unicode modifiers, etc... But having all these classes sticked into one big file is really slowing down the process.Would you like me to implement this ? Proposed directory layout: