Parsica - PHP Parser Combinators - The easiest way to build robust parsers.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
Mathias Verraes ce1d6819b6
Update README.md
2 years ago
.github Rename the "test" workflow to "Tests" 3 years ago
benchmarks ️ Use more revolutions in the benchmarks 3 years ago
docs Fugbix typo 3 years ago
src Fix typo 3 years ago
tests ♻️ Move the code from `Verraes\Parsica` to `Parsica\Parsica` namespace 3 years ago
.editorconfig added editorconfig 4 years ago
.gitignore .gitignore 3 years ago
CHANGELOG.md changelog 4 years ago
CODE_OF_CONDUCT.md cleanup 4 years ago
LICENSE added MIT license 4 years ago
README.md Update README.md 2 years ago
TODO.md todo 3 years ago
composer.json 📌 Pin the version of PHPBench to a specific one 3 years ago
infection.json mutation testing with infection experiment 4 years ago
phpbench.json make phpbench use local bin and update config 3 years ago
phpunit.xml upgraded phpunit xml schema 4 years ago
psalm.xml enable findUnusedPsalmSuppress 4 years ago

README.md

Parsica

Tests

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

Twitter Follow

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

Maintainer

Regrettably, the maintainer of this library (@turanct) has passed away in December 2021 due to cancer. At the moment, there is no maintainer. Contact @mathiasverraes if you're interested in working on this project.