Efficient incremental LR parsing for syntax-directed editors