Perhaps this comment was meant as a joke, but this is exactly what lex does for regexps and yacc does for LALR(1) grammars. For the right job, they are both great.
I watched Ken Thompson write a Paxos implementation in yacc once.
It's not as exciting as it sounds. He wanted to play around with learning Paxos, which is a big state machine, and he used yacc to do it. I shared an office with him for a couple years in the early days of Go, and he was working on it while I was working on other things. I helped him track down at least one bug in the Go port of yacc that way. I think the grammar he was writing was completely regular, but yacc is nicer to use than lex.
Nope, not a joke. As you say, this is just the application of parsing technology to a tokenized stream of input events.
its super-useful in creating state machines to do parsing---and it can be super-useful to create state machines for other things as well.
> I watched Ken Thompson write a Paxos implementation in yacc once.
In real time? dude, you gotta post video to youtube or post a "Tell HN" story about it.