Lexical Scanning in Go - Rob Pike
GoogleFOSSSydney · 14 位 HN 用户推荐 · 2012–2025
Rob Pike 演示用状态函数和 goroutine 写词法分析器,优雅又易懂
Personally, I have a penchant for writing my own pull parsers. Its a mind-expanding exercise. The neat thing about Go is that parsers can return functions that consume the next token. Rob Pike has an excellent video about this: [link]
— willvarfar, 2012> Rob Pike has an excellent video about this: [link]
— signa11, 2012I enjoyed this one about using message passing functions to compose a lexical scanner in go [link]
— minikomi, 2012> What most people don't realize is that for concurrency to be useful, there must be parallelism. No, as far as I understand from this and other talks, Rob Pike argues that concurrency is useful even without parallelism: it's a better way to structure software. A nice example for this is shown in his talk about lexical scanning in Go: [link]
— mseepgood, 2013Origins of Go Concurrency Style - [link] Lexical Scanning in Go - [link]
— canthonytucci, 2013Rob Pike did a really good talk entitled 'Lexical Scanning In Go'[0], which covers how the lexing for text/template works. It's far more interesting than it sounds, and even if you don't know much about lexing/parsing it's easy to follow. [0] [link]
— TomNomNom, 2014You could take a look at Marc Cournoyer's course [link] , check out the compiler course on Cousera [link] and watch Rob Pikes talk on lexical scanning [link]
— wilsonfiifi, 2014There's also a smaller, simpler parser in the "text/template/parse" package, that is used to parse the templating languages in "text/template" and "html/template". As an introduction to it, I recommend the talk "Lexical Scanning in Go" by Rob Pike: [link]
— etatoby, 2016If you liked that chapter, check out some recent ideas of his here: [link] .
— why-el, 2017A good intro by Rib Pike for those who’d like to learn more about parsers/lexers [link]
— iampims, 2018Another very good take on this topic that really was the first thing that made it all click for me: [link]
— gameswithgo, 2018Lexical Scanning In Go is a charming piece of programming: [link]
— gorgoiler, 2019