承接 vektah/parser-combinator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

vektah/parser-combinator

Composer 安装命令:

composer require vektah/parser-combinator

包简介

README 文档

README

A simple parser combinator framework written in PHP.

Google protobuffer parser:

$parser = new ProtoParser();
$out = $parser->parse('
    message Bar {
        required MessageType type = 0;
        required bytes data = 1;

        enum Foo {
            asdf = 0;
            qwer = 1;
        }
    }
');

// $out will contain return a parse tree that looks like this:
[
    new Message('Bar', [
        new Field('required', 'MessageType', 'type', 0),
        new Field('required', 'bytes', 'data', 1),
        new Enum('Foo', [
            new EnumValue('asdf', 0),
            new EnumValue('qwer', 1)
        ])
    ])
];

Json parser:

The only reason you would use this parser is for error messages. It is much slower then the C library used by php to parse json. It could be used to automatically reparse json in failure cases and display helpful error messages.

$parser = new JsonParser();
$out = $parser->parse('{"asdf": { "foo" : "bar" }}');

// $out will contain a parse tree that looks like this:
[
  'asdf' => [
    'foo' => 'bar'
  ]
]

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2013-09-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固