OpenCCG is a Java library which can handle both parsing and generation. I’ve mostly used it for surface realization, converting fairly syntactic meaning representations into a natural language text, but you can use it for parsing or for generation from higher-level semantic representations if you’d like.
This tutorial is intended to help you:
Start exploring OpenCCG with the tccg utility. If you haven’t installed OpenCCG yet, see the first post on Installing OpenCCG first.