Formatting

Code format and refactoring parser.cc