In mainstream clone detection research, people distinguish between clones of different types: “type 1”, "type 2", "type 3", and "type 4". For grammars, there is no developed theory of clone management, so the questions are open on what constitutes a proper clone, what classes of clones are there, which ones are useful to detect and which to refactor, etc. It makes sense to assume that clone detection in grammars will bear some similarity to contextual clones [35] that worked for another DSL with relatively few constructs, where clones were detected based on the context of clone candidate fragments, and not on their structure per se.
All rights reserved (c) Tushar Sharma 2017-23.