若文章排版不清或需要查看文中链接,请点击文章左下角的“阅读原文”

开源项目地址:https://github.com/stephens2424/php

文章为英文,看不懂的地方可以使用有点词典翻译一下。

There’s a lot of PHP out there. The problems plaguing that language are well documented, but many companies and projects are frightfully entrenched. There have recently been projects aimed at improving performance and reliability: things like Hack, php-ng, and the recent effort toward a language specification. Unfortunately, none of these projects will directly result in improving large, existing bodies of PHP. So when I learned Go, and I watched Rob Pike’s talk on writing the text/template lexer, I thought it would be fun to try out that language and idea on reading PHP. Over the past several months, that whim has evolved into a nearly feature-complete PHP parser.

Until now, the goals and milestones related to this project have been nebulous at best. It began as a crazy experiment, after all. It currently parses most of the code I throw at it, with support for most PHP 5.4 features, but not all. Thus, the most important goal at this point is to move the parser further to solidly support the full set of PHP 5.6 features. As a stretch, it would be great if it was possible to set the parser to check against specific PHP versions. The project currently has 85% test coverage and 67% coverage with full unit tests, but I’d like to increase those numbers. I’d also like to improve stability when parsing incorrect code.

At this point, I think there is an opportune moment to consider the next direction to take the parser beyond just parsing. Here is a list of ideas I have:

A phpfmt tool (a la gofmt)

Static analysis tools (e.g. type inference, dead code detection)

Transpiler

The transpiler is perhaps my favorite idea, particularly in Go. With the go/astpackage, transpiling into Go is perhaps the closest in reach of all these goals, despite sounding so lofty.

All that said, this project began as an experiment, and for the time being, it continues as one. I’m happy to open up the project to a wider audience. Please feel free to comment or contribute. If you would like to just play with the parser, I have this little tool for testing. The code is available [on Github][4].

关注微信公众号:PHP技术大全

PHPer升级为大神并不难!

安卓php解析器,[开源推荐]用Golang实现的PHP解析器相关推荐

  1. flex bison解析json文件_每秒解析千兆字节的 JSON 解析器开源了

    本文转自我们的网站 InfoQ,译者无明.除了推荐 simdjson 之外,还想测试一下微信平台编辑器的代码样式功能. 事实证明,微信文章的代码展示能力很强了.非常棒. 近日,GitHub 开源了一 ...

  2. 【开源推荐】进阶实战,从一款音乐播放器开始

    0.前言 前面有同学问我,想要做一个Android 实战项目,问我有没有好的开源项目可以参考和练习? 想想自己以前也是,当项目没有什么新任务的时候,想着自己写一个实战项目来来练练手,那拿什么项目来练手 ...

  3. 每秒解析千兆字节的JSON解析器开源,秒杀一大波解析器!

    近日,GitHub开源了一JSON解析器simdjson,通过与其他常用解析器的对比实验,结果显示,simdjson的解析速度达到2.2GB/s,远远秒杀其他解析器,在下文中,我们将为大家详细介绍si ...

  4. X、elua解析器开源文档:合集

    前言   嵌入式开发人员一般情况下都是从C语言开始入手的,然而C语言的学习难度较大,入门门槛也比较高.很多人因为自身C语言的瓶颈导致很难做出来复杂的产品.有的人也仅仅是因为兴趣爱好只是想diy做些小玩 ...

  5. sketch 将动图转换为json_开源 | Picasso:sketch设计稿智能解析工具

    开源二期项目专题系列(一) 1. 开源项目名称:Picasso 2. github地址: https://github.com/wuba/Picasso 3. 简介:Picasso是58同城推出的一款 ...

  6. [开源]基于WPF实现的Gif图片分割器,提取GIf图片中的每一帧

    [开源]基于WPF实现的Gif图片分割器,提取GIf图片中的每一帧 原文:[开源]基于WPF实现的Gif图片分割器,提取GIf图片中的每一帧 不知不觉又半个月没有更新博客了,今天终于抽出点时间,来分享 ...

  7. 让你久等了《开源安全运维平台OSSIM疑难解析--入门篇》正式出版

    2019年暑期,众所期待的新书<开源安全运维平台OSSIM疑难解析--入门篇>由人民邮电出版社正式出版发行.此书从立意到付梓,历时超过两年,经过数十次大修,历经曲折与艰辛,希望为大家代奉献 ...

  8. 让你久等了!《开源安全运维平台OSSIM疑难解析--入门篇》9月上市

    2019年暑期,众所期待的新书<开源安全运维平台OSSIM疑难解析--入门篇>开始印刷,9月份即可预售.此书从立意到付梓,历时超过两年,经过数十次大修,历经曲折与艰辛,希望为大家代奉献一本 ...

  9. 开源OSSIM企业运维疑难问题解析

    <开源OSSIM企业运维疑难问题解析> <Troubleshooting OSSIM Enterprise Network Maintenance> 时光荏苒.日月如梭.如今看 ...

最新文章

  1. iOS 打电话回到当前应用
  2. JavaMail邮件发送不成功的那些坑人情况及分析说明
  3. python调用通达信函数_python获取通达信基本数据源码
  4. 这 8 份「Paper + Code」,你一定用得上 | PaperDaily #08
  5. boost::geometry::transform用法的测试程序
  6. 【APICloud系列|14】xcode下载地址
  7. Git分支创建、合并、上传等命令
  8. python浅拷贝深拷贝
  9. Could not resolve placeholder 'jdbc.url' in value ${jdbc.url}
  10. ng-zorro-antd引入less时错误解决记录
  11. OpenCV-PS扩散效果(毛玻璃)
  12. 利用卷积自编码器对图片进行降噪
  13. 资源管理器 右键 反应慢 现象解决方案
  14. w3c+android,w3cschool官方版app
  15. django 标签verbatim的使用 200312
  16. 6个让您获得更佳的移动分析体验的提示
  17. MIPS微程序CPU设计
  18. Q3全球太阳能企业融资规模达30亿美元 环增76%
  19. 新媒体人必备的10个效率工具,神器收藏起来
  20. Hadoop分布式存储和计算MapReduce的使用以及Hive数据仓库等内容精讲

热门文章

  1. C# 打开以对话框,获取文件夹路径 、文件的路径、文件名
  2. 美式英语与英式英语的区别
  3. 求一款电脑上的剪辑音乐软件
  4. 地质地貌卫星影像集锦(二 地质构造篇)
  5. xtu oj 1376 回文数
  6. 蚂蚁金服商业化资深总监韩鸿源:数据库是技术能力,云是使用方式,两者不应是竞争关系...
  7. SQL injection_Blind-Time based
  8. 今日份安利:什么软件可以录音翻译英语?
  9. Redis的主从复制(Master/Stave)
  10. 金蝶云星空对接打通管易云其他出库查询接口与其他出库单新增完结接口v2接口