定制 parsica-php/parsica 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

parsica-php/parsica

最新稳定版本:0.8.3

Composer 安装命令:

composer require parsica-php/parsica

包简介

The easiest way to build robust parsers in PHP.

README 文档

README

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

Quality

The code is entirely built with Test-Driven Development, and type-checked with Psalm. It is likely bug-free or very close to it. It is suitable for complex parsing requirements, and could even be used to build a programming language. However, it might not be performant enough if you use it at a high scale.

Project Maintenance & Support

Regrettably, the maintainer of this library (@turanct) has passed away in December 2021 due to cancer. The original author @mathiasverraes is now the maintainer again, and is doing occasional minor updates. If you'd like to contribute to this library, or if you wish to use this library for a project and need consulting, contact Mathias via mathias at verraes net. PR and issues submissions may not be monitored.

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

As this library uses pure functional programming, it may be hard to wrap your head around if you're used to object-oriented or imperative styles. Our recommendation is to familiarize yourself with the basics of functional programming, for example by reading an intro to Haskell.

统计信息

  • 总下载量: 119.05k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 411
  • 点击次数: 1
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 411
  • Watchers: 11
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-20