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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Porting Smarty to Twig with PEGs

10 点作者 Mike_McDerment超过 14 年前

1 comment

chipsy超过 14 年前
I'm not an expert on parsing, but I used PEG.js recently and found it a lot of fun to work with - a good way for a parsing noob to learn, or if you just need something with a little more rigor than regular expressions.<p>In the future I'd like to use a PEG with an additional tokenization step, as the parser generated from a pure top-down approach will give fairly useless error messages when you have a typo deep in a nested expression, and I think that could be mitigated if I could point those errors out during tokenization.
评论 #1633132 未加载