Can "if", "while", "whenever", "when" recurse deeply? How deeply? [closed]

I would like a generative BNF-style complete description for English grammar. Some of the more subtle stuff leads to awkward questions of grammaticality (a complete answer to this question, and all related questions, is a publication with a complete description of a comprehensible and comprehensive formal grammar which generates exactly the set of grammatical English sentences)

Here are what I believe to be the toplevel rules (hopefully complete), describing the words of type "if", "when", "and", "maybe", in the situations where these apply at the level of complete sentences (it is not necessary to know BNF to answer the question, I'll generate the confusing examples. In the BNF below, vertical lines separate options, brackets enclose optional constructions, CAPS are nonterminals, lowercase stuff in quotes is actual words you speak)

SENTENCE: IF STATEMENT [THEN] SENTENCE
| SENTENCE IF STATEMENT
| SENTENCE AND SENTENCE
| WHEN STATEMENT SENTENCE
| MAYBE SENTENCE
| STATEMENT
| QUESTION
| COMMAND
| ""

IF: "if"| "only if"| "if only"| "if and only if"| "if and if only"
AND: "and"| "or"| "but" | "else" | "otherwise"
THEN: "then" | "only then" | "then and then only" | "then and only then"
MAYBE: "maybe" | "possibly" | "perhaps" | "yes" | "no"
WHEN: "when" | "while" | "unless" | "until" | "whenever" | "while and when" | "when and while" | "whenever and while" | "when and whenever" | "when or whenever" | "whenever and whenever" | "unless and until" | "until and unless" | "whenever and wherever" | "if and when" | "when and if" | "if and while" | "if and whenever" | "whenever and if"

The distinction between the WHEN and IF class is that IF can take THEN, but WHEN cannot. I will ignore commas for the BNF, place them as required from the generative structure. Also, there is a bit of post-processing required here: the sentence can't end up empty.

Anyway, this BNF (assuming you know how to form STATEMENTs, QUESTIONs, and COMMANDs) tells you exactly how to use the IF THEN AND WHEN word at the top level of grammar.

I should point out that there will be a redundancy in the description, in that the words in the MAYBE class are adverbs, and will occur inside statements, questions, and so on as adverbs too.

Counterintuitive productions

Nested "if"s start to sound weird, although they are fine by the BNF rules:

  • If if John writes Jane reads james falls.

Is this production considered grammatical?

  • If jane reads if john writes then james falls.

This one sounds ok, but it is just a reordering of the previous one

  • If, if, if john runs to the store Jane runs to the bank, James eats, linda falls

Is this one ok? Stuffing in the "then"s

  • If, if, if John runs to the store then jane runs to the bank, then James eats, then Linda falls.

Rearranging using different options for expanding if-then,

  • If, James eats if Jane runs to the bank, if John runs to the store, then Linda cries.

This sounds ok to my ears. Is it ok?

There are also counterintuitive productions:

  • yes yes maybe possibly no, I will go to the store.

Is this grammatical?

EDIT: In response to comments and downvote

I was using unnaturally short statements inside the if's, because the exact nature of the sentences inside is irrelevant. But it seems to psychologically make a difference. Here are more natural sounding versions, with different tenses and more semantic meaningfulness:

  • Me: If, only if John helps her will Jane cook, I'm not going to eat. I hate John's cooking.

Is this production considered grammatical?

  • Me: If jane cooks only if john helps her then I'm not going to eat. I hate John's cooking

This one sounds ok, but it is just a reordering of the previous one

  • Jane: If, if, only if John helps me will I cook you won't eat then I won't ever invite you to my house again!

Is this one ok? Stuffing in the "then"s

  • Jane: If, if, only if John helps me will I cook then you won't eat, then I won't ever invite you to my house again!

Rearranging using different options for expanding if-then,

  • Jane: If, you wont eat if I will cook only if John helps me, then I won't ever invite you to my house again!

This sounds ok to my ears. Is it ok? It's just a transformational rearrangement of the previous Jane utterances.

There are also counterintuitive productions:

  • Me: yes yes maybe possibly no, I don't know whether I will stay for dinner.

Is this grammatical?


Solution 1:

Backus-Naur Form is useful for describing the kinds of grammars that are easy for stack machines to parse. Your brain is not a stack machine.

In your brain, the patterns for structures like “if” and “when” are etched into your neurons as pattern matchers. They sample the speech coming in, and activate whenever they recognise certain patterns.

You have one if-pattern recogniser in your brain. Just one. You have one when-pattern recogniser in your brain. Just one. If you try to nest if-patterns, you are using the same piece of hardware to match two different sentences at the same time. That doesn’t work, so the sentence becomes unreadable. However, you can nest different kinds of sentence pattern without too much trouble.

So these are just about comprehensible:

If when John writes Jane reads James fails.

When if John writes Jane reads James fails.

But these are not:

If if John writes Jane reads James fails.

When when John writes Jane reads James fails.

So go ahead and write a BNF description of English grammar if you want — I’m sure it’s an interesting and instructive exercies — but if you really want an accurate description of English you’re using the wrong tool for the job.

Solution 2:

I find the following grammatical, but only just.

Please advise if anyone can judge if David can explain if Ron's sentences are grammatical if they meet his BNF specification.

However, I strongly agree with Avner's comment that BNF is really the wrong tool for the job.

Solution 3:

In general, humans appear to have trouble interpreting sentences where you would need to mentally 'keep a lot on the stack' in order to parse the sentence. So for example, the following is in principle grammatical but in practice difficult to interpret:

The plane the aide the president chose flew in landed.

On the other hand, the following involves a similar level of recursion in principle, but in practice you only need to unwind the stack 'one level at a time' (or arguably don't actually need a stack at all) to interpret it:

My girlfriend's mother's dog died.

This is the dog that chased the cat that chased the mouse.

I think this difference is usually referred to as 'nested recursion' vs 'tail recursion'. We can handle several levels of tail recursion quite readily, but usually only very shallow nested recursion.

If you're interested in this topic further, you may like to look at e.g. van der Hulst (ed), "Recursion and human language" -- and indeed see what different books on (human language) syntax have to say about recursion.