Grammar extension and parser modification