4 ms·
Rob Pike used coroutines for the Go Template implementation, instead of a standard lexer/parser: Video: https://www.youtube.com/watch?v=HxaD_trXwRE https://ww
by pdq 12y ago
Rob Pike used coroutines for the Go Template implementation, instead of a standard lexer/parser:
Video: https://www.youtube.com/watch?v=HxaD_trXwRE https://www.youtube.com/watch?v=HxaD_trXwRE
Slides: http://cuddle.googlecode.com/hg/talk/lex.html http://cuddle.googlecode.com/hg/talk/lex.html
- ysleepy 12y agoOMG that code looks horrible. Kind of disappointing how he not uses proper parser generators and grammars. I avoid imerative almost always if I can go declarative.
- vidarh 12y agoVery few production compilers uses "proper parser generators and grammars" for good reasons. He's even listed some of the reasons on one of the earliest slides. Basically, the tools are generally not good enough.