Programming languages are designed to be disambiguous.
Noun-noun compound
Head of the compound
- College junior - a kind of junior
- Junior College - a kind of college
Head first?
- Attorney general
Adjectives?
- New Mexico, general manager
More than 2 nouns?
- Luxury car dealership
Example: Noun Phrase Consisting of 4 nouns
If a n-word string allows 2 consecutive words combine at every time, how many cases does the n-word string contain?
The general solution is C(n), a notation for the nth .
Catalan number
Cn=1n+1(2nn),n≥0
1, 1, 2, 3, 4, 14, …..