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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Writing Compilers Quickly

31 点作者 r11t超过 15 年前

5 条评论

tptacek超过 15 年前
Could not disagree more about lexer generators. Every device we support comes with 1-2 parsers, and we started out thinking that Ruby's built-in regex support made flex unnecessary. Bzzzt. Lexers are fiddley whether you write them in Flex or Ruby, but the Ruby version is harder to write.<p>We've settled on Ragel for lexers; Craig wrote "ralex", which I don't use or understand but which he insists we're about to open source. So I recommend Ragel. Or Flex. Or anything but just hand-hacking your own tokenizer.
评论 #1105347 未加载
评论 #1105471 未加载
评论 #1106145 未加载
hga超过 15 年前
Read the linked <a href="http://en.wikipedia.org/wiki/Monkey_patch" rel="nofollow">http://en.wikipedia.org/wiki/Monkey_patch</a> if you want to find out what monkey patching and duck punching are ^_^.
pmjordan超过 15 年前
I'm wondering if he's tried to do real work with ANTLR and ANTLRWorks in particular. I found them extremely temperamental and fiddly to work with, but this was more than a year ago.
评论 #1105574 未加载
kingkongreveng_超过 15 年前
A perl programmer talking about compilers in 2010 doesn't mention Parrot? Parrot has to be the easiest and fastest way to get a compiler up and running these days.
评论 #1105022 未加载
marshallp超过 15 年前
use lisp macros or prolog dcg's