Abstract

We present a novel technique for extracting a grammar from a set of programs. A grammar is important for generating software analysis and modification tools. Most legacy applications are written in languages, which are minor variations (dialects) of the standard language. Normally, we have a grammar of the standard language, but the grammars of dialects are unavailable. In this paper we propose an iterative technique with backtracking for grammar extraction. Our technique extracts keyword based rules. This uses the CYK parsing algorithm and the LR error recovery technique for finding out new production rules. In each iteration a set of possible rules is built and one rule from them is selected. Finally, we get a grammar, which parses all programs in the set.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call