Reusing Batch Parsers as Incremental Parsers

A simple solution to the incremental parsing problem is found by mapping sentential forms of a context-free grammar G over terminal strings of the placeholder language and then subtree forests, i.e. sequences of syntax sub-trees, over sequences of pairs (placeholdertoken, subtree-pointer). Parsing such sequences-of-pairs/ placeholder-strings is equivalent to parsing and therefore to embedding sub-tree-forests into a global syntax tree. Using this placeholder-for-tree techmnique we may easily implement several incremental bottom-up parsing policies by reusing standard (batch) parsers, such as those generated by Yacc, or any LARL or LR(k) parser.