DFA · Regular
A CSV record with quoted fields
Fields separated by ; — a field is either plain characters (a) or a quoted string in which ; is allowed and a quote is written twice. After a closing quote only a separator or the end may follow, which is where hand-written parsers usually go wrong.
The author’s examples, run
a;a → accept"a;a";a → accept"a""a" → accept;; → accept"a"a → rejecta"a → reject"a → reject"";a → accept