In fact, Prolog originates from Q-systems which were specifically designed to process language via grammar rules:
https://en.wikipedia.org/wiki/Q-systems
The "Q" stands for Québec, where Alain Colmerauer developed this formalism which eventually led to Prolog. A recently released documentary talks a bit about these developments:
It is interesting that the very first Prolog systems, Prolog 0 and Marseille Prolog, represented strings as lists of characters, then the Edinburgh tradition used lists of codes (in the implementation defined encoding), and all Prolog systems that have become available in the last 5 years (Scryer Prolog, Tau Prolog, Trealla Prolog and ichiban/prolog) are again using lists of characters to make string processing as convenient and readable as originally intended.
For example, we can use definite clause grammars in Scryer Prolog to find occurrences of the same character twice in immediate succession in a string:
?- phrase((...,[C,C],...), "Hello, world!").
C = l
; false.
In this string, the character 'l' is the only such letter.