According to the question Why did DOS use dollar-terminated strings? DOS uses dollar-terminated strings, inherited from CP/M which used them because DEC also used dollar as the string terminator.
However, DOS is not the only context where dollar is a string terminator. It is well-known that parsing theory within computer science also uses dollar as a special character meaning the end of input. As an example, the Wikipedia page about LL parsing refers to $ as the end of input: https://en.wikipedia.org/wiki/LL_parser#Parser
Is there any connection in the use of the dollar sign as the end of string in DOS and the end of input in parsing theory? If there is a connection, which one was first: parsing theory? Or DOS / CP/M / DEC?