This paper addresses the problem of the acquisition of the syntax of propositional logic. An approach based on general purpose cognitive capacities such as invention, adoption, parsing, generation and induction is proposed. Self-organisation principles are used to show how a shared set of preferred lexical entries and grammatical constructions, i.e., a language, can emerge in a population of autonomous agents which do not have any initial linguistic knowledge. Experiments in which a population of autonomous agents constructs a grammar that allows communicating the formulas of a propositional language are presented. This grammar although simple has interesting properties found in natural languages, such as compositionality and recursion. These experiments extend previous work by considering a larger population and a search space of grammar rules much larger. In particular the agents are allowed to order the expressions associated with the constituents of a logical formula in arbitrary order. Previous work assumed that the expressions associated with the connectives should be placed in first place in the sentence. The branching factor of the search space of grammar rules considered by each agent is extended thus from one to two in the case of formulas constructed using negation, and from two to six in the case of formulas constructed using binary connectives.