parsica-php / parsica
The easiest way to build robust parsers in PHP.
Fund package maintenance!
turanct
Installs: 64 773
Dependents: 4
Suggesters: 0
Security: 0
Stars: 404
Watchers: 13
Forks: 18
Open Issues: 24
Requires
- php: ^7.4 || ^8.0
- ext-mbstring: *
- cypresslab/php-curry: ^0.5.0
Requires (Dev)
- ext-json: *
- mathiasverraes/uptodocs: dev-main
- phpbench/phpbench: dev-master
- phpunit/phpunit: ^9.0
- psr/event-dispatcher: ^1.0
- vimeo/psalm: ^4.1
This package is auto-updated.
Last update: 2024-11-29 09:48:17 UTC
README
The easiest way to build robust parsers in PHP.
composer require parsica-php/parsica
Documentation & API: parsica-php.github.io
<?php $parser = between(char('{'), char('}'), atLeastOne(alphaChar())); $result = $parser->tryString("{Hello}"); echo $result->output(); // Hello
Project status
Regrettably, the maintainer of this library (@turanct) has passed away in December 2021 due to cancer. At the moment, there is no maintainer. If you'd like to contribute to this library, or if you wish to use this library for a project and need consulting, contact the original author Mathias Verraes mathias at verraes net.
Development
After running composer install
, run these to validate if everything is in working order:
composer run phpunit
composer run psalm
composer run uptodocs
# or all of them:
composer run test