Download Paper

Transcript
Multitarget .Net compiler for TouchDevelop
Figure 2.4: The life-cycle of language reverse engineering.
The general workflow for language specification mining, as depicted on Figure 2.4, is the
following:
• compilation of the base-line grammar for the object of reverse engineering,
• deriving the grammar use cases (parser, compiler etc.),
• implementation of the grammar in the format dependent upon the selected use case,
• quality assurance and testing of the grammar-dependent software,
• reconsolidation of the derived base-line grammar and return to the begin of the
iteration.
In the current work we tried a novel approach to use ANTLR Studio for rapid prototyping
of the base-line grammar as the first step in reverse engineering of a language specification.
With the support of the tools from ANTLR Studio we were able to derive a human-readable
grammar, to debug it and test against the source code and to detect the offending rules
preventing us from a computationally effective implementation of the parser. We also used
the rich visualizing features of ANTLR studio to prepare the railroad diagrams for this
manuscript.
24