Departing Meta staffer posts biting anti-AI video internally amid mass layoffs
(www.motherjones.com)
A loop and a data structure to hold the result of parsing. The data structure will have a state you can interrogate. No need to build a state machine to explicitly name each way the parsing can develop.