Parser相关
parser_note.md
https://github.com/lark-parser/lark
mfcalc
turtle dsl
json parser
https://github.com/d4v3y/bisonJsonParser
parser generator
math parser
muparser
lemon
byacc
nyacc –> guile
btyacc
lark –> python (early/lalr)
happy –> haskell
antlr –> java(ll(k))
javacc
ANTLR4 & C++
https://zhuanlan.zhihu.com/p/240229064
A LALR(1)/LL(1)/LL(K) parser generator for javascript/typescript
https://github.com/yiminghe/kison
https://github.com/phorward/unicc
LALR parser generator targetting C, C++, Python, JavaScript, JSON and XML
https://github.com/sormy/lemon-js
Lemon.JS is an LALR(1) parser generator for JavaScript based on Lemon parser generator for C
https://github.com/fcomeraz/simpleCalcParserLemon
Very Simple Calc Parser using Flex and Lemon.
peg > LL (1) Parser (节省内存)
Python 之父考虑重构 Python 解释器
https://www.oschina.net/news/108532/guido-peg-parser
三十年前,我有充分的理由来使用单一前向标记符的解析技术:内存很昂贵。LL(1) 解析(以及其它技术像 LALR(1),因 YACC 而著名)使用状态机和堆栈(一种“下推自动机”)来有效地构造解析树。
https://mp.weixin.qq.com/s/yqVVaZVn8RRanllaXMFD9A
https://mp.weixin.qq.com/s/yUQPeqc_uSRGe5lUi50kVQ
https://mp.weixin.qq.com/s/ojSq6u9FC0xlBDncuoKczw
N 倍效率神器,使用 PEG 生成自己的解析器
https://zhuanlan.zhihu.com/p/252343056
Packrat Parsing 回溯式线性时间语法分析
https://zhuanlan.zhihu.com/p/25260077
flex –> ragel
https://www.colm.net/open-source/ragel/
bison –> lemon
bnfc https://bnfc.digitalgrammars.com/
https://gist.github.com/caudamus/1294f197cbb3fc16c1a82e7e2f1d0ec4
http://www.grammaticalframework.org/
Grammatical Framework
A programming language for multilingual grammar applications
https://tree-sitter.github.io/tree-sitter/
https://github.com/scottfrazer/hermes
Python LL(1) Parser Generator with Expression Parsing
语法格式描述规范BNF、EBNF、ABNF
https://www.jianshu.com/p/15efcb0c06c8
用 EBNF范式 来描述 EBNF 的语法
1 | 生成式 = 生成式名 '=' [ 表达式 ] [';'] ; |
生成式由表达式构造,表达式通过术语及以下操作符构造,自上而下优先级递增(低=>高):
1 | | 选择 |
https://www.nongnu.org/bnf/
https://github.com/FLC-project/ebison
Extended Bison tools for the LR parsing of Extended BNF grammars (EBNF) with regular expressions in the right parts of the production rules. Java is required to run the ebison tools.
grammars-v4
lalr
cpp-peglib
PEGTL
cppast
winflexbison
langcc
bnf-plus-plus
javacc
llgen
kison
JSCPP
C/C++ language server supporting multi-million line code base, powered by libclang.
cquery
bison_note.md
rpcalc
http://www.javashuo.com/article/p-wcsbewkd-kg.html
https://github.com/conao3/rpcalc.y
flex
#define YY_DECL int yylex (void)
bison yyparse() –> yylex()
https://www.mianshigee.com/tutorial/pandolia-tinyc/
https://pandolia.net/tinyc/index.html 自己动手写编译器
https://www.zhihu.com/column/c_1081509964404543488 编译工程课程
http://newosxbook.com/toc1.html *OS Internals::Volume I - User Mode Table of Contents