브라우저 구현 스터디하면서 파서 구현 중인데, 예외케이스 처리하고 상태 관리로 서커스해야할게 너무 많다. DFA 추상화라도 해야하나 싶어서 다른 구현체 봤더니 실제로 그렇게 하고 있다.

Chromium(Blink) : https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/parser/html_tokenizer.cc;l=1677 관련 표준 : https://html.spec.whatwg.org#tokenisation0

😇😇

3

If you have a fediverse account, you can reply to this note from your own instance. Search https://hackers.pub/ap/notes/019a49f7-2935-7633-9506-fe8d923bfa9b on your instance and reply to it.