TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

PEGs: Parsing Expression Grammars

58 点作者 ahalan超过 13 年前

5 条评论

Homunculiheaded超过 13 年前
I read this paper not long ago as it was referenced in Ward Cunningham's interesting work in Exploratory Parsing [0]. It's a quick read and definitely interesting. If you're interested there's a yacc equivalent peg/leg [1]. The only thing that wasn't clear to me (and I'd appreciate enlightenment if anyone has any) is why Cunningham's Exploratory Parsing depends so much on PEGs? Is it simply the non-ambiguous nature of the parse tree?<p>0. <a href="http://c2.com/~ward/sao/TechIgnite-v1/" rel="nofollow">http://c2.com/~ward/sao/TechIgnite-v1/</a> 1. <a href="http://piumarta.com/software/peg/" rel="nofollow">http://piumarta.com/software/peg/</a>
loup-vaillant超过 13 年前
I have to mention OMeta, a language based on PEGs (plus a few extensions): <a href="http://www.tinlizzie.org/ometa/" rel="nofollow">http://www.tinlizzie.org/ometa/</a><p>It's dead simple, and quite powerful: it helps implement all compilation phases, from parsing to code generation. And it compiles itself in about 400 lines of code.
vog超过 13 年前
It should be mentioned that this paper is from 2004, and that in the meantime there's even a Wikipedia article about PEG: <a href="http://en.wikipedia.org/wiki/Parsing_expression_grammar" rel="nofollow">http://en.wikipedia.org/wiki/Parsing_expression_grammar</a>
oscilloscope超过 13 年前
PEG.js has an online grammar creator:<p><a href="http://pegjs.majda.cz/online" rel="nofollow">http://pegjs.majda.cz/online</a>
DanielRibeiro超过 13 年前
There are some great PEG parsers in Ruby:<p>* Parslet: <a href="http://kschiess.github.com/parslet/" rel="nofollow">http://kschiess.github.com/parslet/</a><p>* Treetop: <a href="http://kschiess.github.com/parslet/" rel="nofollow">http://kschiess.github.com/parslet/</a>
评论 #3243131 未加载