TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Porting Smarty to Twig with PEGs

10 pointsby Mike_McDermentover 14 years ago

1 comment

chipsyover 14 years ago
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 未加载