Move constructor code out of parser function static method

Change-Id: I896d52210ce828cf37af4aea65ee880b84c4f313
Merge "Move constructor code out of parser function static method"