Refined the grammar loading logic, and modified the load operation to accept an InputRange, allowing it to be used with files or for unit tests.