mathiasverraes / parsica
The easiest way to build robust parsers in PHP.
Fund package maintenance!
turanct
Installs: 754
Dependents: 0
Suggesters: 0
Security: 0
Stars: 222
Watchers: 10
Forks: 6
Open Issues: 9
Requires
- php: ^7.4 || ^8.0
- ext-mbstring: *
- cypresslab/php-curry: ^0.5.0
Requires (Dev)
- ext-json: *
- mathiasverraes/uptodocs: dev-main
- phpunit/phpunit: ^9.0
- psr/event-dispatcher: ^1.0
- vimeo/psalm: ^4.1
This package is auto-updated.
Last update: 2021-02-20 10:47:12 UTC
README
The easiest way to build robust parsers in PHP.
composer require mathiasverraes/parsica
Documentation & API: parsica.verraes.net
<?php $parser = between(char('{'), char('}'), atLeastOne(alphaChar())); $result = $parser->tryString("{Hello}"); echo $result->output(); // Hello
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