#Prolog is famous for being good at old-fashioned NLP, yet parsing the input with a #DefiniteClauseGrammar was extremely painful to figure out. Thankfully #ChatGPT was able to show me how it was done, and I cleaned up its verbose solution.
However, I'm sure I struggled this much on my first #regex too, so it's probably just growing pains. I can see how DCGs would easily scale to much more complicated inputs since it's at least as expressive as #BNF grammars.
#prolog #definiteclausegrammar #chatgpt #regex #BNF