Move the parser creation code in its own function to enable unit testing.
Move the parser creation code in its own function to enable unit testing.

Unit test follow in next CL.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7766005

git-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@98480 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools