Foundations of syntax