Don't require several modules on each parse call

Change-Id: I19ee11853e96eafc4b0ea25112570915090de6be
Inline isEOF / isSOF

We generally use the production, so directly inline the code to avoid
unnecessary indirections.

Change-Id: I9d080a5d27a07de88bd65152f49963abec9f8c74