At first, it would appear that this question is impossible to answer. To find out how grammar is created, someone needs to be present at the time of a language's creation, documenting its emergence. Many historical linguists are able to trace modern complex languages back to earlier languages, but in order to answer the question of how complex languages are actually formed, the researcher needs to observe how languages are started from scratch. Amazingly, however, this is possible.