scholarly journals A Task-driven Grammar Refactoring Algorithm

10.14311/1636 ◽  
2012 ◽  
Vol 52 (5) ◽  
Author(s):  
Ivan Halupka ◽  
Ján Kollár ◽  
Emília Pietriková

This paper presents our proposal and the implementation of an algorithm for automated refactoring of context-free grammars. Rather than operating under some domain-specific task, in our approach refactoring is perfomed on the basis of a refactoring task defined by its user. The algorithm and the corresponding refactoring system are called mARTINICA. mARTINICA is able to refactor grammars of arbitrary size and structural complexity. However, the computation time needed to perform a refactoring task with the desired outcome is highly dependent on the size of the grammar. Until now, we have successfully performed refactoring tasks on small and medium-size grammars of Pascal-like languages and parts of the Algol-60 programming language grammar. This paper also briefly introduces the reader to processes occurring in grammar refactoring, a method for describing desired properties that a refactored grammar should fulfill, and there is a discussion of the overall significance of grammar refactoring.

2005 ◽  
Vol 141 (4) ◽  
pp. 99-116 ◽  
Author(s):  
Matej Črepinšek ◽  
Marjan Mernik ◽  
Barrett R. Bryant ◽  
Faizan Javed ◽  
Alan Sprague

2003 ◽  
Vol 10 (7) ◽  
Author(s):  
Claus Brabrand ◽  
Michael I. Schwartzbach ◽  
Mads Vanggaard

We present the metafront tool for specifying flexible, safe, and efficient syntactic transformations between languages defined by context-free grammars. The transformations are guaranteed to terminate and to map grammatically legal input to grammatically legal output.<br /> <br />We rely on a novel parser algorithm that is designed to support gradual extensions of a grammar by allowing productions to remain in a natural style and by statically reporting ambiguities and errors in terms of individual productions as they are being added.<br /> <br />Our tool may be used as a parser generator in which the resulting parser automatically supports a flexible, safe, and efficient macro processor, or as an extensible lightweight compiler generator for domain-specific languages. We show substantial examples of both kinds.


2013 ◽  
Vol 2013 ◽  
pp. 1-11 ◽  
Author(s):  
Cheng-Yuan Liou ◽  
Shen-Han Tseng ◽  
Wei-Chen Cheng ◽  
Huai-Ying Tsai

In modern bioinformatics, finding an efficient way to allocate sequence fragments with biological functions is an important issue. This paper presents a structural approach based on context-free grammars extracted from original DNA or protein sequences. This approach is radically different from all those statistical methods. Furthermore, this approach is compared with a topological entropy-based method for consistency and difference of the complexity results.


Sign in / Sign up

Export Citation Format

Share Document