Grammar update to reuse more code from jena impel.