3 ms·
I was just copying from the post. It's not exactly how I would do it but I thought doing what I thought should be done would just distract the problem. One way
by jerf 16y ago
I was just copying from the post. It's not exactly how I would do it but I thought doing what I thought should be done would just distract the problem.
One way or another you need some sort of delimiter, in the sense of delimiting the grammar domains, be it a explicit delimiter like a character (pair) or an implicit one like trying to guess which subgrammar you're trying to use. In the case of smashing two grammars together I would tend to prefer an explicit delimiter, because it lowers the need to coordinate between the two grammars, a difficulty that you demonstrated there.