[logic-ml] four extensions of context-free grammars