Add semicolons to emit statements to be more consistent

* The purpose of the formatting is that this code should work
  with C, Java and Ruby code.
Add round-tripping for FROM and AS clauses