2020/12/12 にオンラインで開催された PHP カンファレンス 2020 にて「PHP 8 で作る JSON パーサ」を発表しました。 発表資料 sample code: https://github.com/shin1x1/php8-toy-json-parser 発表で紹介したコードは、phpcon2020 タグになります。 https://github.com/shin1x1/php8-toy-json-parser/releases/tag/phpcon2020 Togetter: https://togetter.com/li/1636454 これまでパーサを書いたことが無い方を対象に Lexer(字句解析器) と Parser(構文解析器) からなる JSON パーサの実装を解説しました。 JSON は LL(1) なので、先頭から 1 文字づつ読んでいけばパースできま
![「PHP 8 で作る JSON パーサ」を発表しました / PHP カンファレンス 2020 - Shin x Blog](https://cdn-ak-scissors.b.st-hatena.com/image/square/126e6b67b783dd0b865878f118ce8fcfdb44290a/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fs%2Fshin1x1%2F20201216%2F20201216075238.png)