An open API service indexing awesome lists of open source software.

https://github.com/muzea/parser

使用高阶函数开发语法分析器
https://github.com/muzea/parser

higher-order-function parser typescript

Last synced: 5 months ago
JSON representation

使用高阶函数开发语法分析器

Awesome Lists containing this project

README

          

## 使用高阶函数开发语法分析器

[![travis-ci](https://api.travis-ci.org/muzea/parser.svg?branch=master)](https://travis-ci.org/muzea/parser) [![codecov](https://img.shields.io/codecov/c/github/muzea/parser/master.svg)](https://codecov.io/gh/muzea/parser)

程序是[轮子哥博客](http://www.cppblog.com/vczh/archive/2008/05/21/50656.html)的js复刻版。

做了一些修改方便理解。~~其实是我看不懂轮子脚本的语法了~~

示例代码

- [普通的Token](/sample/plain.js)
- [优先级信息](/sample/group.js)
- [普通的计算](/sample/calculator.js)
- [rfc1738 校验器](/sample/rfc1738.ts)
- [json 解析器](/sample/json.ts)