mathiasverraes / parsica
The easiest way to build robust parsers in PHP.
Fund package maintenance!
mathiasverraes
Installs: 562
Dependents: 1
Suggesters: 0
Security: 0
Stars: 212
Watchers: 8
Forks: 6
Open Issues: 6
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
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