the LHS parsing and printing functions generate context information that is
needed when parsing and printing the RHSs