Parser Awesome
- Antlr
- Adaptive LL(*)
- JavaCC
- LL(k)
- Grammer
- yacc - Yet Another Compiler-Compiler
- bison - YACC-compatible Parser Generator
- LALR(1), LR(1), IELR(1), GLR
- Lexer - DFA
- lex - Lexical Analyzer Generator
- flex
- skvadrik/re2c
- Lexer generator for C, C++, Go and Rust
- http://jflex.de/
- Diagram - railroad diagrams - wikipedia Syntax diagram
- tabatkins/railroad-diagrams
- MIT, JS, Python
- dundalek/GrammKit
- PEG.js -> Railroad Diagram
- https://dundalek.com/GrammKit/
- https://www.bottlecaps.de/rr/ui
- Railroad Diagram Generator
- tabatkins/railroad-diagrams
- Languages
- adrian-thurston/ragel
- Ragel State Machine Compiler
- BNF, ABNF, EBNF
- ABNF - Augmented Backus–Naur Form - rfc5234
- lezer-parser/lr
- Incremental parsing system
PEG
- Golang
- Java
- sirthias/parboiled
- Apache-2.0, Java
- 不生成代码,直接通过注解执行 - 简单易用
- Elegant parsing in Java and Scala - lightweight, easy-to-use, powerful.
- sirthias/parboiled
- JavaScript
- peggy
- successor of PEG.js
- PEG.js
- ⚠️ 不再维护
- 生成代码
- pegjs/pegjs
- parser.pegjs
- Simple and expressive grammar syntax
- Integrates both lexical and syntactical analysis
- Parsers have excellent error reporting out of the box
- Based on parsing expression grammar formalism — more powerful than traditional LL(k) and LR(k) parsers
- Usable from your browser, from the command line, or via JavaScript API
- harc/ohm
- MIT, JS
- 不生成代码 - 运行时解析
- 使用类似 Regex - 给语法解析执行
- https://ohmjs.org/editor/
- https://ohmjs.org/docs/syntax-reference
- chevrotain
- LL(K)
- 使用代码的方式定义
- 写起来会有点冗长
- 非常动态
- https://chevrotain.io/playground/
- 性能好
- zaach/jison
- Bison in JS
kach/nearley- MIT, JS
jneen/parsimmon- MIT, JS
- monadic LL(infinity) parser combinator
kach/nearley- parser toolkit
- peggy
- 案例
- 参考
- The Packrat Parsing and Parsing Expression Grammars Page
- LL(*): The Foundation of the ANTLR Parser Generator
- orlandohill/peg-left-recursion - An idea to handle left-recursion in Parsing Expression Grammars (PEGs)
- PhilippeSigaud/Pegged/wiki/Left-Recursion