• Stars
    star
    404
  • Rank 106,539 (Top 3 %)
  • Language
    PHP
  • License
    MIT License
  • Created over 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Parsica - PHP Parser Combinators - The easiest way to build robust parsers.

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.