Go 语言中的词法扫描
原名:Lexical Scanning In Go
关于这个视频
Rob Pike 展示了如何使用状态函数、goroutine 和通道构建 Go 文本/模板词法分析器。该演讲于 2011 年在悉尼的 Google 技术用户小组上发表。
HN 为什么推荐它:HN 多年来再次回顾它,作为编写词法分析器的优雅介绍,即使没有解析背景也很容易理解。
“它比听起来有趣得多,即使您不太了解词法/解析,也很容易理解。”— HN 评论 · 2014 · 原文
查看英文原文
Rob Pike shows how the Go text/template lexer is built, using state functions, goroutines and channels. The talk was given at a Google Technology User Group in Sydney in 2011.
Why HN likes it: HN returns to it for years as an elegant introduction to writing a lexer that is easy to follow even without a parsing background.
“It's far more interesting than it sounds, and even if you don't know much about lexing/parsing it's easy to follow.”
HN 提及 20 次推荐者 13 人首次 2012最近 2025质量分 14.0
原视频频道:GoogleFOSSSydney · YouTube 16.2 万次观看
演讲进阶常青go词法分析器罗布·派克状态机并发性解析













