scholarly journals Tunnel Parsing with counted repetitions

2020 ◽  
Vol 21 (4) ◽  
Author(s):  
Nikolay Handzhiyski ◽  
Elena Somova

The article describes a new and efficient algorithm for parsing, called Tunnel Parsing, that parses from left to right on the basis of a context-free grammar without left recursion and rules that recognize empty words. The algorithm is applicable mostly for domain-specific languages. In the article, particular attention is paid to the parsing of grammar element repetitions. As a result of the parsing, a statically typed concrete syntax tree is built from top to bottom, that accurately reflects the grammar. The parsing is not done through a recursion, but through an iteration. The Tunnel Parsing algorithm uses the grammars directly without a prior refactoring and is with a linear time complexity for deterministic context-free grammars.

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

2016 ◽  
Vol 41 (4) ◽  
pp. 297-315
Author(s):  
Wojciech Wieczorek

Abstract A cover-grammar of a finite language is a context-free grammar that accepts all words in the language and possibly other words that are longer than any word in the language. In this paper, we describe an efficient algorithm aided by Ant Colony System that, for a given finite language, synthesizes (constructs) a small cover-grammar of the language. We also check its ability to solve a grammatical inference task through the series of experiments.


Author(s):  
Mehrnoosh Bazrafkan

The numerous different mathematical methods used to solve pattern recognition snags may be assembled into two universal approaches: the decision-theoretic approach and the syntactic(structural) approach. In this paper, at first syntactic pattern recognition method and formal grammars are described and then has been investigated one of the techniques in syntactic pattern recognition called top – down tabular parser known as Earley’s algorithm Earley's tabular parser is one of the methods of context -free grammar parsing for syntactic pattern recognition. Earley's algorithm uses array data structure for implementing, which is the main problem and for this reason takes a lots of time, searching in array and grammar parsing, and wasting lots of memory. In order to solve these problems and most important, the cubic time complexity, in this article, a new algorithm has been introduced, which reduces wasting the memory to zero, with using linked list data structure. Also, with the changes in the implementation and performance of the algorithm, cubic time complexity has transformed into O (n*R) order. Key words: syntactic pattern recognition, tabular parser, context –free grammar, time complexity, linked list data structure.


2012 ◽  
Vol 9 (1) ◽  
pp. 381-410
Author(s):  
Riad Jabri

In this paper, we propose a two fold generic parser. First, it simulates the behavior of multiple parsing automata. Second, it parses strings drawn from either a context free grammar, a regular tree grammar, or from both. The proposed parser is based on an approach that defines an extended version of an automaton, called positionparsing automaton (PPA) using concepts from LR and regular tree automata, combined with a newly introduced concept, called state instantiation and transition cloning. It is constructed as a direct mapping from a grammar, represented in an expanded list format. However, PPA is a non-deterministic automaton with a generic bottom-up parsing behavior. Hence, it is efficiently transformed into a reduced one (RBA). The proposed parser is then constructed to simulate the run of the RBA automaton on input strings derived from a respective grammar. Without loss of generality, the proposed parser is used within the framework of pattern matching and code generation. Comparisons with similar and well-known approaches, such as LR and RI, have shown that our parsing algorithm is conceptually simpler and requires less space and states.


2021 ◽  
Vol 68 (4) ◽  
pp. 1-40
Author(s):  
Moses Ganardi ◽  
Artur Jeż ◽  
Markus Lohrey

We show that a context-free grammar of size that produces a single string of length (such a grammar is also called a string straight-line program) can be transformed in linear time into a context-free grammar for of size , whose unique derivation tree has depth . This solves an open problem in the area of grammar-based compression, improves many results in this area, and greatly simplifies many existing constructions. Similar results are shown for two formalisms for grammar-based tree compression: top dags and forest straight-line programs. These balancing results can be all deduced from a single meta-theorem stating that the depth of an algebraic circuit over an algebra with a certain finite base property can be reduced to with the cost of a constant multiplicative size increase. Here, refers to the size of the unfolding (or unravelling) of the circuit. In particular, this results applies to standard arithmetic circuits over (noncommutative) semirings.


2014 ◽  
Vol 4 (3) ◽  
Author(s):  
Sergej Chodarev ◽  
Dominik Lakatoš ◽  
Jaroslav Porubän ◽  
Ján Kollár

AbstractPopularity of domain-specific languages brings the problem of language components reuse. It should be possible to use parts of different languages in development of new one to lower costs and also allow incremental development. This problem could be solved using the composition of languages. In this paper we discuss the view of language composition from the perspective of concepts composition, where the role of concrete syntax is lowered. We present examples of language composition based on the principles of object composition implemented using YAJCo parser generator, that allows to specify the language based on its abstract syntax.


Author(s):  
M. NIVAT ◽  
A. SAOUDI

We investigate the complexity of the recognition of images generated by a class of context-free image grammars. We show that the sequential time complexity of the recognition of an n × n image as generated by a context-free grammar is O(nM(n)), where M(n) is the time to multiply two boolean n × n matrices. The space complexity of this recognition is O(n3). Using a parallel random access machine (i.e. PRAM), the recognition can be done in O( log 2(n)) time with n7 processors or in O(n log 2(n)) time with n6 processors. We also introduce high dimensional context-free grammars and prove that their recognition problem is polylogarithmic.


Sign in / Sign up

Export Citation Format

Share Document