Formal Languages and Logic/Context-free languages