more work on parser and pretty printer