parser generator fully implemented. needs to be tested.