Refactoring to extract pyparsing grammar into its own module