Making a WebAssembly interpreter in Ruby, part 1: S-expression parser

preview_player
Показать описание
I talk about why I’m doing this and what WebAssembly is, then write a simple parser for the *.wast test scripts provided with the WebAssembly reference implementation.

00:00:00 — Waiting to start
00:01:50 — Hello
00:03:26 — Reasons & principles
00:09:56 — What is WebAssembly?
00:14:58 — Reference interpreter
00:19:00 — Executable specifications
00:30:45 — Writing an S-expression parser
00:30:45 — Add empty Wasm interpreter
00:31:08 — Add skeleton SExpressionParser and run it
00:39:12 — Test that S-expression parser can parse a single atom
00:41:55 — Only parse command-line input when a filename is given
00:42:13 — Include actual result in failure message
00:54:27 — Add support for parsing lists
00:54:46 — Extract #parse_atom
00:58:23 — Add support for parsing multiple expressions in a list
01:01:12 — Check that entire string was consumed by SExpressionParser#parse
01:11:58 — Add support for newlines
01:14:21 — Add support for tokens delimited by parentheses
01:14:57 — Add another example of parethensis delimiters
01:17:19 — Extract SExpressionParser#parse_expressions
01:28:49 — Return array of S-expressions from SExpressionParser#parse
01:30:49 — Test that multiple S-expressions can be parsed at the top level
01:31:09 — Always tell #parse_expressions when to stop parsing expressions
01:35:34 — Add support for single-line comments
01:46:27 — Add support for tokens delimited by comments
01:56:29 — Add support for string literals
02:15:28 — Add support for escaped quotes inside string literals
02:27:09 — Wrapping up
02:31:46 — Bye
Рекомендации по теме
Комментарии
Автор

this looks amazing.
exactly the kind of thing i want to spend my next month. and looks like its already completed.

wow.
starting now :)

semihmasat
Автор

Hi Tom, with the release of YJIT I embarked on the same project. Found you through GitHub & I'm excited to see your take on this problem.

packratrust