0

As someone trained in neither, how could you explain the analogies between context free grammars / languages and certain programming languages in computer science? Have I misunderstood whether there is actually an analogy that merits interplay? What are examples of these computer languages?

Keep in mind my training is in mathematics / mathematical physics, so don’t be afraid to give a “more than surface level” explanation! I’ve been quite interested in some interplay between linguistics and information theory, given the deep interplay between information theory and physics!

  • There are many applications of information in linguistics, though I don't think CFGs are related to any of them – WavesWashSands Oct 9 at 16:29
  • This looks like a question about theoretical computer science, try Theoretical Computer Science or Computer Science. – jknappen - Reinstate Monica Oct 10 at 16:12
  • I'm voting to close this question as off-topic because this question is not about linguistics at all, it uses the word "language" for a formal language. – jknappen - Reinstate Monica Oct 10 at 16:13
  • @jknappen The Chomsky hierarchy is one of the first things taught in linguistics courses on syntactic theories. There is a slew of academic literature on this topic published by linguists. The question is definitely on-topic here. – prash Oct 12 at 7:48
  • @prash The main questions asked are about computer languages, and the Chomsky hierarchy is taught in Computer Science courses as well. – jknappen - Reinstate Monica Oct 12 at 13:55
2

Have I misunderstood whether there is actually an analogy that merits interplay?

No, and analogies will not help. These grammars are called "context-free" but that has nothing to do with the context of meanings of words. Instead, it refers to abstract mathematical structures. There are various kinds of term rewriting rules or tree rewriting rules. The nature of these rules determine the nature of the trees that can be generated.

There is a hierarchy (called the Chomsky hierarchy) for the complexity of trees that can be generated by term rewrite rules. "Context-free" is the name of one of the levels in the hierarchy. Formal language theory: refining the Chomsky hierarchy gives an overview of the topic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.